From ad1391ea1cdd33167339d25dbff2567f5a8d5c68 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 23 Dec 2022 20:58:58 -0400 Subject: Began work on C++ back-end. --- stdlib/source/library/lux/data/color/cmyk.lux | 2 +- .../language/lux/phase/extension/analysis/js.lux | 5 +- .../lux/phase/extension/translation/js/common.lux | 5 +- .../lux/phase/extension/translation/js/host.lux | 5 +- .../compiler/language/lux/phase/translation/js.lux | 6 +- .../language/lux/phase/translation/jvm/host.lux | 50 +++++++++----- .../lux/phase/translation/python/runtime.lux | 14 +++- .../lux/meta/compiler/language/lux/translation.lux | 76 +++++++++++++--------- .../library/lux/meta/macro/syntax/export.lux | 4 +- .../specification/lux/abstract/equivalence.lux | 30 --------- stdlib/source/specification/lux/abstract/hash.lux | 6 +- .../source/specification/lux/abstract/interval.lux | 24 ------- .../source/specification/lux/math/arithmetic.lux | 42 ++++++++---- stdlib/source/specification/lux/world/shell.lux | 6 +- stdlib/source/test/aedifex/artifact.lux | 5 +- stdlib/source/test/aedifex/artifact/snapshot.lux | 6 +- .../test/aedifex/artifact/snapshot/build.lux | 6 +- .../test/aedifex/artifact/snapshot/stamp.lux | 6 +- .../source/test/aedifex/artifact/snapshot/time.lux | 6 +- .../test/aedifex/artifact/snapshot/version.lux | 6 +- .../aedifex/artifact/snapshot/version/value.lux | 6 +- stdlib/source/test/aedifex/artifact/time.lux | 6 +- stdlib/source/test/aedifex/artifact/time/date.lux | 6 +- stdlib/source/test/aedifex/artifact/versioning.lux | 6 +- stdlib/source/test/aedifex/cli.lux | 6 +- stdlib/source/test/aedifex/dependency.lux | 5 +- .../source/test/aedifex/dependency/resolution.lux | 6 +- stdlib/source/test/aedifex/dependency/status.lux | 6 +- stdlib/source/test/aedifex/hash.lux | 8 +-- stdlib/source/test/aedifex/metadata/artifact.lux | 6 +- stdlib/source/test/aedifex/metadata/snapshot.lux | 6 +- stdlib/source/test/aedifex/package.lux | 6 +- stdlib/source/test/aedifex/profile.lux | 6 +- stdlib/source/test/aedifex/project.lux | 6 +- stdlib/source/test/aedifex/repository/identity.lux | 6 +- stdlib/source/test/aedifex/repository/origin.lux | 6 +- stdlib/source/test/aedifex/runtime.lux | 6 +- stdlib/source/test/lux/abstract/equivalence.lux | 30 +++++++-- stdlib/source/test/lux/abstract/interval.lux | 21 +++++- stdlib/source/test/lux/abstract/order.lux | 2 +- stdlib/source/test/lux/control/lazy.lux | 6 +- stdlib/source/test/lux/control/maybe.lux | 5 +- stdlib/source/test/lux/control/try.lux | 6 +- stdlib/source/test/lux/data/any.lux | 5 +- stdlib/source/test/lux/data/binary.lux | 8 +-- stdlib/source/test/lux/data/bit.lux | 5 +- stdlib/source/test/lux/data/collection/array.lux | 8 +-- stdlib/source/test/lux/data/collection/bits.lux | 6 +- .../source/test/lux/data/collection/dictionary.lux | 6 +- .../lux/data/collection/dictionary/ordered.lux | 6 +- stdlib/source/test/lux/data/collection/list.lux | 5 +- .../test/lux/data/collection/list/property.lux | 6 +- stdlib/source/test/lux/data/collection/queue.lux | 6 +- .../source/test/lux/data/collection/sequence.lux | 6 +- stdlib/source/test/lux/data/collection/set.lux | 5 +- .../source/test/lux/data/collection/set/multi.lux | 5 +- .../test/lux/data/collection/set/ordered.lux | 6 +- stdlib/source/test/lux/data/collection/stack.lux | 6 +- stdlib/source/test/lux/data/collection/tree.lux | 6 +- .../test/lux/data/collection/tree/zipper.lux | 6 +- stdlib/source/test/lux/data/color/cmyk.lux | 20 +++--- stdlib/source/test/lux/data/color/hsb.lux | 18 ++--- stdlib/source/test/lux/data/color/hsl.lux | 18 ++--- stdlib/source/test/lux/data/color/rgb.lux | 5 +- stdlib/source/test/lux/data/color/scheme.lux | 5 +- stdlib/source/test/lux/data/color/terminal.lux | 6 +- stdlib/source/test/lux/data/format/json.lux | 7 +- stdlib/source/test/lux/data/format/xml.lux | 6 +- stdlib/source/test/lux/data/product.lux | 6 +- stdlib/source/test/lux/data/sum.lux | 5 +- stdlib/source/test/lux/data/text.lux | 5 +- stdlib/source/test/lux/data/text/unicode/block.lux | 5 +- stdlib/source/test/lux/data/text/unicode/set.lux | 6 +- .../test/lux/math/arithmetic/fixed_point.lux | 10 +-- stdlib/source/test/lux/math/arithmetic/modular.lux | 6 +- stdlib/source/test/lux/math/number/complex.lux | 6 +- stdlib/source/test/lux/math/number/frac.lux | 5 +- stdlib/source/test/lux/math/number/i16.lux | 6 +- stdlib/source/test/lux/math/number/i32.lux | 6 +- stdlib/source/test/lux/math/number/i64.lux | 7 +- stdlib/source/test/lux/math/number/i8.lux | 6 +- stdlib/source/test/lux/math/number/int.lux | 12 ++-- stdlib/source/test/lux/math/number/nat.lux | 12 ++-- stdlib/source/test/lux/math/number/ratio.lux | 6 +- stdlib/source/test/lux/math/number/rev.lux | 12 ++-- stdlib/source/test/lux/meta.lux | 10 ++- stdlib/source/test/lux/meta/code.lux | 6 +- stdlib/source/test/lux/meta/compiler.lux | 2 + .../lux/meta/compiler/language/lux/analysis.lux | 6 +- .../compiler/language/lux/analysis/complex.lux | 5 +- .../compiler/language/lux/analysis/coverage.lux | 6 +- .../meta/compiler/language/lux/analysis/macro.lux | 4 +- .../compiler/language/lux/analysis/pattern.lux | 6 +- .../meta/compiler/language/lux/analysis/simple.lux | 6 +- .../test/lux/meta/compiler/language/lux/phase.lux | 8 ++- .../meta/compiler/language/lux/phase/extension.lux | 5 +- .../language/lux/phase/translation/jvm/host.lux | 66 +++++++++++++++++++ .../language/lux/synthesis/access/member.lux | 5 +- .../language/lux/synthesis/access/side.lux | 5 +- .../compiler/language/lux/synthesis/simple.lux | 5 +- .../lux/meta/compiler/language/lux/translation.lux | 49 +++++++++++--- .../lux/meta/compiler/meta/archive/artifact.lux | 6 +- .../compiler/meta/archive/artifact/category.lux | 6 +- .../compiler/meta/archive/module/descriptor.lux | 6 +- .../lux/meta/compiler/meta/archive/signature.lux | 6 +- .../test/lux/meta/compiler/meta/archive/unit.lux | 5 +- .../test/lux/meta/compiler/meta/cli/compiler.lux | 6 +- stdlib/source/test/lux/meta/compiler/reference.lux | 10 ++- .../test/lux/meta/compiler/reference/variable.lux | 9 ++- stdlib/source/test/lux/meta/configuration.lux | 6 +- stdlib/source/test/lux/meta/location.lux | 6 +- stdlib/source/test/lux/meta/macro.lux | 8 +-- stdlib/source/test/lux/meta/macro/context.lux | 6 +- stdlib/source/test/lux/meta/macro/syntax/check.lux | 6 +- .../test/lux/meta/macro/syntax/declaration.lux | 6 +- .../test/lux/meta/macro/syntax/definition.lux | 6 +- .../source/test/lux/meta/macro/syntax/export.lux | 4 +- stdlib/source/test/lux/meta/macro/syntax/input.lux | 6 +- .../test/lux/meta/macro/syntax/type/variable.lux | 6 +- stdlib/source/test/lux/meta/symbol.lux | 5 +- stdlib/source/test/lux/meta/target/lua.lux | 7 +- stdlib/source/test/lux/meta/target/python.lux | 7 +- stdlib/source/test/lux/meta/target/ruby.lux | 7 +- stdlib/source/test/lux/meta/type.lux | 6 +- stdlib/source/test/lux/meta/type/quotient.lux | 6 +- stdlib/source/test/lux/meta/type/unit.lux | 6 +- .../source/test/lux/world/finance/market/price.lux | 6 +- stdlib/source/test/lux/world/finance/money.lux | 6 +- .../test/lux/world/finance/money/currency.lux | 6 +- .../test/lux/world/finance/trade/session.lux | 6 +- stdlib/source/test/lux/world/locale.lux | 7 +- stdlib/source/test/lux/world/net/http/cookie.lux | 6 +- stdlib/source/test/lux/world/net/http/version.lux | 7 +- stdlib/source/test/lux/world/net/mime.lux | 5 +- stdlib/source/test/lux/world/net/uri/query.lux | 6 +- stdlib/source/test/lux/world/net/uri/scheme.lux | 7 +- .../test/lux/world/output/video/resolution.lux | 7 +- stdlib/source/test/lux/world/shell.lux | 5 +- stdlib/source/test/lux/world/time.lux | 6 +- stdlib/source/test/lux/world/time/date.lux | 6 +- stdlib/source/test/lux/world/time/day.lux | 5 +- stdlib/source/test/lux/world/time/duration.lux | 6 +- stdlib/source/test/lux/world/time/instant.lux | 5 +- stdlib/source/test/lux/world/time/month.lux | 5 +- stdlib/source/test/lux/world/time/series.lux | 6 +- stdlib/source/test/lux/world/time/solar.lux | 4 +- stdlib/source/test/lux/world/time/year.lux | 6 +- 147 files changed, 717 insertions(+), 548 deletions(-) delete mode 100644 stdlib/source/specification/lux/abstract/equivalence.lux delete mode 100644 stdlib/source/specification/lux/abstract/interval.lux create mode 100644 stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux (limited to 'stdlib') diff --git a/stdlib/source/library/lux/data/color/cmyk.lux b/stdlib/source/library/lux/data/color/cmyk.lux index bd0a9d298..dc85a4a97 100644 --- a/stdlib/source/library/lux/data/color/cmyk.lux +++ b/stdlib/source/library/lux/data/color/cmyk.lux @@ -75,7 +75,7 @@ Frac) (f.- it ..most)) -(def .public (cmyk it) +(def .public (of_rgb it) (-> RGB CMYK) (let [red (..down (the rgb.#red it)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/js.lux index 30c217bf3..a703fba70 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/js.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/js.lux @@ -23,10 +23,9 @@ [/// ["[0]" extension] [// + ["[0]" phase] ["[0]" analysis (.only Analysis Operation Phase Handler Bundle) - ["[1]/[0]" type]] - [/// - ["[0]" phase]]]]]) + ["[1]/[0]" type]]]]]) (def array::new (-> Text Handler) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/common.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/common.lux index 3dbaa594b..407f22b4f 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/common.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/common.lux @@ -37,10 +37,9 @@ ["[1][0]" loop] ["[1][0]" function]]] [// + ["[0]" phase (.use "[1]#[0]" monad)] ["[0]" synthesis (.only %synthesis) - ["?[1]" \\parser (.only Parser)]] - [/// - ["[0]" phase (.use "[1]#[0]" monad)]]]]) + ["?[1]" \\parser (.only Parser)]]]]) (def .public (custom [parser handler]) (All (_ s) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/host.lux index 6be0522c3..cae36908d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/host.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/js/host.lux @@ -24,11 +24,10 @@ ["[0]" runtime (.only Operation Phase Handler Bundle with_vars)]]] [// + ["[0]" phase] ["[0]" translation] [synthesis - ["" \\parser (.only Parser)]] - [/// - ["[0]" phase]]]]]) + ["" \\parser (.only Parser)]]]]]) (def array::new (Unary Expression) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js.lux index cd0145243..e5e199068 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js.lux @@ -27,9 +27,9 @@ ["[1]/[0]" common]]]] ["/[1]" // [analysis (.only)] + ["[0]" phase (.use "[1]#[0]" monad)] ["[0]" synthesis] ["//[1]" /// - ["[1][0]" phase (.use "[1]#[0]" monad)] [reference (.only) [variable (.only)]]]]]]]) @@ -42,7 +42,7 @@ (when synthesis (^.with_template [ ] [( @ value) - (//////phase#in ( value))]) + (phase#in ( value))]) ([synthesis.bit /primitive.bit] [synthesis.i64 /primitive.i64] [synthesis.f64 /primitive.f64] @@ -76,7 +76,7 @@ (/loop.scope ///extension/common.statement expression archive scope) (synthesis.loop/again @ updates) - (//////phase.except ..cannot_recur_as_an_expression []) + (phase.except ..cannot_recur_as_an_expression []) (synthesis.function/abstraction @ abstraction) (/function.function ///extension/common.statement expression archive abstraction) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux index efca8fc3e..04ebfa62a 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux @@ -37,14 +37,12 @@ ["[0]" descriptor]]]] [compiler [meta - [io (.only lux_context)] [archive ["[0]" unit]]]]]]] ["[0]" // ["[1][0]" runtime (.only Definition)] ["[1][0]" type] - ["[1][0]" value]] - ) + ["[1][0]" value]]) (import java/lang/reflect/Field "[1]::[0]" @@ -61,10 +59,22 @@ (import java/lang/ClassLoader "[1]::[0]") -(def value::modifier (all modifier#composite field.public field.final field.static)) +(def value::modifier + (all modifier#composite + field.public + field.final + field.static + )) -(def init::type (type.method [(list) (list) type.void (list)])) -(def init::modifier (all modifier#composite method.public method.static method.strict)) +(def init::type + (type.method [(list) (list) type.void (list)])) + +(def init::modifier + (all modifier#composite + method.public + method.static + method.strict + )) (exception.def .public (cannot_load [class error]) (Exception [Text Text]) @@ -85,8 +95,9 @@ (list ["Class" class]))) (def (class_value class_name class) - (-> Text (java/lang/Class java/lang/Object) (Try Any)) - (when (java/lang/Class::getField //value.field class) + (-> Text (java/lang/Class java/lang/Object) + (Try Any)) + (when (java/lang/Class::getField (ffi.as_string //value.field) class) {try.#Success field} (when (java/lang/reflect/Field::get {.#None} field) {try.#Success ?value} @@ -107,7 +118,8 @@ ".") (def (evaluate! library loader eval_class [@it valueG]) - (-> Library java/lang/ClassLoader Text [(Maybe unit.ID) (Bytecode Any)] (Try [Any Definition])) + (-> Library java/lang/ClassLoader Text [(Maybe unit.ID) (Bytecode Any)] + (Try [Any Definition])) (let [bytecode_name (text.replaced class_path_separator .module_separator eval_class) :value: (when @it {.#Some @it} @@ -122,13 +134,13 @@ (encoding/name.internal "java.lang.Object") (list) (list (field.field ..value::modifier //value.field false :value: (sequence.sequence))) (list (method.method ..init::modifier "" - false ..init::type - (list) - {.#Some - (all _.composite - valueG - (_.putstatic (type.class bytecode_name (list)) //value.field :value:) - _.return)})) + false ..init::type + (list) + {.#Some + (all _.composite + valueG + (_.putstatic (type.class bytecode_name (list)) //value.field :value:) + _.return)})) (list))] (io.run! (do [! (try.with io.monad)] [bytecode (of ! each (\\format.result class.format) @@ -140,7 +152,8 @@ [eval_class bytecode]]))))) (def (execute! library loader [class_name class_bytecode]) - (-> Library java/lang/ClassLoader Definition (Try Any)) + (-> Library java/lang/ClassLoader Definition + (Try Any)) (io.run! (do (try.with io.monad) [existing_class? (|> (atom.read! library) (of io.monad each (function (_ library) @@ -153,7 +166,8 @@ (loader.load class_name loader)))) (def (define! library loader context custom @it,valueG) - (-> Library java/lang/ClassLoader unit.ID (Maybe Text) [(Maybe unit.ID) (Bytecode Any)] (Try [Text Any Definition])) + (-> Library java/lang/ClassLoader unit.ID (Maybe Text) [(Maybe unit.ID) (Bytecode Any)] + (Try [Text Any Definition])) (let [class_name (maybe.else (//runtime.class_name context) custom)] (do try.monad diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux index be0a4dd59..4a82f30f1 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux @@ -173,7 +173,12 @@ (with_vars [exception] (_.try (_.return (..right (_.apply (list ..unit) op))) (list [(list "Exception") exception - (_.return (..left (_.str/1 exception)))])))) + (_.return (..left (_.do "join" + (list (_.do "format_exception_only" + (list (_.the "__class__" exception) + exception) + (_.__import__/1 (_.string "traceback")))) + (_.string ""))))])))) (runtime (lux::program_args program_args) @@ -211,7 +216,12 @@ (runtime (io::throw! message) - (_.raise (_.Exception/1 message))) + (_.raise (_.Exception/1 (|> message + (_.+ (_.string text.\n)) + (_.+ (_.do "join" + (list (_.do "format_stack" (list) + (_.__import__/1 (_.string "traceback")))) + (_.string ""))))))) (def runtime//io (Statement Any) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux b/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux index fc6ab8350..5f519f39d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux @@ -108,8 +108,7 @@ (def .public (state host module) (All (_ anchor expression declaration) - (-> (Host expression declaration) - descriptor.Module + (-> (Host expression declaration) descriptor.Module (..State anchor expression declaration))) [#module module #anchor {.#None} @@ -132,7 +131,8 @@ [(exception.def .public ) (def .public - (All (_ anchor expression declaration output) ) + (All (_ anchor expression declaration output) + ) (function (_ body) (function (_ state) (when (body (has {.#Some } state)) @@ -156,7 +156,8 @@ (def .public ( value) (All (_ anchor expression declaration) - (-> (Operation anchor expression declaration Any))) + (-> + (Operation anchor expression declaration Any))) (function (_ state) {try.#Success [(has {.#Some value} state) []]}))] @@ -184,7 +185,8 @@ (def .public (set_registry value) (All (_ anchor expression declaration) - (-> Registry (Operation anchor expression declaration Any))) + (-> Registry + (Operation anchor expression declaration Any))) (function (_ state) {try.#Success [(has #registry value state) []]})) @@ -199,12 +201,14 @@ (def .public (symbol prefix) (All (_ anchor expression declaration) - (-> Text (Operation anchor expression declaration Text))) + (-> Text + (Operation anchor expression declaration Text))) (of phase.monad each (|>> %.nat (format prefix)) ..next)) (def .public (enter_module module) (All (_ anchor expression declaration) - (-> descriptor.Module (Operation anchor expression declaration Any))) + (-> descriptor.Module + (Operation anchor expression declaration Any))) (phase.update (has #module module))) (def .public module @@ -214,7 +218,8 @@ (def .public (evaluate! label code) (All (_ anchor expression declaration) - (-> unit.ID [(Maybe unit.ID) expression] (Operation anchor expression declaration Any))) + (-> unit.ID [(Maybe unit.ID) expression] + (Operation anchor expression declaration Any))) (function (_ state) (when (of (the #host state) evaluate label code) {try.#Success output} @@ -225,7 +230,8 @@ (def .public (execute! code) (All (_ anchor expression declaration) - (-> declaration (Operation anchor expression declaration Any))) + (-> declaration + (Operation anchor expression declaration Any))) (function (_ state) (when (of (the #host state) execute code) {try.#Success output} @@ -236,7 +242,8 @@ (def .public (define! context custom code) (All (_ anchor expression declaration) - (-> unit.ID (Maybe Text) [(Maybe unit.ID) expression] (Operation anchor expression declaration [Text Any declaration]))) + (-> unit.ID (Maybe Text) [(Maybe unit.ID) expression] + (Operation anchor expression declaration [Text Any declaration]))) (function (_ state) (when (of (the #host state) define context custom code) {try.#Success output} @@ -247,7 +254,8 @@ (def .public (save! artifact_id custom code) (All (_ anchor expression declaration) - (-> artifact.ID (Maybe Text) declaration (Operation anchor expression declaration Any))) + (-> artifact.ID (Maybe Text) declaration + (Operation anchor expression declaration Any))) (do [! phase.monad] [?buffer (phase.read (the #buffer))] (when ?buffer @@ -263,7 +271,8 @@ (with_template [ ] [(`` (def .public ( it (,, (template.spliced )) dependencies) (All (_ anchor expression declaration) - (-> (,, (template.spliced )) (Set unit.ID) (Operation anchor expression declaration artifact.ID))) + (-> (,, (template.spliced )) (Set unit.ID) + (Operation anchor expression declaration artifact.ID))) (function (_ state) (let [[id registry'] ( it dependencies (the #registry state))] {try.#Success [(has #registry registry' state) @@ -282,7 +291,8 @@ (def .public (remember archive name) (All (_ anchor expression declaration) - (-> Archive Symbol (Operation anchor expression declaration unit.ID))) + (-> Archive Symbol + (Operation anchor expression declaration unit.ID))) (function (_ state) (let [[_module _name] name] (do try.monad @@ -301,7 +311,8 @@ (def .public (definition archive name) (All (_ anchor expression declaration) - (-> Archive Symbol (Operation anchor expression declaration [unit.ID (Maybe category.Definition)]))) + (-> Archive Symbol + (Operation anchor expression declaration [unit.ID (Maybe category.Definition)]))) (function (_ state) (let [[_module _name] name] (do try.monad @@ -322,7 +333,8 @@ (def .public (module_id module archive) (All (_ anchor expression declaration) - (-> descriptor.Module Archive (Operation anchor expression declaration module.ID))) + (-> descriptor.Module Archive + (Operation anchor expression declaration module.ID))) (function (_ state) (do try.monad [@module (archive.id module archive)] @@ -330,7 +342,8 @@ (def .public (context archive) (All (_ anchor expression declaration) - (-> Archive (Operation anchor expression declaration unit.ID))) + (-> Archive + (Operation anchor expression declaration unit.ID))) (function (_ state) (when (the #context state) {.#None} @@ -342,10 +355,9 @@ (in [state [@module id]]))))) (def .public (with_context @artifact body) - (All (_ anchor expression declaration a) - (-> artifact.ID - (Operation anchor expression declaration a) - (Operation anchor expression declaration a))) + (All (_ anchor expression declaration of) + (-> artifact.ID (Operation anchor expression declaration of) + (Operation anchor expression declaration of))) (function (_ state) (do try.monad [[state' output] (body (has #context {.#Some @artifact} state))] @@ -353,10 +365,9 @@ output])))) (def .public (with_registry_shift shift body) - (All (_ anchor expression declaration a) - (-> Nat - (Operation anchor expression declaration a) - (Operation anchor expression declaration a))) + (All (_ anchor expression declaration of) + (-> Nat (Operation anchor expression declaration of) + (Operation anchor expression declaration of))) (function (_ state) (do try.monad [[state' output] (body (has #registry_shift shift state))] @@ -364,9 +375,9 @@ output])))) (def .public (with_new_context archive dependencies body) - (All (_ anchor expression declaration a) - (-> Archive (Set unit.ID) (Operation anchor expression declaration a) - (Operation anchor expression declaration [unit.ID a]))) + (All (_ anchor expression declaration of) + (-> Archive (Set unit.ID) (Operation anchor expression declaration of) + (Operation anchor expression declaration [unit.ID of]))) (function (_ state) (let [[@artifact registry'] (registry.resource false dependencies (the #registry state)) @artifact (n.+ @artifact (the #registry_shift state))] @@ -381,16 +392,17 @@ output]]))))) (def .public (log! message) - (All (_ anchor expression declaration a) - (-> Text (Operation anchor expression declaration Any))) + (All (_ anchor expression declaration) + (-> Text + (Operation anchor expression declaration Any))) (function (_ state) {try.#Success [(revised #log (sequence.suffix message) state) []]})) (def .public (with_interim_artifacts archive body) - (All (_ anchor expression declaration a) - (-> Archive (Operation anchor expression declaration a) - (Operation anchor expression declaration [(List unit.ID) a]))) + (All (_ anchor expression declaration of) + (-> Archive (Operation anchor expression declaration of) + (Operation anchor expression declaration [(List unit.ID) of]))) (do phase.monad [module (phase.read (the #module))] (function (_ state) diff --git a/stdlib/source/library/lux/meta/macro/syntax/export.lux b/stdlib/source/library/lux/meta/macro/syntax/export.lux index 522fefb6b..3ffff3e05 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/export.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/export.lux @@ -38,5 +38,7 @@ (in default))))) (def .public with - (All (_ a) (-> (Parser a) (Parser [Policy a]))) + (All (_ of) + (-> (Parser of) + (Parser [Policy of]))) (<>.and ..policy)) diff --git a/stdlib/source/specification/lux/abstract/equivalence.lux b/stdlib/source/specification/lux/abstract/equivalence.lux deleted file mode 100644 index 439b33093..000000000 --- a/stdlib/source/specification/lux/abstract/equivalence.lux +++ /dev/null @@ -1,30 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - [monad (.only do)]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] - [math - ["[0]" random (.only Random)]] - [test - ["_" property (.only Test)]]]] - [\\library - ["[0]" / (.only Equivalence)]]) - -(def .public (spec (open "/#[0]") random) - (All (_ a) (-> (Equivalence a) (Random a) Test)) - (do random.monad - [left random - right random] - (<| (_.for [/.Equivalence]) - (_.coverage [/.=] - (let [reflexivity! - (/#= left left) - - symmetry! - (bit#= (/#= left right) - (/#= right left))] - (and reflexivity! - symmetry! - )))))) diff --git a/stdlib/source/specification/lux/abstract/hash.lux b/stdlib/source/specification/lux/abstract/hash.lux index 2b6aa5cd6..28b1c27a2 100644 --- a/stdlib/source/specification/lux/abstract/hash.lux +++ b/stdlib/source/specification/lux/abstract/hash.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)] [number @@ -21,7 +21,7 @@ subject random] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /#equivalence random)) + (equivalenceT.spec /#equivalence random)) (_.coverage [/.Hash /.hash] (if (/#= parameter subject) (n.= (/#hash parameter) (/#hash subject)) diff --git a/stdlib/source/specification/lux/abstract/interval.lux b/stdlib/source/specification/lux/abstract/interval.lux deleted file mode 100644 index 0de229d65..000000000 --- a/stdlib/source/specification/lux/abstract/interval.lux +++ /dev/null @@ -1,24 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - [monad (.only do)] - ["[0]" order]] - [math - ["[0]" random (.only Random)]] - [test - ["_" property (.only Test)]]]] - [\\library - ["[0]" /]]) - -(def .public (spec (open "@//[0]") gen_sample) - (All (_ a) (-> (/.Interval a) (Random a) Test)) - (<| (_.for [/.Interval]) - (do random.monad - [sample gen_sample] - (all _.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/specification/lux/math/arithmetic.lux b/stdlib/source/specification/lux/math/arithmetic.lux index 9b8d1fb7d..1c13f52f5 100644 --- a/stdlib/source/specification/lux/math/arithmetic.lux +++ b/stdlib/source/specification/lux/math/arithmetic.lux @@ -17,25 +17,41 @@ Test)) (do random.monad [any random - .let [zero (- any any) - non_zero (random.only (|>> (= zero) not) + .let [@0 (- any any) + non_zero (random.only (|>> (= @0) not) random)] - left non_zero - right non_zero - .let [one (/ right right)]] + any non_zero + .let [@1 (/ any any) + @2 (+ @1 @1) + @4 (+ @2 @2) + @8 (+ @4 @4) + + power_of_two (all random.either + (in @1) + (in @2) + (in @4) + (in @8) + )] + left power_of_two + right power_of_two] (<| (_.covering /._) (_.for [/.Arithmetic]) (all _.and (_.coverage [/.+ /.-] (and (|> left (+ right) (- right) (= left)) (|> left (- right) (+ right) (= left)) - (|> left (+ zero) (= left)) - (|> left (- zero) (= left)) - (|> left (- left) (= zero)))) + + (|> left (+ @0) (= left)) + (|> left (- @0) (= left)) + + (|> left (- left) (= @0)))) (_.coverage [/.* /./] - (and (|> left (* right) (/ right) (= left)) - (|> left (* one) (= left)) - (|> left (/ one) (= left)) - (|> left (/ left) (= one)) - (|> left (* zero) (= zero)))) + (and (|> left (* @0) (= @0)) + + (|> left (* @1) (= left)) + (|> left (/ @1) (= left)) + + (|> left (/ left) (= @1)) + + (|> left (* @2) (/ @2) (= left)))) )))) diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux index eea350b90..f0248af56 100644 --- a/stdlib/source/specification/lux/world/shell.lux +++ b/stdlib/source/specification/lux/world/shell.lux @@ -70,7 +70,11 @@ (with_expansions [ (these [/.Command /.Argument])] (def .public (spec shell) (-> (/.Shell Async) Test) - (<| (_.for [/.Shell /.Process]) + (<| (_.for [/.Shell + /.execute + + /.Process + /.read /.fail /.write /.destroy /.await]) (do [! random.monad] [message (random.alphabetic 10) seconds (of ! each (|>> (n.% 5) (n.+ 5)) random.nat)] diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index cada52d52..471786919 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -5,8 +5,9 @@ [monad (.only do)] [hash (.only Hash)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [data @@ -45,7 +46,7 @@ /.Artifact] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order] (orderT.spec /.order ..random)) (_.for [/.hash] diff --git a/stdlib/source/test/aedifex/artifact/snapshot.lux b/stdlib/source/test/aedifex/artifact/snapshot.lux index 9094e815b..bdeed5389 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -34,7 +34,7 @@ (_.for [/.Snapshot] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/build.lux b/stdlib/source/test/aedifex/artifact/snapshot/build.lux index 9a5cbba1c..5a0bccfc4 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/build.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/build.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -28,7 +28,7 @@ (_.for [/.Build] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux index a5d3b0e1d..a24916a04 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -37,7 +37,7 @@ (_.for [/.Stamp]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux index af6f8bdb0..9a81b6b54 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/time.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -29,7 +29,7 @@ (_.for [/.Time]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version.lux b/stdlib/source/test/aedifex/artifact/snapshot/version.lux index ba8f44d04..5e28c80e7 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -37,7 +37,7 @@ (_.for [/.Version]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux index f116a0a78..74b2ff039 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -43,7 +43,7 @@ (_.for [/.Value]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [sample random diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux index 912aa30f1..5978f2691 100644 --- a/stdlib/source/test/aedifex/artifact/time.lux +++ b/stdlib/source/test/aedifex/artifact/time.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -38,7 +38,7 @@ (_.for [/.Time]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux index f6fc6c83a..67332e1ca 100644 --- a/stdlib/source/test/aedifex/artifact/time/date.lux +++ b/stdlib/source/test/aedifex/artifact/time/date.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] @@ -46,7 +46,7 @@ candidate random.date] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format /.parser] (|> expected diff --git a/stdlib/source/test/aedifex/artifact/versioning.lux b/stdlib/source/test/aedifex/artifact/versioning.lux index 6b2b504d2..62408f573 100644 --- a/stdlib/source/test/aedifex/artifact/versioning.lux +++ b/stdlib/source/test/aedifex/artifact/versioning.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -36,7 +36,7 @@ (_.for [/.Versioning]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux index b72f3464e..90550b004 100644 --- a/stdlib/source/test/aedifex/cli.lux +++ b/stdlib/source/test/aedifex/cli.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" try]] @@ -109,7 +109,7 @@ (_.for [/.Compilation /.Command] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..command)) + (equivalenceT.spec /.equivalence ..command)) (_.for [/.command] (all _.and diff --git a/stdlib/source/test/aedifex/dependency.lux b/stdlib/source/test/aedifex/dependency.lux index 3a71c655a..6235282ee 100644 --- a/stdlib/source/test/aedifex/dependency.lux +++ b/stdlib/source/test/aedifex/dependency.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [math @@ -29,7 +30,7 @@ (_.for [/.Dependency] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order] (orderT.spec /.order ..random)) (_.for [/.hash] diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 9e67edc86..574f70891 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -3,8 +3,8 @@ [lux (.except all) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try] ["[0]" exception] @@ -436,7 +436,7 @@ (_.for [/.Resolution]) (.all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.empty] (dictionary.empty? /.empty)) diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux index 074394b99..ea13e41c4 100644 --- a/stdlib/source/test/aedifex/dependency/status.lux +++ b/stdlib/source/test/aedifex/dependency/status.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" binary ["[1]T" \\test]]] @@ -35,7 +35,7 @@ (_.for [/.Status] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [payload (binaryT.random 1)] diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux index 55cd89bba..fcdf07984 100644 --- a/stdlib/source/test/aedifex/hash.lux +++ b/stdlib/source/test/aedifex/hash.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [control @@ -42,8 +42,8 @@ (`` (all _.and (_.for [/.equivalence] (all _.and - ($equivalence.spec /.equivalence (..random /.sha1)) - ($equivalence.spec /.equivalence (..random /.md5)) + (equivalenceT.spec /.equivalence (..random /.sha1)) + (equivalenceT.spec /.equivalence (..random /.md5)) )) (_.for [/.data] (all _.and diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index af0474e2f..7d640282a 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe] ["[0]" try (.use "[1]#[0]" functor)] @@ -84,7 +84,7 @@ (maybe.else ""))]]] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index d8c1bbf92..63d8832b9 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe] ["[0]" try (.use "[1]#[0]" functor)] @@ -98,7 +98,7 @@ .let [artifact (the /.#artifact expected)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format /.parser] (|> expected diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index 8f335b753..9db4ecd29 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try]] [data @@ -62,7 +62,7 @@ [[profile package] ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (of ! each product.right ..random))) + (equivalenceT.spec /.equivalence (of ! each product.right ..random))) (_.coverage [/.local?] (/.local? (has /.#origin {//origin.#Local "~/yolo"} package))) diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index 387a9c2aa..80733a9ee 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -4,8 +4,8 @@ [abstract [monad (.only do)] [hash (.only Hash)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -161,7 +161,7 @@ /.Source /.Target /.Name /.Profile] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid ..random)) diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux index f7040ca66..051c470e9 100644 --- a/stdlib/source/test/aedifex/project.lux +++ b/stdlib/source/test/aedifex/project.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -44,7 +44,7 @@ (_.for [/.Project /.project] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid ..random)) diff --git a/stdlib/source/test/aedifex/repository/identity.lux b/stdlib/source/test/aedifex/repository/identity.lux index 8fd54bad8..d82082834 100644 --- a/stdlib/source/test/aedifex/repository/identity.lux +++ b/stdlib/source/test/aedifex/repository/identity.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -24,5 +24,5 @@ (_.for [/.User /.Password /.Identity] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) )))) diff --git a/stdlib/source/test/aedifex/repository/origin.lux b/stdlib/source/test/aedifex/repository/origin.lux index e07040106..238e0aad2 100644 --- a/stdlib/source/test/aedifex/repository/origin.lux +++ b/stdlib/source/test/aedifex/repository/origin.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -24,5 +24,5 @@ (_.for [/.Origin] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) )))) diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux index f48f0eb03..1546092e6 100644 --- a/stdlib/source/test/aedifex/runtime.lux +++ b/stdlib/source/test/aedifex/runtime.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data @@ -40,7 +40,7 @@ runtime ..random] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (,, (with_template [] [(_.coverage [/.default_java /.default_js /.default_python /.default_lua /.default_ruby] diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux index cfdb96682..fffb537ad 100644 --- a/stdlib/source/test/lux/abstract/equivalence.lux +++ b/stdlib/source/test/lux/abstract/equivalence.lux @@ -23,9 +23,27 @@ [test ["_" property (.only Test)]]]] ["[0]" \\polytypic] - ["[0]" \\specification] [\\library - ["[0]" / (.only Equivalence)]]) + ["[0]" /]]) + +(def .public (spec (open "/#[0]") random) + (All (_ of) + (-> (/.Equivalence of) (Random of) + Test)) + (do random.monad + [left random + right random] + (<| (_.for [/.Equivalence]) + (_.coverage [/.=] + (let [reflexivity! + (/#= left left) + + symmetry! + (bit#= (/#= left right) + (/#= right left))] + (and reflexivity! + symmetry! + )))))) (type Variant (.Variant @@ -82,7 +100,7 @@ (for @.old (these) (these (def equivalence - (Equivalence ..Record) + (/.Equivalence ..Record) (\\polytypic.equivalence ..Record)))) (def \\polytypic @@ -90,7 +108,7 @@ (<| (_.covering \\polytypic._) (_.for [\\polytypic.equivalence] (for @.old (_.test "PLACEHOLDER" true) - (\\specification.spec ..equivalence ..random))))) + (..spec ..equivalence ..random))))) (def .public test Test @@ -101,7 +119,7 @@ rightI random.int sample random.nat different (|> random.nat (random.only (|>> (n.= sample) not))) - .let [equivalence (is (Equivalence (Equivalence Nat)) + .let [equivalence (is (/.Equivalence (/.Equivalence Nat)) (implementation (def (= left right) (and (bit#= (of left = leftN leftN) @@ -115,7 +133,7 @@ (_.for [/.functor] (contravariantT.spec equivalence n.equivalence /.functor)) (_.coverage [/.rec] - (let [equivalence (is (Equivalence (List Nat)) + (let [equivalence (is (/.Equivalence (List Nat)) (/.rec (function (_ equivalence) (implementation (def (= left right) diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux index 55f97f711..155770f07 100644 --- a/stdlib/source/test/lux/abstract/interval.lux +++ b/stdlib/source/test/lux/abstract/interval.lux @@ -4,8 +4,8 @@ [abstract [monad (.only do)] ["[0]" order] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe]] [data @@ -21,6 +21,21 @@ [\\library ["[0]" / (.only Interval) (.use "[1]#[0]" equivalence)]]) +(def .public (spec (open "/#[0]") gen_sample) + (All (_ of) + (-> (/.Interval of) (Random of) + Test)) + (<| (_.for [/.Interval]) + (do random.monad + [sample gen_sample] + (all _.and + (_.test "No value is bigger than the top." + (/#< /#top sample)) + (_.test "No value is smaller than the bottom." + (order.> /#order /#bottom sample)) + )))) + + (with_template [ ] [(def .public (Random (Interval Nat)) @@ -254,7 +269,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..interval)) + (equivalenceT.spec /.equivalence ..interval)) ..types ..boundaries diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux index 54e8f3d8d..905813998 100644 --- a/stdlib/source/test/lux/abstract/order.lux +++ b/stdlib/source/test/lux/abstract/order.lux @@ -7,7 +7,7 @@ ["[0]" contravariant ["[1]T" \\test]]] ["[0]" equivalence - ["[1]T" \\specification]]] + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)]] [math diff --git a/stdlib/source/test/lux/control/lazy.lux b/stdlib/source/test/lux/control/lazy.lux index 58ce73b97..9343107fd 100644 --- a/stdlib/source/test/lux/control/lazy.lux +++ b/stdlib/source/test/lux/control/lazy.lux @@ -8,8 +8,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" apply ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" product]] [math @@ -47,7 +47,7 @@ (_.for [/.Lazy] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..lazy random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..lazy random.nat))) (_.for [/.functor] (functorT.spec ..injection ..comparison /.functor)) (_.for [/.apply] diff --git a/stdlib/source/test/lux/control/maybe.lux b/stdlib/source/test/lux/control/maybe.lux index afa6200aa..a9b64e197 100644 --- a/stdlib/source/test/lux/control/maybe.lux +++ b/stdlib/source/test/lux/control/maybe.lux @@ -9,9 +9,10 @@ ["[0]" apply ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid + ["[1]T" \\test]] + ["[0]" equivalence ["[1]T" \\test]]] [control ["[0]" io (.use "[1]#[0]" monad)] @@ -36,7 +37,7 @@ .#None .#Some]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.maybe random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (|>> {.#Some})) diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux index c46699836..b70de3683 100644 --- a/stdlib/source/test/lux/control/try.lux +++ b/stdlib/source/test/lux/control/try.lux @@ -8,8 +8,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" apply ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" io]] @@ -51,7 +51,7 @@ .let [(open "io#[0]") io.monad]]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..attempt random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..attempt random.nat))) (_.for [/.functor] (functorT.spec ..injection ..comparison /.functor)) (_.for [/.apply] diff --git a/stdlib/source/test/lux/data/any.lux b/stdlib/source/test/lux/data/any.lux index 1a8c31c44..da1b7dc55 100644 --- a/stdlib/source/test/lux/data/any.lux +++ b/stdlib/source/test/lux/data/any.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] @@ -24,7 +25,7 @@ []) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 95d26678f..ae70dcf97 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -6,8 +6,8 @@ [equivalence (.only Equivalence)] ["[0]" monad (.only do)] ["[0]" enum] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -489,7 +489,7 @@ length (of ! each (n.% (n.- offset size)) random.nat)] (`` (all _.and (_.for [!.=] - ($equivalence.spec (function (_ left right) + (equivalenceT.spec (function (_ left right) (!.= left right)) (..random size))) (_.coverage [!.empty] @@ -553,7 +553,7 @@ length (of ! each (n.% (n.- offset size)) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random size))) + (equivalenceT.spec /.equivalence (..random size))) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid (..random size))) (_.coverage [/.mix] diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux index 176b3114a..5b2ec3b02 100644 --- a/stdlib/source/test/lux/data/bit.lux +++ b/stdlib/source/test/lux/data/bit.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] ["[0]" monoid @@ -26,7 +27,7 @@ [value random.bit] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.bit)) + (equivalenceT.spec /.equivalence random.bit)) (_.for [/.hash] ($hash.spec /.hash random.bit)) (_.for [/.disjunction] diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index 35b85392a..cad11b974 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -10,8 +10,8 @@ ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data @@ -45,7 +45,7 @@ [size ..bounded_size] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.array size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.array size random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) /.monoid (random.array size random.nat))) (_.for [/.functor] @@ -130,7 +130,7 @@ evens (random.array size (random.only n.even? random.nat))] (`` (all _.and (_.for [!.=] - ($equivalence.spec (function (_ left right) + (equivalenceT.spec (function (_ left right) (!.= n.equivalence left right)) (random.array size random.nat))) (_.for [!.composite] diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux index 965ad8e5a..88c63c8cd 100644 --- a/stdlib/source/test/lux/data/collection/bits.lux +++ b/stdlib/source/test/lux/data/collection/bits.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control [function ["[0]" predicate]]] @@ -38,7 +38,7 @@ (_.for [/.Bits]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [sample ..random] diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index e0757bc7a..a72c0b582 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -6,8 +6,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try] @@ -264,7 +264,7 @@ random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence) (random.dictionary n.hash size random.nat random.nat))) (_.for [/.functor] diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index 410580860..9b50f037c 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -5,8 +5,8 @@ [monad (.only do)] [equivalence (.only Equivalence)] [order (.only Order)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" monad)]] [data @@ -66,7 +66,7 @@ (open "/#[0]") (/.equivalence n.equivalence)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..dictionary n.order random.nat random.nat size))) + (equivalenceT.spec (/.equivalence n.equivalence) (..dictionary n.order random.nat random.nat size))) (_.coverage [/.size] (n.= size (/.size sample))) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index 460565e5f..c9131d41a 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -13,8 +13,9 @@ ["[1]T" \\test]] ["[0]" mix ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe] @@ -54,7 +55,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) ..random)) + (equivalenceT.spec (/.equivalence n.equivalence) ..random)) (_.for [/.hash] (|> random.nat (of random.monad each (|>> list)) diff --git a/stdlib/source/test/lux/data/collection/list/property.lux b/stdlib/source/test/lux/data/collection/list/property.lux index 06d0141a2..c051e4b5c 100644 --- a/stdlib/source/test/lux/data/collection/list/property.lux +++ b/stdlib/source/test/lux/data/collection/list/property.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -48,7 +48,7 @@ shift random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence) (..random size gen_key random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux index 56656e44a..3a388badc 100644 --- a/stdlib/source/test/lux/data/collection/queue.lux +++ b/stdlib/source/test/lux/data/collection/queue.lux @@ -5,8 +5,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] [collection @@ -39,7 +39,7 @@ sample (/.of_list members)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.queue size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.queue size random.nat))) (_.for [/.functor] (functorT.spec ..injection /.equivalence /.functor)) diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index 80f6d06fe..dd392c9e0 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -12,8 +12,8 @@ ["[1]T" \\test]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.only Try)] ["[0]" exception]] @@ -38,7 +38,7 @@ [size (of ! each (n.% 100) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.sequence size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.sequence size random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) /.monoid (random.sequence size random.nat))) (_.for [/.mix] diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index efa67edac..19b44b8bf 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -4,8 +4,9 @@ [abstract [hash (.only Hash)] [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -35,7 +36,7 @@ [size ..gen_nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (random.set n.hash size random.nat))) + (equivalenceT.spec /.equivalence (random.set n.hash size random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (|>> list (/.of_list n.hash))) diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index f22c4c455..981de69d6 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -4,8 +4,9 @@ [abstract [hash (.only Hash)] [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control [function @@ -45,7 +46,7 @@ [diversity (of ! each (n.% 10) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat))) + (equivalenceT.spec /.equivalence (..random diversity n.hash ..count random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (function (_ single) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 45c8a9a9e..6579bfffd 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -4,8 +4,8 @@ [abstract [monad (.only do)] [order (.only Order)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] [collection @@ -55,7 +55,7 @@ empty (/.empty n.order)]] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random sizeL n.order random.nat))) + (equivalenceT.spec /.equivalence (..random sizeL n.order random.nat))) (_.coverage [/.size] (n.= sizeL (/.size setL))) diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux index e18c44196..eb3d7cee8 100644 --- a/stdlib/source/test/lux/data/collection/stack.lux +++ b/stdlib/source/test/lux/data/collection/stack.lux @@ -5,8 +5,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe]] [data @@ -34,7 +34,7 @@ expected_top random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.stack size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.stack size random.nat))) (_.for [/.functor] (functorT.spec ..injection /.equivalence /.functor)) diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index ee6d5a83d..f8d45e7ec 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["//" parser] ["[0]" try] @@ -208,7 +208,7 @@ (_.for [/.equivalence] (|> (..tree random.nat) (of random.monad each product.right) - ($equivalence.spec (/.equivalence n.equivalence)))) + (equivalenceT.spec (/.equivalence n.equivalence)))) (_.for [/.mix] (mixT.spec /.leaf /.equivalence /.mix)) (_.for [/.functor] diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux index 77d9209d8..c8b91e2c1 100644 --- a/stdlib/source/test/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" comonad ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)]] @@ -167,7 +167,7 @@ (open "list#[0]") (list.equivalence n.equivalence)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (of ! each (|>> product.right /.zipper) (//.tree random.nat)))) + (equivalenceT.spec (/.equivalence n.equivalence) (of ! each (|>> product.right /.zipper) (//.tree random.nat)))) (_.for [/.functor] (functorT.spec (|>> tree.leaf /.zipper) /.equivalence /.functor)) (_.for [/.comonad] diff --git a/stdlib/source/test/lux/data/color/cmyk.lux b/stdlib/source/test/lux/data/color/cmyk.lux index 2eda4d6a8..9ee4b6e1d 100644 --- a/stdlib/source/test/lux/data/color/cmyk.lux +++ b/stdlib/source/test/lux/data/color/cmyk.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] @@ -78,16 +78,12 @@ /.#cyan /.#magenta /.#yellow /.#key] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) - (_.coverage [/.cmyk /.rgb] - (and (|> expected_rgb - /.cmyk - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_cmyk - /.rgb - /.cmyk - (of /.equivalence = expected_cmyk)))) + (_.coverage [/.of_rgb /.rgb] + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) )) ))) diff --git a/stdlib/source/test/lux/data/color/hsb.lux b/stdlib/source/test/lux/data/color/hsb.lux index ee8d5f18a..2a3d1c69c 100644 --- a/stdlib/source/test/lux/data/color/hsb.lux +++ b/stdlib/source/test/lux/data/color/hsb.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -70,20 +70,16 @@ (_.for [/.HSB] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.hsb /.hue /.saturation /.brightness] (|> (/.hsb (/.hue expected_hsb) (/.saturation expected_hsb) (/.brightness expected_hsb)) (of /.equivalence = expected_hsb))) (_.coverage [/.of_rgb /.rgb] - (and (|> expected_rgb - /.of_rgb - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_hsb - /.rgb - /.of_rgb - (of /.equivalence = expected_hsb)))) + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) )) ))) diff --git a/stdlib/source/test/lux/data/color/hsl.lux b/stdlib/source/test/lux/data/color/hsl.lux index bbfd8f8da..1de637d08 100644 --- a/stdlib/source/test/lux/data/color/hsl.lux +++ b/stdlib/source/test/lux/data/color/hsl.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -82,7 +82,7 @@ /.#hue /.#saturation /.#luminance] (`` (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.hsl] (|> (/.hsl (the /.#hue expected_hsl) @@ -90,14 +90,10 @@ (the /.#luminance expected_hsl)) (of /.equivalence = expected_hsl))) (_.coverage [/.of_rgb /.rgb] - (and (|> expected_rgb - /.of_rgb - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_hsl - /.rgb - /.of_rgb - (of /.equivalence = expected_hsl)))) + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) (_.coverage [/.saturated] (f.> (the /.#saturation mediocre) diff --git a/stdlib/source/test/lux/data/color/rgb.lux b/stdlib/source/test/lux/data/color/rgb.lux index 2723d5529..089759e56 100644 --- a/stdlib/source/test/lux/data/color/rgb.lux +++ b/stdlib/source/test/lux/data/color/rgb.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -104,7 +105,7 @@ /.#red /.#green /.#blue] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) (_.for [/.addition] diff --git a/stdlib/source/test/lux/data/color/scheme.lux b/stdlib/source/test/lux/data/color/scheme.lux index 2d9ccaf3f..be18c52cc 100644 --- a/stdlib/source/test/lux/data/color/scheme.lux +++ b/stdlib/source/test/lux/data/color/scheme.lux @@ -2,10 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + [monad (.only do)]] [data [collection ["[0]" list]]] diff --git a/stdlib/source/test/lux/data/color/terminal.lux b/stdlib/source/test/lux/data/color/terminal.lux index bcc080a1c..2a3b1c3e9 100644 --- a/stdlib/source/test/lux/data/color/terminal.lux +++ b/stdlib/source/test/lux/data/color/terminal.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text (.use "[1]#[0]" equivalence)] [collection @@ -74,7 +74,7 @@ (_.for [/.Command]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.with] (let [it (/.with command diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 0442d17bc..b97cb1afe 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -5,9 +5,8 @@ [codec (.except)] [monad (.only do)] ["[0]" equivalence (.only Equivalence) - ["[0]/[1]" \\polytypic]] - [\\specification - ["$[0]" equivalence]] + ["[0]/[1]" \\polytypic] + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [control @@ -341,7 +340,7 @@ (_.for [/.JSON]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.codec] (all _.and (codecT.spec /.equivalence /.codec ..random) diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 337ab10b7..73612963a 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -3,8 +3,8 @@ [lux (.except char symbol) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [control @@ -232,7 +232,7 @@ (_.for [/.XML /.#Text /.#Node]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.codec] (codecT.spec /.equivalence /.codec ..random)) diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux index 458264a0f..510c4aadf 100644 --- a/stdlib/source/test/lux/data/product.lux +++ b/stdlib/source/test/lux/data/product.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random] [number @@ -26,7 +26,7 @@ random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence i.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence i.equivalence) (random.and random.nat random.int))) (do random.monad [left random.int diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux index ead537253..97699e4a7 100644 --- a/stdlib/source/test/lux/data/sum.lux +++ b/stdlib/source/test/lux/data/sum.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe]] @@ -31,7 +32,7 @@ shift random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence n.equivalence) (random.or random.nat random.nat))) (_.for [/.hash] ($hash.spec (/.hash n.hash n.hash) diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index e7bd6ac8b..23d12ebe1 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -5,11 +5,12 @@ [monad (.only do)] [equivalence (.only Equivalence)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] [functor ["[0]" contravariant ["[1]T" \\test]]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -863,7 +864,7 @@ (_.for [.Text]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (random.ascii 2))) + (equivalenceT.spec /.equivalence (random.ascii 2))) (_.for [/.hash] ($hash.spec /.hash (random.ascii 1))) (_.for [/.order] diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux index 370740c9a..88261f69a 100644 --- a/stdlib/source/test/lux/data/text/unicode/block.lux +++ b/stdlib/source/test/lux/data/text/unicode/block.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -187,7 +188,7 @@ random.nat)] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.monoid] diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux index 1c62d0eda..21c56d628 100644 --- a/stdlib/source/test/lux/data/text/unicode/set.lux +++ b/stdlib/source/test/lux/data/text/unicode/set.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" product] ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -47,7 +47,7 @@ n.equivalence)]] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.set] (and (n.= (block.start left) diff --git a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux index f02901c87..a41078599 100644 --- a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux +++ b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -64,11 +64,11 @@ (<| (_.for [/.Fixed]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec (/.equivalence @) (..random @))) + (equivalenceT.spec (/.equivalence @) (..random @))) (_.for [/.order /.<] (orderT.spec (/.order @) (..random @))) - (_.for [/.arithmetic] - (arithmeticS.spec (/.equivalence @) (/.arithmetic @) (..random @))) + ... (_.for [/.arithmetic] + ... (arithmeticS.spec (/.equivalence @) (/.arithmetic @) (..random @))) (_.coverage [/.fixed /.units /.sub_units] (/.= @ diff --git a/stdlib/source/test/lux/math/arithmetic/modular.lux b/stdlib/source/test/lux/math/arithmetic/modular.lux index 0d0a85f46..d1e3708d7 100644 --- a/stdlib/source/test/lux/math/arithmetic/modular.lux +++ b/stdlib/source/test/lux/math/arithmetic/modular.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -57,7 +57,7 @@ another (..random subject::%)] (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence (..random subject::%))) + (equivalenceT.spec /.equivalence (..random subject::%))) (_.for [/.order /.<] (orderT.spec /.order (..random subject::%))) (,, (with_template [ ] diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux index fd11abd80..b9a58dfcc 100644 --- a/stdlib/source/test/lux/math/number/complex.lux +++ b/stdlib/source/test/lux/math/number/complex.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -274,7 +274,7 @@ /.#imaginary /.#real]) (all _.and (_.for [/.= /.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.arithmetic] (arithmeticS.spec /.equivalence /.arithmetic ..random)) diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index fbfeb7021..d62c8b287 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -5,10 +5,11 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -104,7 +105,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.safe_frac)) + (equivalenceT.spec /.equivalence random.safe_frac)) (_.for [/.hash] ($hash.spec /.hash random.frac)) (_.for [/.order /.<] diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux index 529f64f4a..28b22aba2 100644 --- a/stdlib/source/test/lux/math/number/i16.lux +++ b/stdlib/source/test/lux/math/number/i16.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i16 /.i64 /.width] (let [actual (|> expected .i64 /.i16 /.i64)] diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux index e3f00275c..1c0ba7c18 100644 --- a/stdlib/source/test/lux/math/number/i32.lux +++ b/stdlib/source/test/lux/math/number/i32.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i32 /.i64 /.width] (let [actual (|> expected .i64 /.i32 /.i64)] diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux index 8a5028a6f..209a53fff 100644 --- a/stdlib/source/test/lux/math/number/i64.lux +++ b/stdlib/source/test/lux/math/number/i64.lux @@ -5,8 +5,9 @@ ["[0]" bit (.use "[1]#[0]" equivalence)]] [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -142,7 +143,7 @@ (function (_ narrow) (of random.functor each narrow random.i64)))]] (all _.and - ($equivalence.spec (of sub sub_equivalence) (random (of sub narrow))) + (equivalenceT.spec (of sub sub_equivalence) (random (of sub narrow))) (_.coverage [/.sub] (let [actual (|> expected .i64 (of sub narrow) (of sub wide))] (/#= expected actual))) @@ -152,7 +153,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.i64)) + (equivalenceT.spec /.equivalence random.i64)) (_.for [/.hash] ($hash.spec /.hash random.i64)) (_.for [/.disjunction] diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux index 67c29698e..eb36cd701 100644 --- a/stdlib/source/test/lux/math/number/i8.lux +++ b/stdlib/source/test/lux/math/number/i8.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i8 /.i64 /.width] (let [actual (|> expected .i64 /.i8 /.i64)] diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux index e8f8969c8..dde18df95 100644 --- a/stdlib/source/test/lux/math/number/int.lux +++ b/stdlib/source/test/lux/math/number/int.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -34,7 +36,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.int)) + (equivalenceT.spec /.equivalence random.int)) (_.for [/.hash] ($hash.spec /.hash random.int)) (_.for [/.order /.<] @@ -42,7 +44,7 @@ (_.for [/.enum] (enumT.spec /.enum random.int)) (_.for [/.interval] - ($interval.spec /.interval random.int)) + (intervalT.spec /.interval random.int)) (,, (with_template [] [(_.for [] (monoidT.spec /.equivalence random.int))] diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux index 32fca4e16..ecce84604 100644 --- a/stdlib/source/test/lux/math/number/nat.lux +++ b/stdlib/source/test/lux/math/number/nat.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -32,7 +34,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.nat)) + (equivalenceT.spec /.equivalence random.nat)) (_.for [/.hash] ($hash.spec /.hash random.nat)) (_.for [/.order /.<] @@ -40,7 +42,7 @@ (_.for [/.enum] (enumT.spec /.enum random.nat)) (_.for [/.interval] - ($interval.spec /.interval random.nat)) + (intervalT.spec /.interval random.nat)) (,, (with_template [ ] [(_.for [ ] (monoidT.spec /.equivalence random.nat))] diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux index c4bfcac60..ecb92de4a 100644 --- a/stdlib/source/test/lux/math/number/ratio.lux +++ b/stdlib/source/test/lux/math/number/ratio.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -46,7 +46,7 @@ (_.for [/.Ratio]) (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order /.<] (orderT.spec /.order ..random)) (,, (with_template [ ] diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux index 94255a012..ce264cdef 100644 --- a/stdlib/source/test/lux/math/number/rev.lux +++ b/stdlib/source/test/lux/math/number/rev.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -34,7 +36,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.rev)) + (equivalenceT.spec /.equivalence random.rev)) (_.for [/.hash] ($hash.spec /.hash random.rev)) (_.for [/.order /.<] @@ -42,7 +44,7 @@ (_.for [/.enum] (enumT.spec /.enum random.rev)) (_.for [/.interval] - ($interval.spec /.interval random.rev)) + (intervalT.spec /.interval random.rev)) (,, (with_template [ ] [(_.for [ ] (monoidT.spec /.equivalence random.rev))] diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 129c67b98..2dec361da 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -42,8 +42,8 @@ ["[1][0]" configuration] ["[1][0]" version] ["[1][0]" type] - ... ["[1][0]" macro] - ... ["[1][0]" static] + ["[1][0]" macro] + ["[1][0]" static] ["[1][0]" extension] ["[1][0]" global] ... ["[1][0]" target (.only) @@ -55,7 +55,6 @@ ... "Ruby" (.,, (.these ["[1]/[0]" ruby])) ... (.,, (.these))))] ["[1][0]" compiler - ... ["[1]/[0]" reference] ... ["[1]/[0]" phase] ... ["[1]/[0]" meta ... ["[1]/[0]" archive] @@ -1055,8 +1054,8 @@ /configuration.test /version.test /type.test - ... /macro.test - ... /static.test + /macro.test + /static.test ... /target.test ... (,, (for @.jvm (,, (these /target/jvm.test)) ... @.old (,, (these /target/jvm.test)) @@ -1069,7 +1068,6 @@ /global.test /compiler.test - ... /compiler/reference.test ... /compiler/meta/archive.test ... /compiler/meta/cli.test ... /compiler/meta/export.test diff --git a/stdlib/source/test/lux/meta/code.lux b/stdlib/source/test/lux/meta/code.lux index f01e5889b..d596cbbe9 100644 --- a/stdlib/source/test/lux/meta/code.lux +++ b/stdlib/source/test/lux/meta/code.lux @@ -3,8 +3,8 @@ [lux (.except local global) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" function] @@ -297,7 +297,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.format] ..for_format) diff --git a/stdlib/source/test/lux/meta/compiler.lux b/stdlib/source/test/lux/meta/compiler.lux index 6cc006874..30e4ce1d9 100644 --- a/stdlib/source/test/lux/meta/compiler.lux +++ b/stdlib/source/test/lux/meta/compiler.lux @@ -12,6 +12,7 @@ ["[0]" / ["[1][0]" arity] ["[1][0]" version] + ["[1][0]" reference] ["[1][0]" language ["[1]/[0]" lux]] ["[1][0]" meta @@ -28,6 +29,7 @@ /arity.test /version.test + /reference.test /language/lux.test diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux index 665322283..a83a697da 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" pipe] @@ -582,7 +582,7 @@ right (..random 2)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 2))) + (equivalenceT.spec /.equivalence (..random 2))) ..test|simple ..test|complex diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux index d09fdc234..b5e4e04ed 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -61,7 +62,7 @@ (_.for [/.Complex /.Variant /.Tuple]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) random)) + (equivalenceT.spec (/.equivalence n.equivalence) random)) (_.for [/.hash] ($hash.spec (/.hash n.hash) random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux index 0d12a11fa..229eec361 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux @@ -3,8 +3,8 @@ [lux (.except Pattern) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] @@ -153,7 +153,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.exhaustive?] (bit#= (/#= {/.#Exhaustive} left) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux index c4c5cd193..99be06385 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux @@ -2,9 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + [monad (.only do)]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)] diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux index ad7342a9a..e30b0bf91 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -50,7 +50,7 @@ right ..random]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format] (bit#= (of /.equivalence = left right) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux index 2de2ce625..2e8a198f3 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -35,7 +35,7 @@ (_.for [/.Simple]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [left ..random diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux index faf76b112..c0ceabbd7 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux @@ -24,7 +24,11 @@ ["[0]" / (.only) [//// [meta - ["[0]" archive]]]]]) + ["[0]" archive]]]]] + ["[0]" / + ["[1][0]" translation + ["[1]/[0]" jvm + ["[1]/[0]" host]]]]) (def (injection value) (All (_ of) @@ -207,4 +211,6 @@ ..test|operation) (_.for [/.Phase] ..test|phase) + + /translation/jvm/host.test ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux index cf64648b9..2ffea9b19 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract ["[0]" monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe] @@ -200,7 +201,7 @@ expected_error (random.lower_cased 1)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) ..random)) + (equivalenceT.spec (/.equivalence n.equivalence) ..random)) (_.for [/.hash] ($hash.spec (/.hash n.hash) ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux new file mode 100644 index 000000000..c311d107a --- /dev/null +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux @@ -0,0 +1,66 @@ +(.require + [library + [lux (.except) + [abstract + [monad (.only do)]] + [control + ["[0]" io] + ["[0]" try] + ["[0]" exception]] + [data + ["[0]" text (.use "[1]#[0]" equivalence)]] + [math + ["[0]" random (.only Random)]] + [meta + [target + [jvm + ["[0]" bytecode] + ["[0]" type]]]] + [test + ["_" property (.only Test)]]]] + [\\library + ["[0]" /]]) + +(def .public test + Test + (<| (_.covering /._) + (do [! random.monad] + [$module random.nat + $artifact random.nat + .let [$unit [$module $artifact]] + expected (random.upper_cased 1)]) + (all _.and + (_.coverage [/.host] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} (bytecode.string expected)]) + {try.#Success actual} + (text#= expected (as Text actual)) + + {try.#Failure error} + false))))) + (_.coverage [/.invalid_value] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} bytecode.aconst_null]) + {try.#Success _} + false + + {try.#Failure error} + (exception.match? /.invalid_value error)))))) + (_.coverage [/.cannot_load] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} (all bytecode.composite + bytecode.lconst_0 + bytecode.lconst_0 + bytecode.ldiv + bytecode.pop2 + (bytecode.string expected) + )]) + {try.#Success _} + false + + {try.#Failure error} + (exception.match? /.cannot_load error)))))) + ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux index b04305686..22eef4b16 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -32,7 +33,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux index 2a7456ab4..a0eac562a 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -32,7 +33,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux index 4f076e84a..ca31f785f 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -36,7 +37,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux b/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux index 8df8dbcbe..af90ed619 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux @@ -6,6 +6,7 @@ [control ["[0]" try]] [data + ["[0]" text (.use "[1]#[0]" equivalence)] [collection ["[0]" list] ["[0]" sequence]]] @@ -17,10 +18,12 @@ ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) - [//// - [meta - [archive - ["[0]" registry]]]]]]) + [// + ["[0]" phase] + [/// + [meta + [archive + ["[0]" registry]]]]]]]) (def dummy_host (/.Host Any Any) @@ -43,16 +46,18 @@ Test (<| (_.covering /._) (do [! random.monad] - [expected_module (random.lower_cased 1)]) + [expected_module (random.lower_cased 1) + expected_prefix (random.lower_cased 2)]) (all _.and - (_.coverage [/.Host] + (_.coverage [/.Host + /.evaluate /.execute /.define /.ingest /.re_learn /.re_load] true) (_.coverage [/.Operation /.Phase] true) (_.for [/.State - /.#module /.#anchor /.#host /.#buffer + /.#anchor /.#host /.#buffer /.#registry /.#registry_shift - /.#counter /.#context /.#log /.#interim_artifacts] + /.#context /.#log /.#interim_artifacts] (all _.and (_.coverage [/.state] (let [it (is (/.State Any Any Any) @@ -67,6 +72,34 @@ (when (the /.#context it) {.#None} true _ false) (sequence.empty? (the /.#log it)) (list.empty? (the /.#interim_artifacts it))))) + (_.for [/.#module] + (all _.and + (_.coverage [/.enter_module /.module] + (|> (do phase.monad + [expected (/.symbol expected_prefix) + _ (/.enter_module expected) + actual /.module] + (in (same? expected actual))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + )) + (_.for [/.#counter] + (all _.and + (_.coverage [/.next] + (|> (do phase.monad + [before /.next + after /.next] + (in (n.= (++ before) after))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + (_.coverage [/.symbol] + (|> (do phase.monad + [it (/.symbol expected_prefix)] + (in (and (not (text#= expected_prefix it)) + (text.starts_with? expected_prefix it)))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + )) )) (_.for [/.Buffer] (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux index bfd6c978e..b233a404b 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -27,7 +27,7 @@ (_.for [/.Artifact /.ID]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) /category.test ))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux index 87220c0fd..c452662f9 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [test @@ -41,5 +41,5 @@ (_.for [/.Category]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) ))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux index 568a27af3..0d7fbae91 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -45,7 +45,7 @@ [expected (..random 5)]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 1))) + (equivalenceT.spec /.equivalence (..random 1))) (_.for [/.Module] (_.coverage [/.runtime] diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux index d8faf1590..2df2ec6cf 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -37,7 +37,7 @@ (_.for [/.Signature]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [left ..random diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux index 21e04fb85..3381e5872 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux @@ -2,8 +2,9 @@ [library [lux (.except) [abstract + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data [collection @@ -28,7 +29,7 @@ (_.for [/.ID]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux index 20084da59..9787f26ca 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -39,7 +39,7 @@ [expected ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format /.parser] (|> expected diff --git a/stdlib/source/test/lux/meta/compiler/reference.lux b/stdlib/source/test/lux/meta/compiler/reference.lux index 49bd3415c..145230014 100644 --- a/stdlib/source/test/lux/meta/compiler/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/reference.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" text (.use "[1]#[0]" equivalence) @@ -40,13 +41,16 @@ (def .public test Test (<| (_.covering /._) - (_.for [/.Reference /.Constant]) + (_.for [/.Reference + /.#Constant /.#Variable + + /.Constant]) (do random.monad [expected_register random.nat expected_constant ..constant]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/reference/variable.lux b/stdlib/source/test/lux/meta/compiler/reference/variable.lux index 9fe14eec1..b25c0e755 100644 --- a/stdlib/source/test/lux/meta/compiler/reference/variable.lux +++ b/stdlib/source/test/lux/meta/compiler/reference/variable.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -25,14 +26,16 @@ (def .public test Test (<| (_.covering /._) - (_.for [/.Variable]) + (_.for [/.Variable + /.#Local /.#Foreign]) (do [! random.monad] [register random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) + (_.coverage [/.self] (when (/.self) (/.self) true diff --git a/stdlib/source/test/lux/meta/configuration.lux b/stdlib/source/test/lux/meta/configuration.lux index b505f54d4..d69a1b339 100644 --- a/stdlib/source/test/lux/meta/configuration.lux +++ b/stdlib/source/test/lux/meta/configuration.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -57,7 +57,7 @@ [expected (..random 5)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 5))) + (equivalenceT.spec /.equivalence (..random 5))) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid (..random 5))) diff --git a/stdlib/source/test/lux/meta/location.lux b/stdlib/source/test/lux/meta/location.lux index c9f60cbfa..f25e08ccf 100644 --- a/stdlib/source/test/lux/meta/location.lux +++ b/stdlib/source/test/lux/meta/location.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text]] [math @@ -30,7 +30,7 @@ (_.for [.Location]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.here] (not (of /.equivalence = (/.here) (/.here)))) diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index e00266211..22b727c45 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -46,8 +46,8 @@ (def !global (template (_ ) - [(is [Text .Global] - [(template.text []) {.#Definition [true .Macro ]}])])) + [(is [Text [Bit .Global]] + [(template.text []) [true {.#Definition [.Macro ]}]])])) (def pow/2 (syntax (_ [number .any]) @@ -87,7 +87,7 @@ .#modules (list [macro_module [.#module_hash 0 .#module_aliases (list) - .#definitions (is (List [Text .Global]) + .#definitions (is (List [Text [Bit .Global]]) (list (!global expansion.log_single!) (!global expansion.log_complete!) (!global expansion.log_total!))) @@ -96,7 +96,7 @@ [current_module [.#module_hash 0 .#module_aliases (list) - .#definitions (is (List [Text .Global]) + .#definitions (is (List [Text [Bit .Global]]) (list (!global ..pow/2) (!global ..pow/4) (!global ..repeated))) diff --git a/stdlib/source/test/lux/meta/macro/context.lux b/stdlib/source/test/lux/meta/macro/context.lux index 49ebbe6db..bdf896ee7 100644 --- a/stdlib/source/test/lux/meta/macro/context.lux +++ b/stdlib/source/test/lux/meta/macro/context.lux @@ -37,7 +37,11 @@ (template.with_locals [' ' ] - (these (/.def [' ] Nat) + (these (/.def + ['] + [] + [] + Nat) (with_expansions [ (template.symbol [.._] [']) (template.symbol [.._] ['])] diff --git a/stdlib/source/test/lux/meta/macro/syntax/check.lux b/stdlib/source/test/lux/meta/macro/syntax/check.lux index aac4bc781..623b944b8 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/check.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/check.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" try]] @@ -33,7 +33,7 @@ (_.for [/.Check]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [[type value] ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux index d92609804..5c313c2df 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try]] [math @@ -35,7 +35,7 @@ (_.for [/.Declaration]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/definition.lux b/stdlib/source/test/lux/meta/macro/syntax/definition.lux index 34289885d..3a7dac855 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/definition.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/definition.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" try] @@ -59,7 +59,7 @@ (_.for [/.Definition]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random diff --git a/stdlib/source/test/lux/meta/macro/syntax/export.lux b/stdlib/source/test/lux/meta/macro/syntax/export.lux index e56294445..888e85c6b 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/export.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/export.lux @@ -31,14 +31,14 @@ (<| (_.covering /._) (do random.monad [[expected_export_policy expected_un_exported] ..export] - (_.coverage [/.parser /.default] + (_.coverage [/.with /.default] (|> (when expected_export_policy {.#Some expected_export_policy} (list expected_export_policy (code.nat expected_un_exported)) {.#None} (list (code.nat expected_un_exported))) - (.result (/.parser .nat)) + (.result (/.with .nat)) (try#each (function (_ [actual_export_policy actual_un_exported]) (|> expected_export_policy (maybe.else /.default) diff --git a/stdlib/source/test/lux/meta/macro/syntax/input.lux b/stdlib/source/test/lux/meta/macro/syntax/input.lux index e623431df..cbd57d603 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/input.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/input.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try]] [data @@ -37,7 +37,7 @@ (_.for [/.Input]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux index 45356cb5a..2df5cdd90 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [math @@ -27,7 +27,7 @@ (_.for [/.Variable]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux index 9751bc770..430217ed4 100644 --- a/stdlib/source/test/lux/meta/symbol.lux +++ b/stdlib/source/test/lux/meta/symbol.lux @@ -4,10 +4,11 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [data @@ -44,7 +45,7 @@ (_.for [.Symbol] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random sizeM1 sizeS1))) + (equivalenceT.spec /.equivalence (..random sizeM1 sizeS1))) (_.for [/.hash] (|> (random.ascii 1) (of ! each (|>> [""])) diff --git a/stdlib/source/test/lux/meta/target/lua.lux b/stdlib/source/test/lux/meta/target/lua.lux index 967f1a9f3..68012d0a8 100644 --- a/stdlib/source/test/lux/meta/target/lua.lux +++ b/stdlib/source/test/lux/meta/target/lua.lux @@ -5,8 +5,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" function] @@ -710,7 +711,7 @@ (_.for [/.Code /.code]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random)) + (equivalenceT.spec /.equivalence random)) (_.for [/.hash] ($hash.spec /.hash random)) diff --git a/stdlib/source/test/lux/meta/target/python.lux b/stdlib/source/test/lux/meta/target/python.lux index 3e0beef03..9d7e28a49 100644 --- a/stdlib/source/test/lux/meta/target/python.lux +++ b/stdlib/source/test/lux/meta/target/python.lux @@ -5,8 +5,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] @@ -828,7 +829,7 @@ (_.for [/.Code]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_expression)) + (equivalenceT.spec /.equivalence ..random_expression)) (_.for [/.hash] ($hash.spec /.hash ..random_expression)) diff --git a/stdlib/source/test/lux/meta/target/ruby.lux b/stdlib/source/test/lux/meta/target/ruby.lux index 77cc6fa30..900e630e7 100644 --- a/stdlib/source/test/lux/meta/target/ruby.lux +++ b/stdlib/source/test/lux/meta/target/ruby.lux @@ -2,12 +2,11 @@ [library [lux (.except) ["[0]" ffi] - ["[0]" debug] [abstract [monad (.only do)] ["[0]" predicate] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)] @@ -1050,7 +1049,7 @@ (_.for [/.Code]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_expression)) + (equivalenceT.spec /.equivalence ..random_expression)) (_.coverage [/.code /.manual] (|> (/.manual (/.code expected)) diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index 21d6d1d8e..949a46d68 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -3,8 +3,8 @@ [lux (.except symbol) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" pipe] @@ -384,7 +384,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 0))) + (equivalenceT.spec /.equivalence (..random 0))) (do [! random.monad] [anonymousT (random.only (|>> (pipe.when {.#Named _ _} false diff --git a/stdlib/source/test/lux/meta/type/quotient.lux b/stdlib/source/test/lux/meta/type/quotient.lux index cc4981b31..d99d40cc5 100644 --- a/stdlib/source/test/lux/meta/type/quotient.lux +++ b/stdlib/source/test/lux/meta/type/quotient.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text (.use "[1]#[0]" equivalence) ["%" \\format (.only format)]]] @@ -37,7 +37,7 @@ value random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence text.equivalence) + (equivalenceT.spec (/.equivalence text.equivalence) (..random (/.class class) random.nat))) (_.for [/.Class] diff --git a/stdlib/source/test/lux/meta/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index 0a9979c03..074b2fb20 100644 --- a/stdlib/source/test/lux/meta/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux @@ -4,10 +4,10 @@ [abstract [monad (.only do)] [equivalence (.only Equivalence)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [data @@ -43,7 +43,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..meter 1,000))) + (equivalenceT.spec /.equivalence (..meter 1,000))) (_.for [/.order] (orderT.spec /.order (..meter 1,000))) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/finance/market/price.lux b/stdlib/source/test/lux/world/finance/market/price.lux index d5b8232b5..28c0db1f5 100644 --- a/stdlib/source/test/lux/world/finance/market/price.lux +++ b/stdlib/source/test/lux/world/finance/market/price.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -43,7 +43,7 @@ (_.for [/.Price /.Action]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec /.equivalence (..random currency.usd))) + (equivalenceT.spec /.equivalence (..random currency.usd))) (_.for [/.order /.<] (orderT.spec /.order (..random currency.usd))) diff --git a/stdlib/source/test/lux/world/finance/money.lux b/stdlib/source/test/lux/world/finance/money.lux index dd5108cac..872414dbf 100644 --- a/stdlib/source/test/lux/world/finance/money.lux +++ b/stdlib/source/test/lux/world/finance/money.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -46,7 +46,7 @@ (_.for [/.Money]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec /.equivalence (..random currency.usd 1000,00))) + (equivalenceT.spec /.equivalence (..random currency.usd 1000,00))) (_.for [/.order /.<] (orderT.spec /.order (..random currency.usd 1000,00))) diff --git a/stdlib/source/test/lux/world/finance/money/currency.lux b/stdlib/source/test/lux/world/finance/money/currency.lux index eeb59e9fc..8bc474b4e 100644 --- a/stdlib/source/test/lux/world/finance/money/currency.lux +++ b/stdlib/source/test/lux/world/finance/money/currency.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text] [collection @@ -217,7 +217,7 @@ (_.for [/.Currency]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (with_expansions [ (with_template [ ] [] diff --git a/stdlib/source/test/lux/world/finance/trade/session.lux b/stdlib/source/test/lux/world/finance/trade/session.lux index 6c8be3332..1356e040b 100644 --- a/stdlib/source/test/lux/world/finance/trade/session.lux +++ b/stdlib/source/test/lux/world/finance/trade/session.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)] @@ -60,7 +60,7 @@ /.#open /.#high /.#low /.#close /.#volume]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random currency.usd 1000,00))) + (equivalenceT.spec /.equivalence (..random currency.usd 1000,00))) (_.coverage [/.composite] (let [both (/.composite before after)] diff --git a/stdlib/source/test/lux/world/locale.lux b/stdlib/source/test/lux/world/locale.lux index 57ae892a0..92510dd26 100644 --- a/stdlib/source/test/lux/world/locale.lux +++ b/stdlib/source/test/lux/world/locale.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [data @@ -52,7 +53,7 @@ (_.for [/.Locale]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_locale)) + (equivalenceT.spec /.equivalence ..random_locale)) (_.for [/.hash] (do [! random.monad] [fixed_language ..random_language diff --git a/stdlib/source/test/lux/world/net/http/cookie.lux b/stdlib/source/test/lux/world/net/http/cookie.lux index 057da292b..ac1f9629a 100644 --- a/stdlib/source/test/lux/world/net/http/cookie.lux +++ b/stdlib/source/test/lux/world/net/http/cookie.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract ["[0]" monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["|" pipe] ["[0]" try (.use "[1]#[0]" functor)]] @@ -53,7 +53,7 @@ (_.for [/.Cookie /.#name /.#in /.#out]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random (list [cookie (random.lower_cased 1)])))) + (equivalenceT.spec /.equivalence (..random (list [cookie (random.lower_cased 1)])))) (_.for [/.Jar] (all _.and (_.coverage [/.empty] diff --git a/stdlib/source/test/lux/world/net/http/version.lux b/stdlib/source/test/lux/world/net/http/version.lux index 0aa682b1a..5891f3768 100644 --- a/stdlib/source/test/lux/world/net/http/version.lux +++ b/stdlib/source/test/lux/world/net/http/version.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list] @@ -36,7 +37,7 @@ (_.for [/.Version]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/net/mime.lux b/stdlib/source/test/lux/world/net/mime.lux index 30b34affc..18f6521c1 100644 --- a/stdlib/source/test/lux/world/net/mime.lux +++ b/stdlib/source/test/lux/world/net/mime.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]]] [data ["[0]" text (.only) @@ -157,7 +158,7 @@ (_.for [/.MIME]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/net/uri/query.lux b/stdlib/source/test/lux/world/net/uri/query.lux index 4ac981426..dd48316e2 100644 --- a/stdlib/source/test/lux/world/net/uri/query.lux +++ b/stdlib/source/test/lux/world/net/uri/query.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [data @@ -35,7 +35,7 @@ (_.for [/.Query]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random 2))) + (equivalenceT.spec /.equivalence (..random 2))) (_.for [/.codec] (codecT.spec /.equivalence /.codec (..random 3))) diff --git a/stdlib/source/test/lux/world/net/uri/scheme.lux b/stdlib/source/test/lux/world/net/uri/scheme.lux index 66d51ea0d..200b0fce5 100644 --- a/stdlib/source/test/lux/world/net/uri/scheme.lux +++ b/stdlib/source/test/lux/world/net/uri/scheme.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list] @@ -58,7 +59,7 @@ (_.for [/.Scheme]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux index 4123a0b7d..c05173d2a 100644 --- a/stdlib/source/test/lux/world/output/video/resolution.lux +++ b/stdlib/source/test/lux/world/output/video/resolution.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe]] [data @@ -57,7 +58,7 @@ (_.for [/.Resolution]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index 03dff9dba..12788d7b2 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -86,7 +86,10 @@ Test (<| (_.covering /._) (all _.and - (_.for [/.async /.mock /.Mock] + (_.for [/.Mock /.mock + /.on_read /.on_fail /.on_write /.on_destroy /.on_await + + /.async] ($/.spec (/.async (/.mock (|>> ..mock {try.#Success}) false)))) (_.coverage [/.error] diff --git a/stdlib/source/test/lux/world/time.lux b/stdlib/source/test/lux/world/time.lux index bc049bc44..44f9bee82 100644 --- a/stdlib/source/test/lux/world/time.lux +++ b/stdlib/source/test/lux/world/time.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -42,7 +42,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.time)) + (equivalenceT.spec /.equivalence random.time)) (_.for [/.order] (orderT.spec /.order random.time)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/date.lux b/stdlib/source/test/lux/world/time/date.lux index 306b3e252..4e9fa5c0a 100644 --- a/stdlib/source/test/lux/world/time/date.lux +++ b/stdlib/source/test/lux/world/time/date.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -34,7 +34,7 @@ (_.for [/.Date]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.date)) + (equivalenceT.spec /.equivalence random.date)) (_.for [/.order] (orderT.spec /.order random.date)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/day.lux b/stdlib/source/test/lux/world/time/day.lux index d0ac6f1d6..be1812d92 100644 --- a/stdlib/source/test/lux/world/time/day.lux +++ b/stdlib/source/test/lux/world/time/day.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -51,7 +52,7 @@ random.nat)]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/duration.lux b/stdlib/source/test/lux/world/time/duration.lux index 7900331b8..e38755dc0 100644 --- a/stdlib/source/test/lux/world/time/duration.lux +++ b/stdlib/source/test/lux/world/time/duration.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -31,7 +31,7 @@ (_.for [/.Duration]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.duration)) + (equivalenceT.spec /.equivalence random.duration)) (_.for [/.order] (orderT.spec /.order random.duration)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux index 03abc29c7..889cfa612 100644 --- a/stdlib/source/test/lux/world/time/instant.lux +++ b/stdlib/source/test/lux/world/time/instant.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -37,7 +38,7 @@ (_.for [/.Instant]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.instant)) + (equivalenceT.spec /.equivalence random.instant)) (_.for [/.hash] ($hash.spec /.hash random.instant)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/month.lux b/stdlib/source/test/lux/world/time/month.lux index 9d1f05ab6..29cb2d725 100644 --- a/stdlib/source/test/lux/world/time/month.lux +++ b/stdlib/source/test/lux/world/time/month.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -45,7 +46,7 @@ (_.for [/.Month]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/series.lux b/stdlib/source/test/lux/world/time/series.lux index a43c1b682..26ca412de 100644 --- a/stdlib/source/test/lux/world/time/series.lux +++ b/stdlib/source/test/lux/world/time/series.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection)]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["|" pipe] ["[0]" try (.use "[1]#[0]" functor)] @@ -77,7 +77,7 @@ /.#start /.#interval /.#data]) (`` (all _.and (_.for [/.equivalence] - (equivalenceS.spec (/.equivalence n.equivalence) (..random expected_size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..random expected_size random.nat))) (_.for [/.mix] (mixT.spec (..injection expected_start expected_interval) /.equivalence /.mix)) (_.for [/.functor] diff --git a/stdlib/source/test/lux/world/time/solar.lux b/stdlib/source/test/lux/world/time/solar.lux index 5ffe2f1bd..069470205 100644 --- a/stdlib/source/test/lux/world/time/solar.lux +++ b/stdlib/source/test/lux/world/time/solar.lux @@ -2,9 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + [monad (.only do)]] [control ["[0]" try] ["[0]" exception] diff --git a/stdlib/source/test/lux/world/time/year.lux b/stdlib/source/test/lux/world/time/year.lux index fc8504e80..c3ad7a790 100644 --- a/stdlib/source/test/lux/world/time/year.lux +++ b/stdlib/source/test/lux/world/time/year.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -40,7 +40,7 @@ (_.for [/.Year]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order] (orderT.spec /.order ..random)) (_.for [/.codec /.parser] -- cgit v1.2.3