aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/lux/abstract/order.lux5
-rw-r--r--stdlib/source/lux/abstract/predicate.lux15
-rw-r--r--stdlib/source/lux/control/cli.lux (renamed from stdlib/source/lux/cli.lux)12
-rw-r--r--stdlib/source/lux/control/concurrency/actor.lux6
-rw-r--r--stdlib/source/lux/control/concurrency/atom.lux5
-rw-r--r--stdlib/source/lux/control/concurrency/frp.lux4
-rw-r--r--stdlib/source/lux/control/concurrency/process.lux4
-rw-r--r--stdlib/source/lux/control/concurrency/promise.lux7
-rw-r--r--stdlib/source/lux/control/concurrency/semaphore.lux3
-rw-r--r--stdlib/source/lux/control/concurrency/stm.lux3
-rw-r--r--stdlib/source/lux/control/continuation.lux3
-rw-r--r--stdlib/source/lux/control/function.lux (renamed from stdlib/source/lux/function.lux)0
-rw-r--r--stdlib/source/lux/control/io.lux (renamed from stdlib/source/lux/io.lux)0
-rw-r--r--stdlib/source/lux/control/security/capability.lux2
-rw-r--r--stdlib/source/lux/control/thread.lux5
-rw-r--r--stdlib/source/lux/data/bit.lux3
-rw-r--r--stdlib/source/lux/data/identity.lux3
-rw-r--r--stdlib/source/lux/data/lazy.lux2
-rw-r--r--stdlib/source/lux/data/number/nat.lux5
-rw-r--r--stdlib/source/lux/data/number/ratio.lux2
-rw-r--r--stdlib/source/lux/data/number/rev.lux5
-rw-r--r--stdlib/source/lux/host.jvm.lux8
-rw-r--r--stdlib/source/lux/host/jvm/loader.jvm.lux2
-rw-r--r--stdlib/source/lux/host/scheme.lux4
-rw-r--r--stdlib/source/lux/macro/poly.lux4
-rw-r--r--stdlib/source/lux/macro/syntax/common/writer.lux3
-rw-r--r--stdlib/source/lux/test.lux4
-rw-r--r--stdlib/source/lux/time/instant.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/analysis.lux5
-rw-r--r--stdlib/source/lux/tool/compiler/phase.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux2
-rw-r--r--stdlib/source/lux/type/resource.lux4
-rw-r--r--stdlib/source/lux/world/file.lux2
-rw-r--r--stdlib/source/lux/world/net/tcp.jvm.lux2
-rw-r--r--stdlib/source/lux/world/net/udp.jvm.lux2
-rw-r--r--stdlib/source/test/lux.lux18
-rw-r--r--stdlib/source/test/lux/abstract/apply.lux3
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux3
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux3
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux3
-rw-r--r--stdlib/source/test/lux/abstract/monoid.lux5
-rw-r--r--stdlib/source/test/lux/control.lux7
-rw-r--r--stdlib/source/test/lux/control/cli.lux (renamed from stdlib/source/test/lux/cli.lux)0
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux8
-rw-r--r--stdlib/source/test/lux/control/concurrency/atom.lux5
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux10
-rw-r--r--stdlib/source/test/lux/control/concurrency/promise.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux14
-rw-r--r--stdlib/source/test/lux/control/io.lux (renamed from stdlib/source/test/lux/io.lux)7
-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/state.lux4
-rw-r--r--stdlib/source/test/lux/control/writer.lux3
-rw-r--r--stdlib/source/test/lux/data/bit.lux5
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux4
-rw-r--r--stdlib/source/test/lux/data/error.lux4
-rw-r--r--stdlib/source/test/lux/data/maybe.lux2
-rw-r--r--stdlib/source/test/lux/host/jvm.jvm.lux2
-rw-r--r--stdlib/source/test/lux/math.lux117
-rw-r--r--stdlib/source/test/lux/math/infix.lux2
-rw-r--r--stdlib/source/test/lux/type/resource.lux3
-rw-r--r--stdlib/source/test/lux/world/file.lux2
-rw-r--r--stdlib/source/test/lux/world/net/tcp.lux2
-rw-r--r--stdlib/source/test/lux/world/net/udp.lux2
70 files changed, 222 insertions, 194 deletions
diff --git a/stdlib/source/lux/abstract/order.lux b/stdlib/source/lux/abstract/order.lux
index 85b33fa18..32df7d1af 100644
--- a/stdlib/source/lux/abstract/order.lux
+++ b/stdlib/source/lux/abstract/order.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
- function]
+ [control
+ ["." function]]]
[//
[functor (#+ Contravariant)]
["." equivalence (#+ Equivalence)]])
@@ -21,7 +22,7 @@
(def: #export (order equivalence <)
(All [a]
(-> (Equivalence a) (-> a a Bit) (Order a)))
- (let [> (flip <)]
+ (let [> (function.flip <)]
(structure (def: &equivalence equivalence)
(def: < <)
diff --git a/stdlib/source/lux/abstract/predicate.lux b/stdlib/source/lux/abstract/predicate.lux
index faa1859b9..de3fc087d 100644
--- a/stdlib/source/lux/abstract/predicate.lux
+++ b/stdlib/source/lux/abstract/predicate.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
- ["." function]]
+ [control
+ ["." function]]]
[//
[monoid (#+ Monoid)]
[functor (#+ Contravariant)]])
@@ -10,7 +11,7 @@
(template [<identity-name> <identity-value> <composition-name> <composition>]
[(def: #export <identity-name>
- (All [a] (Predicate a))
+ Predicate
(function.constant <identity-value>))
(def: #export (<composition-name> left right)
@@ -19,8 +20,8 @@
(<composition> (left value)
(right value))))]
- [none #0 union or]
- [all #1 intersection and]
+ [none #0 unite or]
+ [all #1 intersect and]
)
(template [<name> <identity> <composition>]
@@ -30,8 +31,8 @@
(def: identity <identity>)
(def: compose <composition>))]
- [Union@Monoid none union]
- [Intersection@Monoid all intersection]
+ [union ..none ..unite]
+ [intersection ..all ..intersect]
)
(def: #export (complement predicate)
@@ -50,7 +51,7 @@
(Predicate a)))
(|>> (predicate (rec predicate))))
-(structure: #export _
+(structure: #export contravariant
(Contravariant Predicate)
(def: (map-1 f fb)
diff --git a/stdlib/source/lux/cli.lux b/stdlib/source/lux/control/cli.lux
index 2ee55a9b5..f8201ce87 100644
--- a/stdlib/source/lux/cli.lux
+++ b/stdlib/source/lux/control/cli.lux
@@ -2,10 +2,6 @@
[lux #*
[abstract
[monad (#+ do)]]
- [control
- ["p" parser (#+ Parser)]
- [concurrency
- ["." process]]]
[data
[collection
["." list ("#@." monoid monad)]]
@@ -17,8 +13,12 @@
["s" syntax (#+ Syntax syntax:)]]
[tool
[compiler
- ["." host]]]
- ["." io]])
+ ["." host]]]]
+ [//
+ ["." io]
+ ["p" parser (#+ Parser)]
+ [concurrency
+ ["." process]]])
(type: #export (CLI a)
{#.doc "A command-line interface parser."}
diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux
index 3384b7b66..97aa88b5c 100644
--- a/stdlib/source/lux/control/concurrency/actor.lux
+++ b/stdlib/source/lux/control/concurrency/actor.lux
@@ -1,12 +1,12 @@
(.module: {#.doc "The actor model of concurrency."}
[lux #*
- ["." function]
[abstract
monad]
[control
+ ["." function]
["p" parser]
- ["ex" exception (#+ exception:)]]
- ["." io (#+ IO io) ("#;." monad)]
+ ["ex" exception (#+ exception:)]
+ ["." io (#+ IO io) ("#;." monad)]]
[data
["." product]
["." error (#+ Error)]
diff --git a/stdlib/source/lux/control/concurrency/atom.lux b/stdlib/source/lux/control/concurrency/atom.lux
index 6b88a0a4a..6ef8c8466 100644
--- a/stdlib/source/lux/control/concurrency/atom.lux
+++ b/stdlib/source/lux/control/concurrency/atom.lux
@@ -2,8 +2,9 @@
[lux #*
[abstract
[monad (#+ do)]]
- ["." function]
- ["." io (#- run)]
+ [control
+ ["." function]
+ ["." io (#- run)]]
[type
abstract]
[tool
diff --git a/stdlib/source/lux/control/concurrency/frp.lux b/stdlib/source/lux/control/concurrency/frp.lux
index 74212594f..ac145f78a 100644
--- a/stdlib/source/lux/control/concurrency/frp.lux
+++ b/stdlib/source/lux/control/concurrency/frp.lux
@@ -1,6 +1,5 @@
(.module:
[lux #*
- ["." io (#+ IO io)]
[abstract
[predicate (#+ Predicate)]
[equivalence (#+ Equivalence)]
@@ -8,7 +7,8 @@
[apply (#+ Apply)]
["." monad (#+ Monad do)]]
[control
- ["ex" exception (#+ exception:)]]
+ ["ex" exception (#+ exception:)]
+ ["." io (#+ IO io)]]
[data
["." maybe ("#@." functor)]
["." error (#+ Error)]
diff --git a/stdlib/source/lux/control/concurrency/process.lux b/stdlib/source/lux/control/concurrency/process.lux
index 96963a7f2..c7f9ae82e 100644
--- a/stdlib/source/lux/control/concurrency/process.lux
+++ b/stdlib/source/lux/control/concurrency/process.lux
@@ -3,14 +3,14 @@
[abstract
["." monad (#+ do)]]
[control
- ["ex" exception (#+ exception:)]]
+ ["ex" exception (#+ exception:)]
+ ["." io (#+ IO io)]]
[data
[collection
["." list]]]
[tool
[compiler
["." host]]]
- ["." io (#+ IO io)]
[host (#+ import: object)]]
[//
["." atom (#+ Atom)]])
diff --git a/stdlib/source/lux/control/concurrency/promise.lux b/stdlib/source/lux/control/concurrency/promise.lux
index 63f506c37..49d4247b4 100644
--- a/stdlib/source/lux/control/concurrency/promise.lux
+++ b/stdlib/source/lux/control/concurrency/promise.lux
@@ -4,12 +4,13 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
["." monad (#+ Monad do)]]
+ [control
+ ["." function]
+ ["." io (#+ IO io)]]
[data
["." product]]
- ["." function]
[type
- abstract]
- ["." io (#+ IO io)]]
+ abstract]]
[//
["." process]
["." atom (#+ Atom atom)]])
diff --git a/stdlib/source/lux/control/concurrency/semaphore.lux b/stdlib/source/lux/control/concurrency/semaphore.lux
index 1159e41e6..fab5d4498 100644
--- a/stdlib/source/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/lux/control/concurrency/semaphore.lux
@@ -2,7 +2,8 @@
[lux #*
[abstract
[monad (#+ do)]]
- ["." io (#+ IO)]
+ [control
+ ["." io (#+ IO)]]
[type
abstract
["." refinement]]]
diff --git a/stdlib/source/lux/control/concurrency/stm.lux b/stdlib/source/lux/control/concurrency/stm.lux
index fce9cbd82..9d97b389f 100644
--- a/stdlib/source/lux/control/concurrency/stm.lux
+++ b/stdlib/source/lux/control/concurrency/stm.lux
@@ -4,7 +4,8 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
["." monad (#+ do Monad)]]
- ["." io (#+ IO io)]
+ [control
+ ["." io (#+ IO io)]]
[data
["." product]
["." maybe]
diff --git a/stdlib/source/lux/control/continuation.lux b/stdlib/source/lux/control/continuation.lux
index e960e1fd3..591966b89 100644
--- a/stdlib/source/lux/control/continuation.lux
+++ b/stdlib/source/lux/control/continuation.lux
@@ -4,7 +4,8 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
[monad (#+ Monad do)]]
- ["." function]
+ [control
+ ["." function]]
[macro (#+ with-gensyms)
["." code]
["s" syntax (#+ syntax:)]]])
diff --git a/stdlib/source/lux/function.lux b/stdlib/source/lux/control/function.lux
index 5a33a2aae..5a33a2aae 100644
--- a/stdlib/source/lux/function.lux
+++ b/stdlib/source/lux/control/function.lux
diff --git a/stdlib/source/lux/io.lux b/stdlib/source/lux/control/io.lux
index 4102ff9c4..4102ff9c4 100644
--- a/stdlib/source/lux/io.lux
+++ b/stdlib/source/lux/control/io.lux
diff --git a/stdlib/source/lux/control/security/capability.lux b/stdlib/source/lux/control/security/capability.lux
index 4684c8bdf..48392c045 100644
--- a/stdlib/source/lux/control/security/capability.lux
+++ b/stdlib/source/lux/control/security/capability.lux
@@ -1,10 +1,10 @@
(.module:
[lux #*
- ["." io (#+ IO)]
[abstract
[monad (#+ do)]]
[control
["p" parser]
+ ["." io (#+ IO)]
[concurrency
["." promise (#+ Promise)]]]
[data
diff --git a/stdlib/source/lux/control/thread.lux b/stdlib/source/lux/control/thread.lux
index e74dc1eb5..2edaeb8b4 100644
--- a/stdlib/source/lux/control/thread.lux
+++ b/stdlib/source/lux/control/thread.lux
@@ -4,6 +4,8 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
[monad (#+ Monad do)]]
+ [control
+ ["." io (#+ IO)]]
[data
[collection
["." array (#+ Array)]]]
@@ -11,8 +13,7 @@
abstract]
[tool
[compiler
- ["." host]]]
- ["." io (#+ IO)]])
+ ["." host]]]])
(type: #export (Thread ! a)
(-> ! a))
diff --git a/stdlib/source/lux/data/bit.lux b/stdlib/source/lux/data/bit.lux
index 8c1b1d1b3..d80606137 100644
--- a/stdlib/source/lux/data/bit.lux
+++ b/stdlib/source/lux/data/bit.lux
@@ -5,7 +5,8 @@
[equivalence (#+ Equivalence)]
hash
[codec (#+ Codec)]]
- ["." function]])
+ [control
+ ["." function]]])
(structure: #export equivalence
(Equivalence Bit)
diff --git a/stdlib/source/lux/data/identity.lux b/stdlib/source/lux/data/identity.lux
index ff464a6f8..412103987 100644
--- a/stdlib/source/lux/data/identity.lux
+++ b/stdlib/source/lux/data/identity.lux
@@ -5,7 +5,8 @@
[apply (#+ Apply)]
[monad (#+ Monad)]
[comonad (#+ CoMonad)]]
- ["." function]])
+ [control
+ ["." function]]])
(type: #export (Identity a)
a)
diff --git a/stdlib/source/lux/data/lazy.lux b/stdlib/source/lux/data/lazy.lux
index 82cd8ec51..34bdf494f 100644
--- a/stdlib/source/lux/data/lazy.lux
+++ b/stdlib/source/lux/data/lazy.lux
@@ -1,12 +1,12 @@
(.module:
[lux #*
- ["." io]
[abstract
[functor (#+ Functor)]
[apply (#+ Apply)]
[monad (#+ Monad do)]
[equivalence (#+ Equivalence)]]
[control
+ ["." io]
[concurrency
["." atom]]]
[macro (#+ with-gensyms)
diff --git a/stdlib/source/lux/data/number/nat.lux b/stdlib/source/lux/data/number/nat.lux
index 5ca294df5..f5258db23 100644
--- a/stdlib/source/lux/data/number/nat.lux
+++ b/stdlib/source/lux/data/number/nat.lux
@@ -9,11 +9,12 @@
[equivalence (#+ Equivalence)]
[codec (#+ Codec)]
["." order (#+ Order)]]
+ [control
+ ["." function]]
[data
["." error (#+ Error)]
["." maybe]
- ["." text (#+ Char)]]
- ["." function]])
+ ["." text (#+ Char)]]])
(structure: #export equivalence (Equivalence Nat)
(def: = n/=))
diff --git a/stdlib/source/lux/data/number/ratio.lux b/stdlib/source/lux/data/number/ratio.lux
index a501f9a1b..7542a56ff 100644
--- a/stdlib/source/lux/data/number/ratio.lux
+++ b/stdlib/source/lux/data/number/ratio.lux
@@ -8,6 +8,7 @@
[codec (#+ Codec)]
[monad (#+ do)]]
[control
+ ["." function]
["p" parser]]
[data
["." error]
@@ -16,7 +17,6 @@
[number
["." nat ("#@." decimal)]]
["." text ("#@." monoid)]]
- ["." function]
["." math]
["." macro
["." code]
diff --git a/stdlib/source/lux/data/number/rev.lux b/stdlib/source/lux/data/number/rev.lux
index 4738a72a0..3dbfeb6fc 100644
--- a/stdlib/source/lux/data/number/rev.lux
+++ b/stdlib/source/lux/data/number/rev.lux
@@ -9,12 +9,13 @@
[equivalence (#+ Equivalence)]
["." order (#+ Order)]
[codec (#+ Codec)]]
+ [control
+ ["." function]]
[data
["." error (#+ Error)]
["." maybe]
[collection
- ["." array (#+ Array)]]]
- ["." function]]
+ ["." array (#+ Array)]]]]
["." // #_
["#." i64]
["#." nat]
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index b829e21c9..915cdc7bf 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -4,7 +4,9 @@
["." monad (#+ Monad do)]
["." enum]]
[control
- ["p" parser]]
+ ["p" parser]
+ ["." function]
+ ["." io]]
[data
["." maybe]
["." product]
@@ -16,12 +18,10 @@
[collection
["." array (#+ Array)]
["." list ("#;." monad fold monoid)]]]
- ["." function]
["." type ("#;." equivalence)]
["." macro (#+ with-gensyms)
["." code]
- ["s" syntax (#+ syntax: Syntax)]]
- ["." io]])
+ ["s" syntax (#+ syntax: Syntax)]]])
(template [<name> <op> <from> <to>]
[(def: #export (<name> value)
diff --git a/stdlib/source/lux/host/jvm/loader.jvm.lux b/stdlib/source/lux/host/jvm/loader.jvm.lux
index 22e8a8352..9227b6c69 100644
--- a/stdlib/source/lux/host/jvm/loader.jvm.lux
+++ b/stdlib/source/lux/host/jvm/loader.jvm.lux
@@ -4,6 +4,7 @@
[monad (#+ do)]]
[control
["ex" exception (#+ exception:)]
+ ["." io (#+ IO)]
[concurrency
["." atom (#+ Atom)]]]
[data
@@ -14,7 +15,6 @@
["." array]
["." list ("#;." functor)]
["." dictionary (#+ Dictionary)]]]
- ["." io (#+ IO)]
[world
["." binary (#+ Binary)]]
["." host (#+ import: object do-to)]])
diff --git a/stdlib/source/lux/host/scheme.lux b/stdlib/source/lux/host/scheme.lux
index af8e0b954..820ff8c83 100644
--- a/stdlib/source/lux/host/scheme.lux
+++ b/stdlib/source/lux/host/scheme.lux
@@ -1,8 +1,8 @@
(.module:
[lux (#- Code int or and if function cond let)
- ["." function]
[control
- [pipe (#+ new> cond> case>)]]
+ [pipe (#+ new> cond> case>)]
+ ["." function]]
[data
[number
["." frac]]
diff --git a/stdlib/source/lux/macro/poly.lux b/stdlib/source/lux/macro/poly.lux
index 31b293144..a3d78177a 100644
--- a/stdlib/source/lux/macro/poly.lux
+++ b/stdlib/source/lux/macro/poly.lux
@@ -5,8 +5,8 @@
[equivalence]]
[control
["p" parser]
- ["ex" exception (#+ exception:)]]
- ["." function]
+ ["ex" exception (#+ exception:)]
+ ["." function]]
[data
["." product]
["." bit]
diff --git a/stdlib/source/lux/macro/syntax/common/writer.lux b/stdlib/source/lux/macro/syntax/common/writer.lux
index 2110aa26e..bf675857d 100644
--- a/stdlib/source/lux/macro/syntax/common/writer.lux
+++ b/stdlib/source/lux/macro/syntax/common/writer.lux
@@ -1,11 +1,12 @@
(.module:
{#.doc "Commons syntax writers."}
[lux #*
+ [control
+ ["." function]]
[data
[collection
["." list ("#;." functor)]]
["." product]]
- ["." function]
[macro
["." code]]]
["." //])
diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux
index 58d7654d3..8bf74ff49 100644
--- a/stdlib/source/lux/test.lux
+++ b/stdlib/source/lux/test.lux
@@ -4,6 +4,7 @@
["." monad (#+ Monad do)]]
[control
["ex" exception (#+ exception:)]
+ ["." io]
[concurrency
["." promise (#+ Promise) ("#;." monad)]]]
[data
@@ -16,8 +17,7 @@
["." instant]
["." duration]]
[math
- ["r" random ("#;." monad)]]
- ["." io]])
+ ["r" random ("#;." monad)]]])
(type: #export Counters
{#successes Nat
diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux
index 866616ca1..06e11a664 100644
--- a/stdlib/source/lux/time/instant.lux
+++ b/stdlib/source/lux/time/instant.lux
@@ -1,6 +1,5 @@
(.module:
[lux #*
- [io (#+ IO io)]
[abstract
[equivalence (#+ Equivalence)]
[order (#+ Order)]
@@ -8,6 +7,7 @@
codec
[monad (#+ do Monad)]]
[control
+ [io (#+ IO io)]
["p" parser]]
[data
["." error (#+ Error)]
diff --git a/stdlib/source/lux/tool/compiler/analysis.lux b/stdlib/source/lux/tool/compiler/analysis.lux
index 2f173007b..3abbc2ecc 100644
--- a/stdlib/source/lux/tool/compiler/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/analysis.lux
@@ -2,6 +2,8 @@
[lux (#- nat int rev)
[abstract
[monad (#+ do)]]
+ [control
+ ["." function]]
[data
["." product]
["." error]
@@ -9,8 +11,7 @@
["." text ("#;." equivalence)
format]
[collection
- ["." list ("#;." functor fold)]]]
- ["." function]]
+ ["." list ("#;." functor fold)]]]]
[//
["." reference (#+ Register Variable Reference)]
[phase
diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux
index 09657c3cf..dbe13e40c 100644
--- a/stdlib/source/lux/tool/compiler/phase.lux
+++ b/stdlib/source/lux/tool/compiler/phase.lux
@@ -4,7 +4,8 @@
[monad (#+ do)]]
[control
["." state]
- ["ex" exception (#+ Exception exception:)]]
+ ["ex" exception (#+ Exception exception:)]
+ ["." io]]
[data
["." product]
["." error (#+ Error) ("#;." functor)]
@@ -13,7 +14,6 @@
[time
["." instant]
["." duration]]
- ["." io]
[macro
["s" syntax (#+ syntax:)]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/extension.lux b/stdlib/source/lux/tool/compiler/phase/extension.lux
index 87e7474d4..bce8a66d9 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension.lux
@@ -3,6 +3,7 @@
[abstract
[monad (#+ do)]]
[control
+ ["." function]
["ex" exception (#+ exception:)]]
[data
["." error (#+ Error)]
@@ -10,8 +11,7 @@
format]
[collection
["." list ("#;." functor)]
- ["." dictionary (#+ Dictionary)]]]
- ["." function]]
+ ["." dictionary (#+ Dictionary)]]]]
["." //])
(type: #export Name Text)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
index 97eee0025..4fba47218 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux
@@ -1,9 +1,9 @@
(.module:
[lux #*
- ["." function]
[abstract
[monad (#+ do)]]
[control
+ ["." function]
["p" parser]]
[data
[number (#+ hex)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
index 46cd6d79e..adec09fa3 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
@@ -1,8 +1,9 @@
(.module:
[lux #*
- ["." function]
[abstract
["." monad (#+ do)]]
+ [control
+ ["." function]]
[data
["." product]
[collection
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
index d10434000..d095e9fe2 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
@@ -1,9 +1,9 @@
(.module:
[lux (#- inc)
- ["." function]
[abstract
[monad (#+ do)]]
[control
+ ["." function]
["p" parser]]
[data
[number (#+ hex)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
index 1e891c006..b66b7abaf 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
@@ -1,9 +1,9 @@
(.module:
[lux #*
- ["." function]
[abstract
[monad (#+ do)]]
[control
+ ["." function]
["p" parser ("#;." monad)]]
[data
[number (#+ hex)]
diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux
index 22d83defd..8e4b63679 100644
--- a/stdlib/source/lux/type/resource.lux
+++ b/stdlib/source/lux/type/resource.lux
@@ -6,6 +6,7 @@
[control
["p" parser]
["ex" exception (#+ exception:)]
+ ["." io (#+ IO)]
[concurrency
["." promise (#+ Promise)]]]
[data
@@ -23,8 +24,7 @@
["." macro
["s" syntax (#+ Syntax syntax:)]]
[type
- abstract]
- ["." io (#+ IO)]])
+ abstract]])
(type: #export (Procedure monad input output value)
(-> input (monad [output value])))
diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux
index c559c83e6..1e201d898 100644
--- a/stdlib/source/lux/world/file.lux
+++ b/stdlib/source/lux/world/file.lux
@@ -4,6 +4,7 @@
["." monad (#+ Monad do)]]
[control
["ex" exception (#+ Exception exception:)]
+ ["." io (#+ IO) ("#;." functor)]
[concurrency
["." promise (#+ Promise)]]
[security
@@ -23,7 +24,6 @@
["." template]]
[world
["." binary (#+ Binary)]]
- ["." io (#+ IO) ("#;." functor)]
[host (#+ import:)]
[tool
[compiler
diff --git a/stdlib/source/lux/world/net/tcp.jvm.lux b/stdlib/source/lux/world/net/tcp.jvm.lux
index f9c72bff3..0b1d725e5 100644
--- a/stdlib/source/lux/world/net/tcp.jvm.lux
+++ b/stdlib/source/lux/world/net/tcp.jvm.lux
@@ -3,6 +3,7 @@
[abstract
monad]
[control
+ ["." io (#+ IO)]
[concurrency
["." promise (#+ Promise Resolver)]
["." frp (#+ Channel Sink)]]
@@ -12,7 +13,6 @@
["." error (#+ Error)]]
[world
["." binary (#+ Binary)]]
- ["." io (#+ IO)]
[host (#+ import:)]
[tool
[compiler
diff --git a/stdlib/source/lux/world/net/udp.jvm.lux b/stdlib/source/lux/world/net/udp.jvm.lux
index 505871b56..497ed6893 100644
--- a/stdlib/source/lux/world/net/udp.jvm.lux
+++ b/stdlib/source/lux/world/net/udp.jvm.lux
@@ -4,6 +4,7 @@
monad]
[control
["ex" exception (#+ exception:)]
+ ["." io (#+ IO)]
[concurrency
["." promise (#+ Promise)]]
[security
@@ -15,7 +16,6 @@
["." array]]]
[world
["." binary (#+ Binary)]]
- ["." io (#+ IO)]
[host (#+ import:)]
[tool
[compiler
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 5b45d6e5e..42f4c9f81 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -10,15 +10,16 @@
[host (#+)]])]
(.module:
["/" lux #*
- [cli (#+ program:)]
- ["." io (#+ io)]
[abstract
[monad (#+ do)]
[predicate (#+ Predicate)]]
+ [control
+ [cli (#+ program:)]
+ ["." io (#+ io)]
+ ["." function]]
[data
[number
["." i64]]]
- ["." function]
["." math]
["_" test (#+ Test)]
## These modules do not need to be tested.
@@ -110,8 +111,6 @@
]
## TODO: Must have 100% coverage on tests.
["." / #_
- ["#." cli]
- ["#." io]
["#." abstract]
["#." control]
["#." data]
@@ -353,8 +352,6 @@
..templates)
(<| (_.context "Cross-platform support.")
..cross-platform-support)
- /cli.test
- /io.test
(<| (_.context "/abstract")
/abstract.test)
(<| (_.context "/control")
@@ -362,16 +359,15 @@
(<| (_.context "/data")
/data.test)
/macro.test
- (<| (_.context "/math")
- /math.test)
+ /math.test
(<| (_.context "/time")
/time.test)
/type.test
/world.test
- (<| (_.context "/host Host-platform interoperation")
+ (<| (_.context "/host")
($_ _.and
/host.test
- (<| (_.context "/jvm JVM (Java Virtual Machine)")
+ (<| (_.context "/jvm")
/host/jvm.test)))
)))
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index a269810bb..6b3ea631f 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -4,7 +4,8 @@
[data
[text
format]]
- ["." function]
+ [control
+ ["." function]]
[math
["r" random]]
["_" test (#+ Test)]]
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 63bbf97ad..b0498dc09 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -2,7 +2,8 @@
[lux #*
data/text/format
["_" test (#+ Test)]
- ["." function]
+ [control
+ ["." function]]
[abstract/monad (#+ do)]
[math
["r" random (#+ Random)]]]
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index cf3538575..77a07233b 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -6,7 +6,8 @@
[abstract
[equivalence (#+ Equivalence)]
[monad (#+ do)]]
- ["." function]]
+ [control
+ ["." function]]]
{1
["." / (#+ Functor)]})
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index 4382a260d..827a1e509 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -3,7 +3,8 @@
[data
[text
format]]
- ["." function]
+ [control
+ ["." function]]
[math
["r" random]]
["_" test (#+ Test)]]
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index b526c3e58..3600795ff 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -2,10 +2,11 @@
[lux #*
data/text/format
["_" test (#+ Test)]
- ["." function]
[abstract/monad (#+ do)]
[math
- ["r" random (#+ Random)]]]
+ ["r" random (#+ Random)]]
+ [control
+ ["." function]]]
{1
["." / (#+ Monoid)
[//
diff --git a/stdlib/source/test/lux/control.lux b/stdlib/source/test/lux/control.lux
index 341a119fe..9d95dc969 100644
--- a/stdlib/source/test/lux/control.lux
+++ b/stdlib/source/test/lux/control.lux
@@ -2,8 +2,10 @@
[lux #*
["_" test (#+ Test)]]
["." / #_
+ ["#." cli]
["#." continuation]
["#." exception]
+ ["#." io]
["#." parser]
["#." pipe]
["#." reader]
@@ -19,7 +21,8 @@
["#." stm]]
[security
["#." privacy]
- ["#." integrity]]])
+ ["#." integrity]]
+ ])
(def: concurrency
Test
@@ -41,8 +44,10 @@
(def: #export test
Test
($_ _.and
+ /cli.test
/continuation.test
/exception.test
+ /io.test
/parser.test
(<| (_.context "/pipe")
/pipe.test)
diff --git a/stdlib/source/test/lux/cli.lux b/stdlib/source/test/lux/control/cli.lux
index ff7a3abb3..ff7a3abb3 100644
--- a/stdlib/source/test/lux/cli.lux
+++ b/stdlib/source/test/lux/control/cli.lux
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index eff4d051d..a39f7b039 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -1,12 +1,10 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io (#+ IO io)]
[abstract/monad (#+ do)]
[control
["ex" exception]
- [concurrency
- ["." promise ("#;." monad)]]]
+ ["." io (#+ IO io)]]
[data
["." error]
[text
@@ -14,7 +12,9 @@
[math
["r" random]]]
{1
- ["." / (#+ actor: message:)]})
+ ["." / (#+ actor: message:)
+ [//
+ ["." promise ("#;." monad)]]]})
(actor: Counter
Nat
diff --git a/stdlib/source/test/lux/control/concurrency/atom.lux b/stdlib/source/test/lux/control/concurrency/atom.lux
index 455f8b00d..63f9ec296 100644
--- a/stdlib/source/test/lux/control/concurrency/atom.lux
+++ b/stdlib/source/test/lux/control/concurrency/atom.lux
@@ -1,11 +1,12 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io]
[abstract/monad (#+ do)]
data/text/format
[math
- ["r" random]]]
+ ["r" random]]
+ [control
+ ["." io]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 7ac79b465..f9cea5737 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -1,12 +1,9 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io (#+ IO io)]
[abstract/monad (#+ do)]
[control
- [concurrency
- ["." promise ("#@." monad)]
- ["." atom (#+ Atom atom)]]]
+ ["." io (#+ IO io)]]
[data
[number
["." nat]]
@@ -15,7 +12,10 @@
[math
["r" random]]]
{1
- ["." / (#+ Channel)]})
+ ["." / (#+ Channel)
+ [//
+ ["." promise ("#@." monad)]
+ ["." atom (#+ Atom atom)]]]})
(def: #export test
Test
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 5a49f26fe..5a4a41adb 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -1,10 +1,10 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io]
[abstract/monad (#+ do)]
[control
- pipe]
+ pipe
+ ["." io]]
data/text/format
[math
["r" random]]]
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 40bd81364..369bc8507 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -3,6 +3,7 @@
[abstract
["." monad (#+ do)]]
[control
+ ["." io]
[concurrency
["/" semaphore]
["." promise (#+ Promise)]
@@ -13,7 +14,6 @@
format]
[collection
["." list ("#;." functor)]]]
- ["." io]
[math
["r" random]]]
lux/test)
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index 9e3b9290c..6b9a65a55 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -1,14 +1,9 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io (#+ IO)]
["M" abstract/monad (#+ do Monad)]
[control
- [concurrency
- ["." atom (#+ Atom atom)]
- ["." process]
- ["." promise]
- ["." frp (#+ Channel)]]]
+ ["." io (#+ IO)]]
[data
text/format
[number
@@ -18,7 +13,12 @@
[math
["r" random]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["." atom (#+ Atom atom)]
+ ["." process]
+ ["." promise]
+ ["." frp (#+ Channel)]]]})
(def: (read! channel)
(All [a] (-> (Channel a) (IO (Atom (List a)))))
diff --git a/stdlib/source/test/lux/io.lux b/stdlib/source/test/lux/control/io.lux
index 3b00ceb3f..1a14558b2 100644
--- a/stdlib/source/test/lux/io.lux
+++ b/stdlib/source/test/lux/control/io.lux
@@ -9,10 +9,11 @@
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
- ["$." monad]]}]
- ["." function]]
+ ["$." monad]]}]]
{1
- ["." / (#+ IO)]})
+ ["." / (#+ IO)
+ [//
+ ["." function]]]})
(def: injection
(Injection IO)
diff --git a/stdlib/source/test/lux/control/reader.lux b/stdlib/source/test/lux/control/reader.lux
index aa639ce70..94aacdb5d 100644
--- a/stdlib/source/test/lux/control/reader.lux
+++ b/stdlib/source/test/lux/control/reader.lux
@@ -1,6 +1,5 @@
(.module:
[lux #*
- ["." io (#+ IO)]
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
@@ -15,7 +14,9 @@
[math
["r" random]]]
{1
- ["." / (#+ Reader)]})
+ ["." / (#+ Reader)
+ [//
+ ["." io (#+ IO)]]]})
(def: (injection value)
(Injection (All [a r] (Reader r a)))
@@ -29,7 +30,7 @@
(def: #export test
Test
- (<| (_.context (%name (name-of /.Reader)))
+ (<| (_.context (%name (name-of /._)))
(do r.monad
[sample r.nat
factor r.nat]
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index a575e4250..57ed91c1a 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -3,9 +3,6 @@
["_" test (#+ Test)]
[abstract
["." monad (#+ do)]]
- [control
- ["." thread (#+ Thread)]
- ["ex" exception (#+ exception:)]]
[data
["." error (#+ Error)]
[text
@@ -15,7 +12,10 @@
[math
["r" random]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["." thread (#+ Thread)]
+ ["ex" exception (#+ exception:)]]]})
(exception: oops)
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 808d5ebb2..96f9e9d34 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -1,7 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io]
[abstract
[monad (#+ do)]
{[0 #test]
@@ -10,7 +9,8 @@
["$." apply]
["$." monad]]}]
[control
- [pipe (#+ let>)]]
+ [pipe (#+ let>)]
+ ["." io]]
[data
["." product]
[text
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index 392fc7a4b..a95384fef 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -1,7 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io]
[abstract
[equivalence (#+ Equivalence)]
[monoid (#+ Monoid)]
@@ -11,6 +10,8 @@
["$." functor (#+ Injection Comparison)]
["$." apply]
["$." monad]]}]
+ [control
+ ["." io]]
[data
["." product]
["." text ("#;." equivalence)
diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux
index 9515fa5ce..eebca5f2a 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -3,14 +3,15 @@
data/text/format
["_" test (#+ Test)]
["r" math/random]
- ["." function]
[abstract
[monad (#+ do)]
{[0 #test]
[/
["$." equivalence]
["$." monoid]
- ["$." codec]]}]]
+ ["$." codec]]}]
+ [control
+ ["." function]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index a727761ca..4b9743912 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -27,7 +27,7 @@
(def: #export test
Test
- (<| (_.context (%name (name-of /.Bits)))
+ (<| (_.context (%name (name-of /._)))
($_ _.and
($equivalence.spec /.equivalence ..bits)
(do r.monad
@@ -47,7 +47,7 @@
(and (n/= 0 (/.capacity /.empty))
(|> /.empty (/.set idx) /.capacity
(n/- idx)
- (predicate.union (n/>= 0)
+ (predicate.unite (n/>= 0)
(n/< /.chunk-size)))))
(_.test "Bits (must) shrink when (and as much as) possible."
(let [grown (/.flip idx /.empty)]
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 247b2de78..fb97c3d32 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -2,7 +2,6 @@
[lux #*
data/text/format
["_" test (#+ Test)]
- ["." io]
[abstract
[monad (#+ do)]
{[0 #test]
@@ -14,7 +13,8 @@
["$." apply]
["$." monad]]}]
[control
- pipe]
+ pipe
+ ["." io]]
[data
["." bit]
["." product]
diff --git a/stdlib/source/test/lux/data/error.lux b/stdlib/source/test/lux/data/error.lux
index 8f89ccb8f..f65128ec3 100644
--- a/stdlib/source/test/lux/data/error.lux
+++ b/stdlib/source/test/lux/data/error.lux
@@ -1,7 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- ["." io]
[abstract
[monad (#+ do Monad)]
{[0 #test]
@@ -11,7 +10,8 @@
["$." monad]
["$." equivalence]]}]
[control
- pipe]
+ pipe
+ ["." io]]
[data
text/format
[number
diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux
index dc6ca1d56..a92141bd9 100644
--- a/stdlib/source/test/lux/data/maybe.lux
+++ b/stdlib/source/test/lux/data/maybe.lux
@@ -10,13 +10,13 @@
["$." apply]
["$." monad]]}]
[control
+ ["." io ("#@." monad)]
pipe]
[data
["." text
format]
[number
["." nat]]]
- ["." io ("#@." monad)]
[math
["r" random (#+ Random)]]]
{1
diff --git a/stdlib/source/test/lux/host/jvm.jvm.lux b/stdlib/source/test/lux/host/jvm.jvm.lux
index 16c4aea90..47c6f35d9 100644
--- a/stdlib/source/test/lux/host/jvm.jvm.lux
+++ b/stdlib/source/test/lux/host/jvm.jvm.lux
@@ -2,6 +2,7 @@
[lux #*
[abstract/monad (#+ do)]
[control
+ ["." io (#+ IO)]
[concurrency
["." atom]]
[security
@@ -15,7 +16,6 @@
[collection
["." dictionary]
["." row]]]
- ["." io (#+ IO)]
[world
["." file (#+ File)]
[binary (#+ Binary)]]
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index fcd4a1134..c11380015 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -31,63 +31,64 @@
(def: #export test
Test
- ($_ _.and
- (<| (_.context "Trigonometry")
- (do r.monad
- [angle (|> r.safe-frac (:: @ map (f/* /.tau)))]
- ($_ _.and
- (_.test "Sine and arc-sine are inverse functions."
- (trigonometric-symmetry /.sin /.asin angle))
- (_.test "Cosine and arc-cosine are inverse functions."
- (trigonometric-symmetry /.cos /.acos angle))
- (_.test "Tangent and arc-tangent are inverse functions."
- (trigonometric-symmetry /.tan /.atan angle))
- )))
- (<| (_.context "Rounding")
- (do r.monad
- [sample (|> r.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)]
- (and (|> ceil'd frac-to-int int-to-frac (f/= ceil'd))
- (f/>= sample ceil'd)
- (f/<= +1.0 (f/- sample ceil'd)))))
- (_.test "The floor will be an integer value, and will be <= the original."
- (let [floor'd (/.floor sample)]
- (and (|> floor'd frac-to-int int-to-frac (f/= floor'd))
- (f/<= sample floor'd)
- (f/<= +1.0 (f/- floor'd sample)))))
- (_.test "The round will be an integer value, and will be < or > or = the original."
- (let [round'd (/.round sample)]
- (and (|> round'd frac-to-int int-to-frac (f/= round'd))
- (f/<= +1.0 (frac@abs (f/- sample round'd))))))
- )))
- (<| (_.context "Exponentials and logarithms")
- (do r.monad
- [sample (|> r.safe-frac (:: @ map (f/* +10.0)))]
- (_.test "Logarithm is the inverse of exponential."
- (|> sample /.exp /.log (within? +1.0e-15 sample)))))
- (<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple")
- (do r.monad
- [#let [gen-nat (|> r.nat (:: @ map (|>> (n/% 1000) (n/max 1))))]
- x gen-nat
- y gen-nat]
- ($_ _.and
- (_.test "GCD"
- (let [gcd (/.n/gcd x y)]
- (and (n/= 0 (n/% gcd x))
- (n/= 0 (n/% gcd y))
- (n/>= 1 gcd))))
+ (<| (_.context (%name (name-of /._)))
+ ($_ _.and
+ (<| (_.context "Trigonometry")
+ (do r.monad
+ [angle (|> r.safe-frac (:: @ map (f/* /.tau)))]
+ ($_ _.and
+ (_.test "Sine and arc-sine are inverse functions."
+ (trigonometric-symmetry /.sin /.asin angle))
+ (_.test "Cosine and arc-cosine are inverse functions."
+ (trigonometric-symmetry /.cos /.acos angle))
+ (_.test "Tangent and arc-tangent are inverse functions."
+ (trigonometric-symmetry /.tan /.atan angle))
+ )))
+ (<| (_.context "Rounding")
+ (do r.monad
+ [sample (|> r.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)]
+ (and (|> ceil'd frac-to-int int-to-frac (f/= ceil'd))
+ (f/>= sample ceil'd)
+ (f/<= +1.0 (f/- sample ceil'd)))))
+ (_.test "The floor will be an integer value, and will be <= the original."
+ (let [floor'd (/.floor sample)]
+ (and (|> floor'd frac-to-int int-to-frac (f/= floor'd))
+ (f/<= sample floor'd)
+ (f/<= +1.0 (f/- floor'd sample)))))
+ (_.test "The round will be an integer value, and will be < or > or = the original."
+ (let [round'd (/.round sample)]
+ (and (|> round'd frac-to-int int-to-frac (f/= round'd))
+ (f/<= +1.0 (frac@abs (f/- sample round'd))))))
+ )))
+ (<| (_.context "Exponentials and logarithms")
+ (do r.monad
+ [sample (|> r.safe-frac (:: @ map (f/* +10.0)))]
+ (_.test "Logarithm is the inverse of exponential."
+ (|> sample /.exp /.log (within? +1.0e-15 sample)))))
+ (<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple")
+ (do r.monad
+ [#let [gen-nat (|> r.nat (:: @ map (|>> (n/% 1000) (n/max 1))))]
+ x gen-nat
+ y gen-nat]
+ ($_ _.and
+ (_.test "GCD"
+ (let [gcd (/.n/gcd x y)]
+ (and (n/= 0 (n/% gcd x))
+ (n/= 0 (n/% gcd y))
+ (n/>= 1 gcd))))
- (_.test "LCM"
- (let [lcm (/.n/lcm x y)]
- (and (n/= 0 (n/% x lcm))
- (n/= 0 (n/% y lcm))
- (n/<= (n/* x y) lcm))))
- )))
+ (_.test "LCM"
+ (let [lcm (/.n/lcm x y)]
+ (and (n/= 0 (n/% x lcm))
+ (n/= 0 (n/% y lcm))
+ (n/<= (n/* x y) lcm))))
+ )))
- /infix.test
- /modular.test
- /logic/continuous.test
- /logic/fuzzy.test
- ))
+ /infix.test
+ /modular.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 db40f693c..5224700a5 100644
--- a/stdlib/source/test/lux/math/infix.lux
+++ b/stdlib/source/test/lux/math/infix.lux
@@ -12,7 +12,7 @@
(def: #export test
Test
- (<| (_.context (%name (name-of /.infix)))
+ (<| (_.context (%name (name-of /._)))
(do r.monad
[subject r.nat
parameter r.nat
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux
index 293629e18..92b085e6a 100644
--- a/stdlib/source/test/lux/type/resource.lux
+++ b/stdlib/source/test/lux/type/resource.lux
@@ -6,7 +6,8 @@
[abstract
[monad
[indexed (#+ do)]]]
- ["." io]]
+ [control
+ ["." io]]]
{1
["." / (#+ Res)]})
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index 86b031660..b72e8be82 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -5,11 +5,11 @@
["_" test (#+ Test)]
[abstract/monad (#+ do)]
[control
+ ["." io (#+ IO)]
[concurrency
["." promise]]
[security
["!" capability]]]
- ["." io (#+ IO)]
[data
["." error (#+ Error)]
["." text]
diff --git a/stdlib/source/test/lux/world/net/tcp.lux b/stdlib/source/test/lux/world/net/tcp.lux
index b3f9a6d0d..fb4983302 100644
--- a/stdlib/source/test/lux/world/net/tcp.lux
+++ b/stdlib/source/test/lux/world/net/tcp.lux
@@ -4,9 +4,9 @@
["r" math/random (#+ Random)]
["_" test (#+ Test)]
["." abstract/monad (#+ do)]
- ["." io (#+ IO)]
[control
["ex" exception (#+ exception:)]
+ ["." io (#+ IO)]
[concurrency
["." promise (#+ Promise Resolver)]
["." frp ("#@." functor)]]
diff --git a/stdlib/source/test/lux/world/net/udp.lux b/stdlib/source/test/lux/world/net/udp.lux
index 2e61257ad..44765acab 100644
--- a/stdlib/source/test/lux/world/net/udp.lux
+++ b/stdlib/source/test/lux/world/net/udp.lux
@@ -5,6 +5,7 @@
["_" test (#+ Test)]
["." abstract/monad (#+ do)]
[control
+ ["." io]
[concurrency
["." promise]]
[security
@@ -12,7 +13,6 @@
[data
["." error]
["." text]]
- ["." io]
[world
["." binary]
["." net]]]