From 1bead83039b77e360ba3c8bb8237115fefc2bc2e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 4 Sep 2023 03:23:14 -0400 Subject: [PATCH] Added `=` `alias`es for most `equivalence`s. --- lux-r/source/program.lux | 2 +- stdlib/source/documentation/lux.lux | 4 +- .../source/documentation/lux/meta/static.lux | 11 +- stdlib/source/experiment/tool/interpreter.lux | 4 +- stdlib/source/injection/lux/data/binary.lux | 33 ++-- stdlib/source/injection/lux/data/text.lux | 17 +- .../source/library/lux/abstract/interval.lux | 3 + stdlib/source/library/lux/control/aspect.lux | 19 +- .../library/lux/control/function/contract.lux | 8 +- .../library/lux/control/function/named.lux | 5 +- .../control/function/polymorphism/context.lux | 4 +- .../function/polymorphism/predicate.lux | 4 +- .../control/function/polymorphism/type.lux | 4 +- .../library/lux/control/function/variadic.lux | 5 +- .../lux/control/security/capability.lux | 5 +- stdlib/source/library/lux/data/any.lux | 3 + stdlib/source/library/lux/data/binary.lux | 3 + stdlib/source/library/lux/data/bit.lux | 3 + .../lux/data/collection/list/property.lux | 10 +- .../library/lux/data/collection/set.lux | 3 + stdlib/source/library/lux/data/color/cmyk.lux | 3 + stdlib/source/library/lux/data/color/hsb.lux | 3 + stdlib/source/library/lux/data/color/hsl.lux | 3 + stdlib/source/library/lux/data/color/rgb.lux | 3 + .../library/lux/data/color/terminal.lux | 9 +- .../source/library/lux/data/format/json.lux | 7 +- stdlib/source/library/lux/data/format/tar.lux | 4 +- stdlib/source/library/lux/data/format/xml.lux | 14 +- stdlib/source/library/lux/data/text.lux | 3 + .../library/lux/data/text/unicode/block.lux | 3 + .../library/lux/data/text/unicode/set.lux | 7 +- stdlib/source/library/lux/debug.lux | 29 ++-- stdlib/source/library/lux/documentation.lux | 38 ++-- .../library/lux/documentation/remember.lux | 2 +- stdlib/source/library/lux/ffi.jvm.lux | 14 +- stdlib/source/library/lux/ffi.lux | 4 +- stdlib/source/library/lux/math.lux | 52 +++--- .../library/lux/math/number/complex.lux | 11 +- .../source/library/lux/math/number/frac.lux | 12 +- stdlib/source/library/lux/math/number/i16.lux | 4 + stdlib/source/library/lux/math/number/i32.lux | 4 + stdlib/source/library/lux/math/number/i64.lux | 3 + stdlib/source/library/lux/math/number/i8.lux | 4 + stdlib/source/library/lux/meta/binding.lux | 83 ++------- .../source/library/lux/meta/binding/local.lux | 114 ++++++++++++ stdlib/source/library/lux/meta/code.lux | 12 +- .../lux/meta/compiler/default/init.lux | 4 +- .../lux/meta/compiler/default/platform.lux | 17 +- .../meta/compiler/language/lux/analysis.lux | 13 +- .../language/lux/analysis/complex.lux | 4 +- .../language/lux/analysis/coverage.lux | 19 +- .../language/lux/analysis/inference.lux | 6 +- .../compiler/language/lux/analysis/macro.lux | 5 +- .../compiler/language/lux/analysis/module.lux | 13 +- .../language/lux/analysis/pattern.lux | 3 + .../compiler/language/lux/analysis/scope.lux | 4 +- .../compiler/language/lux/analysis/simple.lux | 11 +- .../compiler/language/lux/analysis/type.lux | 3 +- .../language/lux/phase/analysis/complex.lux | 25 +-- .../language/lux/phase/analysis/function.lux | 4 +- .../language/lux/phase/analysis/when.lux | 6 +- .../compiler/language/lux/phase/extension.lux | 14 +- .../lux/phase/extension/analysis/jvm.lux | 52 +++--- .../lux/phase/extension/analysis/lux.lux | 7 +- .../lux/phase/extension/declaration/lux.lux | 4 +- .../lux/phase/extension/synthesis/lux.lux | 4 +- .../phase/extension/translation/jvm/host.lux | 10 +- .../language/lux/phase/synthesis/when.lux | 6 +- .../language/lux/phase/translation/c++.lux | 18 +- .../lux/phase/translation/c++/when.lux | 14 +- .../phase/translation/common_lisp/runtime.lux | 2 +- .../lux/phase/translation/js/runtime.lux | 2 +- .../language/lux/phase/translation/jvm.lux | 4 +- .../lux/phase/translation/jvm/value.lux | 4 +- .../lux/phase/translation/jvm/when.lux | 10 +- .../lux/phase/translation/lua/runtime.lux | 2 +- .../lux/phase/translation/php/runtime.lux | 2 +- .../lux/phase/translation/r/runtime.lux | 2 +- .../lux/phase/translation/ruby/runtime.lux | 4 +- .../lux/phase/translation/scheme/runtime.lux | 2 +- .../lux/meta/compiler/language/lux/syntax.lux | 2 +- .../meta/compiler/language/lux/synthesis.lux | 23 +-- .../language/lux/synthesis/access.lux | 3 + .../language/lux/synthesis/access/member.lux | 3 + .../language/lux/synthesis/access/side.lux | 3 + .../language/lux/synthesis/simple.lux | 17 +- .../compiler/language/lux/translation.lux | 6 +- .../lux/meta/compiler/meta/archive.lux | 16 +- .../meta/compiler/meta/archive/artifact.lux | 3 + .../meta/archive/artifact/category.lux | 7 +- .../meta/archive/artifact/definition.lux | 3 + .../meta/archive/module/descriptor.lux | 3 + .../compiler/meta/archive/module/document.lux | 9 +- .../meta/compiler/meta/archive/signature.lux | 5 +- .../lux/meta/compiler/meta/archive/unit.lux | 3 + .../lux/meta/compiler/meta/cache/module.lux | 4 +- .../lux/meta/compiler/meta/cache/purge.lux | 6 +- .../library/lux/meta/compiler/meta/cli.lux | 23 +-- .../lux/meta/compiler/meta/cli/compiler.lux | 3 + .../lux/meta/compiler/meta/io/archive.lux | 6 +- .../library/lux/meta/compiler/reference.lux | 5 +- .../lux/meta/compiler/reference/variable.lux | 3 + .../library/lux/meta/compiler/target/c++.lux | 4 +- .../meta/compiler/target/jvm/attribute.lux | 3 + .../target/jvm/attribute/code/exception.lux | 3 + .../target/jvm/attribute/constant.lux | 3 + .../jvm/attribute/line_number_table.lux | 3 + .../lux/meta/compiler/target/jvm/bytecode.lux | 3 +- .../compiler/target/jvm/bytecode/address.lux | 3 + .../target/jvm/bytecode/environment/limit.lux | 6 +- .../bytecode/environment/limit/registry.lux | 6 +- .../jvm/bytecode/environment/limit/stack.lux | 3 + .../compiler/target/jvm/bytecode/jump.lux | 3 + .../lux/meta/compiler/target/jvm/class.lux | 3 + .../lux/meta/compiler/target/jvm/constant.lux | 3 + .../compiler/target/jvm/constant/pool.lux | 3 + .../meta/compiler/target/jvm/constant/tag.lux | 3 + .../compiler/target/jvm/encoding/signed.lux | 3 + .../compiler/target/jvm/encoding/unsigned.lux | 8 +- .../lux/meta/compiler/target/jvm/field.lux | 3 + .../lux/meta/compiler/target/jvm/index.lux | 3 + .../lux/meta/compiler/target/jvm/method.lux | 3 + .../lux/meta/compiler/target/jvm/modifier.lux | 3 + .../meta/compiler/target/jvm/reflection.lux | 16 +- .../lux/meta/compiler/target/jvm/type.lux | 3 + .../compiler/target/jvm/type/descriptor.lux | 7 +- .../lux/meta/compiler/target/jvm/type/lux.lux | 4 +- .../compiler/target/jvm/type/reflection.lux | 7 +- .../compiler/target/jvm/type/signature.lux | 5 +- .../source/library/lux/meta/configuration.lux | 7 +- stdlib/source/library/lux/meta/label.lux | 22 +-- stdlib/source/library/lux/meta/location.lux | 7 +- .../source/library/lux/meta/macro/context.lux | 4 +- .../library/lux/meta/macro/expansion.lux | 2 +- .../library/lux/meta/macro/syntax/check.lux | 3 + .../lux/meta/macro/syntax/declaration.lux | 3 + .../lux/meta/macro/syntax/definition.lux | 5 +- .../library/lux/meta/macro/syntax/input.lux | 3 + .../lux/meta/macro/syntax/type/variable.lux | 3 + .../source/library/lux/meta/module/import.lux | 4 +- stdlib/source/library/lux/meta/symbol.lux | 13 +- stdlib/source/library/lux/meta/type.lux | 18 +- stdlib/source/library/lux/meta/type/check.lux | 10 +- .../source/library/lux/meta/type/dynamic.lux | 4 +- .../source/library/lux/meta/type/implicit.lux | 40 +++-- .../source/library/lux/meta/type/nominal.lux | 4 +- stdlib/source/library/lux/meta/type/poly.lux | 6 +- stdlib/source/library/lux/meta/type/unit.lux | 3 + stdlib/source/library/lux/meta/version.lux | 4 +- stdlib/source/library/lux/music/chord.lux | 3 + stdlib/source/library/lux/music/mode.lux | 4 +- stdlib/source/library/lux/music/scale.lux | 3 + stdlib/source/library/lux/test/inline.lux | 2 +- stdlib/source/library/lux/test/property.lux | 2 +- stdlib/source/library/lux/test/unit.lux | 3 +- .../source/library/lux/world/environment.lux | 6 +- stdlib/source/library/lux/world/file.lux | 22 +-- .../source/library/lux/world/file/watch.lux | 4 +- .../lux/world/finance/market/price.lux | 7 +- .../library/lux/world/finance/money.lux | 9 +- .../lux/world/finance/money/currency.lux | 3 + .../lux/world/finance/trade/session.lux | 3 + .../lux/world/finance/trade/volume.lux | 3 + stdlib/source/library/lux/world/locale.lux | 3 + .../library/lux/world/locale/language.lux | 3 + .../library/lux/world/locale/territory.lux | 3 + .../library/lux/world/net/http/server.lux | 4 +- .../library/lux/world/net/http/version.lux | 5 +- stdlib/source/library/lux/world/net/mime.lux | 3 + .../library/lux/world/net/uri/query.lux | 3 + .../library/lux/world/net/uri/scheme.lux | 3 + .../lux/world/output/video/resolution.lux | 3 + stdlib/source/library/lux/world/time.lux | 3 + stdlib/source/library/lux/world/time/date.lux | 3 + stdlib/source/library/lux/world/time/day.lux | 3 + .../library/lux/world/time/duration.lux | 3 + .../source/library/lux/world/time/instant.lux | 3 + .../source/library/lux/world/time/month.lux | 3 + .../source/library/lux/world/time/series.lux | 2 +- stdlib/source/library/lux/world/time/year.lux | 3 + stdlib/source/program/aedifex/artifact.lux | 7 +- .../program/aedifex/artifact/snapshot.lux | 3 + .../aedifex/artifact/snapshot/build.lux | 3 + .../aedifex/artifact/snapshot/stamp.lux | 3 + .../aedifex/artifact/snapshot/time.lux | 3 + .../aedifex/artifact/snapshot/version.lux | 3 + .../artifact/snapshot/version/value.lux | 3 + .../source/program/aedifex/artifact/time.lux | 3 + .../program/aedifex/artifact/time/date.lux | 7 +- .../program/aedifex/artifact/versioning.lux | 3 + stdlib/source/program/aedifex/cli.lux | 3 + .../source/program/aedifex/command/build.lux | 10 +- stdlib/source/program/aedifex/dependency.lux | 5 +- .../program/aedifex/dependency/resolution.lux | 3 + .../program/aedifex/dependency/status.lux | 3 + stdlib/source/program/aedifex/hash.lux | 3 + stdlib/source/program/aedifex/injection.lux | 4 +- .../program/aedifex/metadata/artifact.lux | 3 + .../program/aedifex/metadata/snapshot.lux | 3 + stdlib/source/program/aedifex/package.lux | 3 + stdlib/source/program/aedifex/profile.lux | 15 +- stdlib/source/program/aedifex/project.lux | 3 + .../program/aedifex/repository/identity.lux | 3 + .../program/aedifex/repository/origin.lux | 3 + stdlib/source/program/aedifex/runtime.lux | 3 + .../projection/lux/data/format/json.lux | 4 +- .../source/projection/lux/data/format/xml.lux | 4 +- stdlib/source/projection/lux/meta/code.lux | 4 +- stdlib/source/projection/lux/meta/type.lux | 12 +- stdlib/source/projection/lux/program.lux | 4 +- stdlib/source/test/aedifex/artifact.lux | 4 +- .../test/aedifex/artifact/extension.lux | 6 +- .../artifact/snapshot/version/value.lux | 4 +- stdlib/source/test/aedifex/artifact/time.lux | 4 +- .../test/aedifex/artifact/time/date.lux | 4 +- stdlib/source/test/aedifex/command/build.lux | 16 +- stdlib/source/test/aedifex/command/clean.lux | 4 +- stdlib/source/test/aedifex/command/deploy.lux | 12 +- stdlib/source/test/aedifex/command/deps.lux | 2 +- .../source/test/aedifex/command/install.lux | 6 +- stdlib/source/test/aedifex/command/pom.lux | 8 +- stdlib/source/test/aedifex/command/test.lux | 20 +-- .../source/test/aedifex/command/version.lux | 4 +- .../test/aedifex/dependency/deployment.lux | 10 +- .../test/aedifex/dependency/resolution.lux | 6 +- stdlib/source/test/aedifex/input.lux | 4 +- stdlib/source/test/aedifex/metadata.lux | 16 +- .../source/test/aedifex/metadata/artifact.lux | 4 +- .../source/test/aedifex/metadata/snapshot.lux | 4 +- stdlib/source/test/aedifex/package.lux | 10 +- stdlib/source/test/aedifex/pom.lux | 4 +- stdlib/source/test/aedifex/profile.lux | 4 +- stdlib/source/test/aedifex/project.lux | 16 +- .../source/test/aedifex/repository/local.lux | 4 +- .../source/test/aedifex/repository/remote.lux | 8 +- stdlib/source/test/aedifex/runtime.lux | 6 +- stdlib/source/test/lux.lux | 116 ++++++------- .../source/test/lux/abstract/equivalence.lux | 10 +- stdlib/source/test/lux/abstract/format.lux | 4 +- stdlib/source/test/lux/abstract/hash.lux | 8 +- stdlib/source/test/lux/abstract/interval.lux | 8 +- stdlib/source/test/lux/abstract/monad.lux | 4 +- stdlib/source/test/lux/abstract/order.lux | 16 +- stdlib/source/test/lux/control/aspect.lux | 12 +- .../source/test/lux/control/concatenative.lux | 4 +- .../lux/control/concurrency/incremental.lux | 13 +- .../lux/control/concurrency/semaphore.lux | 6 +- stdlib/source/test/lux/control/exception.lux | 8 +- .../test/lux/control/function/mutual.lux | 10 +- .../control/function/polymorphism/type.lux | 6 +- .../test/lux/control/function/predicate.lux | 20 +-- stdlib/source/test/lux/control/pipe.lux | 10 +- stdlib/source/test/lux/control/projection.lux | 4 +- .../test/lux/control/security/policy.lux | 4 +- stdlib/source/test/lux/control/try.lux | 6 +- stdlib/source/test/lux/control/writer.lux | 4 +- stdlib/source/test/lux/data/binary.lux | 10 +- .../source/test/lux/data/collection/array.lux | 6 +- .../data/collection/dictionary/ordered.lux | 4 +- .../source/test/lux/data/collection/list.lux | 4 +- .../lux/data/collection/list/property.lux | 4 +- .../source/test/lux/data/collection/queue.lux | 6 +- .../lux/data/collection/queue/priority.lux | 4 +- .../test/lux/data/collection/sequence.lux | 8 +- .../source/test/lux/data/collection/set.lux | 14 +- .../test/lux/data/collection/set/multi.lux | 4 +- .../test/lux/data/collection/set/ordered.lux | 6 +- .../source/test/lux/data/collection/stack.lux | 4 +- .../test/lux/data/collection/tree/finger.lux | 8 +- stdlib/source/test/lux/data/color/hsb.lux | 8 +- stdlib/source/test/lux/data/color/hsl.lux | 8 +- stdlib/source/test/lux/data/color/rgb.lux | 15 +- stdlib/source/test/lux/data/color/scheme.lux | 18 +- .../source/test/lux/data/color/terminal.lux | 4 +- stdlib/source/test/lux/data/format/json.lux | 28 +-- stdlib/source/test/lux/data/format/tar.lux | 24 +-- stdlib/source/test/lux/data/format/xml.lux | 18 +- stdlib/source/test/lux/data/text.lux | 71 ++++---- stdlib/source/test/lux/data/text/buffer.lux | 4 +- stdlib/source/test/lux/data/text/encoding.lux | 2 +- stdlib/source/test/lux/data/text/escape.lux | 14 +- stdlib/source/test/lux/data/text/regex.lux | 12 +- .../source/test/lux/data/text/unicode/set.lux | 6 +- stdlib/source/test/lux/debug.lux | 38 ++-- stdlib/source/test/lux/documentation.lux | 2 +- .../test/lux/documentation/remember.lux | 2 +- stdlib/source/test/lux/ffi.js.lux | 22 +-- stdlib/source/test/lux/ffi.jvm.lux | 84 ++++----- stdlib/source/test/lux/ffi.php.lux | 4 - stdlib/source/test/lux/ffi.rb.lux | 2 - stdlib/source/test/lux/ffi.scm.lux | 8 +- stdlib/source/test/lux/ffi/export.jvm.lux | 52 +++--- stdlib/source/test/lux/math.lux | 4 +- .../test/lux/math/arithmetic/fixed_point.lux | 6 +- .../source/test/lux/math/arithmetic/infix.lux | 4 +- .../test/lux/math/arithmetic/modular.lux | 12 +- stdlib/source/test/lux/math/logic/fuzzy.lux | 20 +-- stdlib/source/test/lux/math/number/dec.lux | 16 +- stdlib/source/test/lux/math/number/frac.lux | 24 ++- stdlib/source/test/lux/math/number/i64.lux | 88 +++++----- stdlib/source/test/lux/math/number/int.lux | 18 +- stdlib/source/test/lux/math/number/nat.lux | 10 +- stdlib/source/test/lux/math/number/rat.lux | 24 ++- stdlib/source/test/lux/math/number/rev.lux | 8 +- stdlib/source/test/lux/meta.lux | 12 +- stdlib/source/test/lux/meta/binding.lux | 162 ++---------------- stdlib/source/test/lux/meta/binding/local.lux | 132 ++++++++++++++ .../source/test/lux/meta/compiler/arity.lux | 8 +- .../test/lux/meta/compiler/language/lux.lux | 4 +- .../meta/compiler/language/lux/analysis.lux | 32 ++-- .../language/lux/analysis/complex.lux | 8 +- .../language/lux/analysis/coverage.lux | 10 +- .../language/lux/analysis/inference.lux | 22 +-- .../compiler/language/lux/analysis/macro.lux | 8 +- .../compiler/language/lux/analysis/module.lux | 8 +- .../language/lux/analysis/pattern.lux | 8 +- .../compiler/language/lux/analysis/simple.lux | 8 +- .../compiler/language/lux/analysis/type.lux | 6 +- .../lux/meta/compiler/language/lux/phase.lux | 6 +- .../compiler/language/lux/phase/analysis.lux | 44 ++--- .../language/lux/phase/analysis/complex.lux | 20 +-- .../language/lux/phase/analysis/function.lux | 4 +- .../language/lux/phase/analysis/reference.lux | 14 +- .../language/lux/phase/analysis/simple.lux | 4 +- .../language/lux/phase/analysis/when.lux | 34 ++-- .../compiler/language/lux/phase/extension.lux | 12 +- .../lux/phase/extension/analysis/lux.lux | 4 +- .../lux/phase/synthesis/primitive.lux | 4 +- .../lux/phase/synthesis/structure.lux | 6 +- .../lux/phase/translation/jvm/complex.lux | 18 +- .../lux/phase/translation/jvm/function.lux | 12 +- .../jvm/function/field/variable/count.lux | 10 +- .../jvm/function/field/variable/foreign.lux | 17 +- .../jvm/function/field/variable/partial.lux | 17 +- .../translation/jvm/function/method/apply.lux | 6 +- .../jvm/function/method/implementation.lux | 6 +- .../translation/jvm/function/method/reset.lux | 10 +- .../lux/phase/translation/jvm/host.lux | 4 +- .../lux/phase/translation/jvm/loop.lux | 19 +- .../lux/phase/translation/jvm/primitive.lux | 16 +- .../lux/phase/translation/jvm/reference.lux | 8 +- .../lux/phase/translation/jvm/type.lux | 8 +- .../lux/phase/translation/jvm/value.lux | 12 +- .../lux/phase/translation/jvm/when.lux | 49 +++--- .../lux/meta/compiler/language/lux/syntax.lux | 6 +- .../language/lux/synthesis/access/member.lux | 8 +- .../language/lux/synthesis/access/side.lux | 8 +- .../language/lux/synthesis/simple.lux | 6 +- .../compiler/language/lux/translation.lux | 4 +- .../test/lux/meta/compiler/meta/archive.lux | 8 +- .../meta/archive/module/descriptor.lux | 4 +- .../compiler/meta/archive/module/document.lux | 6 +- .../meta/compiler/meta/archive/signature.lux | 8 +- .../lux/meta/compiler/meta/archive/unit.lux | 8 +- .../lux/meta/compiler/meta/cache/archive.lux | 4 +- .../lux/meta/compiler/meta/cache/artifact.lux | 4 +- .../compiler/meta/cache/dependency/module.lux | 6 +- .../test/lux/meta/compiler/meta/cli.lux | 6 +- .../test/lux/meta/compiler/meta/export.lux | 22 +-- .../test/lux/meta/compiler/meta/import.lux | 10 +- .../test/lux/meta/compiler/reference.lux | 14 +- .../lux/meta/compiler/reference/variable.lux | 4 +- .../test/lux/meta/compiler/target/js.lux | 44 ++--- .../test/lux/meta/compiler/target/jvm.lux | 26 +-- .../test/lux/meta/compiler/target/lua.lux | 34 ++-- .../test/lux/meta/compiler/target/python.lux | 28 +-- .../test/lux/meta/compiler/target/ruby.lux | 48 +++--- .../source/test/lux/meta/compiler/version.lux | 8 +- stdlib/source/test/lux/meta/extension.lux | 4 +- stdlib/source/test/lux/meta/label.lux | 4 +- stdlib/source/test/lux/meta/location.lux | 4 +- stdlib/source/test/lux/meta/macro.lux | 8 +- .../source/test/lux/meta/macro/expansion.lux | 4 +- stdlib/source/test/lux/meta/macro/pattern.lux | 2 - .../test/lux/meta/macro/syntax/check.lux | 6 +- .../test/lux/meta/macro/syntax/definition.lux | 2 +- .../test/lux/meta/macro/syntax/export.lux | 4 +- .../source/test/lux/meta/macro/template.lux | 4 +- stdlib/source/test/lux/meta/module.lux | 10 +- stdlib/source/test/lux/meta/module/import.lux | 8 +- stdlib/source/test/lux/meta/static.lux | 10 +- stdlib/source/test/lux/meta/symbol.lux | 12 +- stdlib/source/test/lux/meta/type.lux | 66 +++---- stdlib/source/test/lux/meta/type/brand.lux | 14 +- stdlib/source/test/lux/meta/type/check.lux | 24 +-- stdlib/source/test/lux/meta/type/dynamic.lux | 4 +- stdlib/source/test/lux/meta/type/implicit.lux | 4 +- stdlib/source/test/lux/meta/type/linear.lux | 8 +- stdlib/source/test/lux/meta/type/nominal.lux | 10 +- stdlib/source/test/lux/meta/type/poly.lux | 8 +- stdlib/source/test/lux/meta/type/quotient.lux | 6 +- stdlib/source/test/lux/meta/type/record.lux | 52 ++---- stdlib/source/test/lux/meta/type/unit.lux | 4 +- .../source/test/lux/meta/type/unit/scale.lux | 4 +- stdlib/source/test/lux/music/chord.lux | 8 +- stdlib/source/test/lux/music/interval.lux | 4 +- stdlib/source/test/lux/music/mode.lux | 6 +- stdlib/source/test/lux/music/note.lux | 4 +- stdlib/source/test/lux/music/percussion.lux | 2 +- stdlib/source/test/lux/music/pitch.lux | 6 +- stdlib/source/test/lux/music/velocity.lux | 4 +- stdlib/source/test/lux/program.lux | 14 +- stdlib/source/test/lux/test/coverage.lux | 4 +- stdlib/source/test/lux/test/property.lux | 6 +- stdlib/source/test/lux/test/tally.lux | 10 +- stdlib/source/test/lux/test/unit.lux | 15 +- stdlib/source/test/lux/world/console.lux | 4 +- stdlib/source/test/lux/world/environment.lux | 6 +- stdlib/source/test/lux/world/file.lux | 26 +-- stdlib/source/test/lux/world/file/watch.lux | 8 +- .../test/lux/world/finance/interest/rate.lux | 8 +- .../lux/world/finance/market/analysis.lux | 8 +- .../test/lux/world/finance/market/price.lux | 6 +- .../source/test/lux/world/finance/money.lux | 6 +- .../test/lux/world/finance/trade/session.lux | 8 +- .../source/test/lux/world/input/keyboard.lux | 4 +- stdlib/source/test/lux/world/locale.lux | 4 +- stdlib/source/test/lux/world/logging.lux | 8 +- .../source/test/lux/world/net/http/cookie.lux | 10 +- .../source/test/lux/world/net/http/header.lux | 12 +- .../test/lux/world/net/http/request.lux | 36 ++-- .../test/lux/world/net/http/response.lux | 26 +-- .../source/test/lux/world/net/http/server.lux | 26 +-- .../test/lux/world/net/uri/encoding.lux | 8 +- stdlib/source/test/lux/world/shell.lux | 12 +- .../source/test/lux/world/time/duration.lux | 34 ++-- stdlib/source/test/lux/world/time/instant.lux | 23 ++- stdlib/source/test/lux/world/time/series.lux | 2 +- .../test/lux/world/time/series/average.lux | 4 +- stdlib/source/test/lux/world/time/solar.lux | 5 +- stdlib/source/test/lux/world/time/year.lux | 4 +- to_do.md | 4 +- 432 files changed, 2448 insertions(+), 2157 deletions(-) create mode 100644 stdlib/source/library/lux/meta/binding/local.lux create mode 100644 stdlib/source/test/lux/meta/binding/local.lux diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux index f44cee73c0..357987d741 100644 --- a/lux-r/source/program.lux +++ b/lux-r/source/program.lux @@ -191,7 +191,7 @@ (the %%code (syntax.macro (_ [term .any]) - (wrap (list (code.text (%.code term)))))) + (wrap (list (code.text (code.as_text term)))))) (the (host_value value) (-> Any org/renjin/sexp/SEXP) diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 883ac3a7c7..0aa1bedab6 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -750,7 +750,7 @@ ... \n "Useful in situations where the result of a branch depends on further refinements on the values being matched.") ... ($.example (' (when (split (size static) uri) ... (^multi {#Some [chunk uri']} - ... [(text#= static chunk) .true]) + ... [(text.= static chunk) .true]) ... (match_uri endpoint? parts' uri') ... _ @@ -760,7 +760,7 @@ ... ($.comment "The example above can be rewritten as...") ... ($.example (' (when (split (size static) uri) ... (^multi {#Some [chunk uri']} - ... (text#= static chunk)) + ... (text.= static chunk)) ... (match_uri endpoint? parts' uri') ... _ diff --git a/stdlib/source/documentation/lux/meta/static.lux b/stdlib/source/documentation/lux/meta/static.lux index e7a3c7e99a..47869265e5 100644 --- a/stdlib/source/documentation/lux/meta/static.lux +++ b/stdlib/source/documentation/lux/meta/static.lux @@ -11,6 +11,7 @@ [collection ["[0]" list]]] [meta + ["[0]" code] [macro ["[0]" template]]]]] [\\library @@ -20,9 +21,9 @@ (List $.Documentation) (let [literal (list (,, (template.with [ ] [($.definition - (%.code (' ( - (is - (value generating expression))))))] + (code.as_text (' ( + (is + (value generating expression))))))] [/.nat .Nat] [/.int .Int] @@ -40,8 +41,8 @@ (value generating expression))))))) random (list (,, (template.with [ ] [($.definition - (%.code (' (is - ()))))] + (code.as_text (' (is + ()))))] [/.random_nat .Nat] [/.random_int .Int] diff --git a/stdlib/source/experiment/tool/interpreter.lux b/stdlib/source/experiment/tool/interpreter.lux index c3fd2f86b7..e58776e23e 100644 --- a/stdlib/source/experiment/tool/interpreter.lux +++ b/stdlib/source/experiment/tool/interpreter.lux @@ -10,7 +10,7 @@ ["[0]" try (.only Try)] ["ex" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [type (.only sharing) ["[0]" check]] @@ -210,7 +210,7 @@ (of Console write "> ")) line (of Console read_line)] (if (and (not multi_line?) - (text#= ..exit_command line)) + (text.= ..exit_command line)) (of Console write ..farewell_message) (when (read_eval_print (revised #source (add_line line) context)) {try.#Success [context' representation]} diff --git a/stdlib/source/injection/lux/data/binary.lux b/stdlib/source/injection/lux/data/binary.lux index 1d40af795c..9de7f7c6dd 100644 --- a/stdlib/source/injection/lux/data/binary.lux +++ b/stdlib/source/injection/lux/data/binary.lux @@ -6,12 +6,9 @@ [lux (.except and or nat int rev list symbol type) [ffi (.only)] [abstract - [monoid (.only Monoid)] - [monad (.only Monad do)] - [equivalence (.only Equivalence)]] + [monoid (.only Monoid)]] [control - ["<>" projection (.use "[1]#[0]" monad)] - ["[0]" pipe] + ["|" pipe] ["[0]" function]] [data ["[0]" product] @@ -52,7 +49,8 @@ (the mask (-> Size (I64 Any)) - (|>> (n#* i64.bits_per_byte) i64.mask)) + (|>> (n#* i64.bits_per_byte) + i64.mask)) (.every .public Mutation (-> [Offset Binary] @@ -68,7 +66,11 @@ (the .public (instance [size mutation]) (-> Specification Binary) - (|> size \\unsafe.empty [0] mutation product.right)) + (|> size + \\unsafe.empty + [0] + mutation + product.right)) (the .public monoid (Monoid Specification) @@ -145,7 +147,7 @@ (the .public bit (Injection Bit) - (|>> (pipe.when #0 0 #1 1) ..bits_8)) + (|>> (|.when #0 0 #1 1) ..bits_8)) (template.with [ ] [(the .public @@ -180,7 +182,9 @@ (Injection Binary) (let [mask (..mask )] (function (_ value) - (let [size (|> value \\unsafe.size (i64.and mask)) + (let [size (|> value + \\unsafe.size + (i64.and mask)) size' (n#+ size)] [size' (function (_ [offset binary]) @@ -198,7 +202,8 @@ (template.with [ ] [(the .public (Injection Text) - (|>> (of utf8.format injection) ))] + (|>> (of utf8.format injection) + ))] [utf8_8 ..binary_8] [utf8_16 ..binary_16] @@ -219,7 +224,10 @@ original_count) value (if (n#= original_count capped_count) value - (|> value sequence.list (list.first capped_count) sequence.of_list)) + (|> value + sequence.list + (list.first capped_count) + sequence.of_list)) (open "specification#[0]") ..monoid specification/* (sequence#each valueW value) size (|> specification/* @@ -261,7 +269,8 @@ (for_any (_ of) (-> (Injection of) (Injection (Set of)))) - (|>> set.list (..list value))) + (|>> set.list + (..list value))) (the .public symbol (Injection Symbol) diff --git a/stdlib/source/injection/lux/data/text.lux b/stdlib/source/injection/lux/data/text.lux index a34b8d7568..a26d7fa053 100644 --- a/stdlib/source/injection/lux/data/text.lux +++ b/stdlib/source/injection/lux/data/text.lux @@ -19,16 +19,11 @@ ["[0]" nat] ["[0]" int] ["[0]" rev] - ["[0]" dec] - ["[0]" frac] - ["[0]" complex]] + ["[0]" dec]] [arithmetic ["[0]" modular]]] [meta - ["[0]" location] - ["[0]" symbol] - ["[0]" type] - ["[0]" code (.only) + ["[0]" code ["<[1]>" \\projection]] [macro ["[0]" syntax] @@ -50,14 +45,6 @@ [rev Rev (of rev.decimal injection)] [dec Dec (of dec.decimal injection)] [text Text text.injection] - - [frac frac.Frac (of frac.format injection)] - [complex complex.Complex complex.injection] - - [symbol Symbol (of symbol.absolute injection)] - [location Location location.injection] - [code Code code.absolute] - [type Type type.absolute_injection] ) (template.with [] diff --git a/stdlib/source/library/lux/abstract/interval.lux b/stdlib/source/library/lux/abstract/interval.lux index 322c89627e..f3e69e6bfc 100644 --- a/stdlib/source/library/lux/abstract/interval.lux +++ b/stdlib/source/library/lux/abstract/interval.lux @@ -188,6 +188,9 @@ (and (,#= ,#bottom (of actual bottom)) (,#= ,#top (of actual top))))))) +(alias [=] + ..equivalence) + (the .public (nested? reference it) (for_any (_ of) (-> (Interval of) diff --git a/stdlib/source/library/lux/control/aspect.lux b/stdlib/source/library/lux/control/aspect.lux index 5f86680b99..2d6a026e53 100644 --- a/stdlib/source/library/lux/control/aspect.lux +++ b/stdlib/source/library/lux/control/aspect.lux @@ -15,7 +15,7 @@ ["[0]" function (.only) [predicate (.only Predicate)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" mix) @@ -24,6 +24,7 @@ [extension (.only analysis declaration)] ["[0]" binding] ["[0]" module] + ["[0]" symbol] ["[0]" code (.only) ["?[1]" \\projection]] ["[0]" macro (.only) @@ -143,21 +144,21 @@ (when it {.#Definition [type value]} (if (or exported? - (text#= current_module_name normal_module)) + (text.= current_module_name normal_module)) (in [exported? it]) - (meta.failure (%.message "Global is not an export: " (%.symbol name)))) + (meta.failure (%.message "Global is not an export: " (symbol.as_text name)))) {.#Default [type value]} (if (or exported? - (text#= current_module_name normal_module)) + (text.= current_module_name normal_module)) (in [exported? it]) - (meta.failure (%.message "Global is not an export: " (%.symbol name)))) + (meta.failure (%.message "Global is not an export: " (symbol.as_text name)))) {.#Alias de_aliased} (again de_aliased)) {.#None it} - (meta.failure (%.message "Unknown global: " (%.symbol name))))))) + (meta.failure (%.message "Unknown global: " (symbol.as_text name))))))) (the (with_cached_analysis name then) (for_any (_ of) @@ -166,7 +167,7 @@ (do phase.monad ['cache (macro.symbol "'cache") [exported? global] (global_reference name) - .let [cache_name (%.code 'cache)] + .let [cache_name (code.as_text 'cache)] _ (moduleA.define cache_name [exported? global]) it (then ['cache global]) [current_module_name _] module.current @@ -182,7 +183,7 @@ (macro.symbol "'cache")) [exported? global] (declaration.of_analysis (global_reference name)) - .let [cache_name (%.code 'cache)] + .let [cache_name (code.as_text 'cache)] _ (declaration.of_analysis (moduleA.define cache_name [exported? global])) it (then ['cache global]) @@ -232,7 +233,7 @@ (analysis.Operation of)))) (do phase.monad ['cache (macro.symbol "'cache") - .let [cache_name (%.code 'cache)] + .let [cache_name (code.as_text 'cache)] _ (moduleA.define cache_name [false {.#Definition [Analysis (expression type term)]}]) it (then 'cache) [current_module_name _] module.current diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index b420bfb1f5..e32fd975c1 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -13,17 +13,17 @@ [number ["i" int]]] [meta + ["[0]" code (.only) + ["<[1]>" \\projection]] [macro (.only with_symbols) ["[0]" syntax] - ["[0]" template]] - ["[0]" code (.only) - ["<[1]>" \\projection]]]]]) + ["[0]" template]]]]]) (template.with [] [(exception.the .public ( condition) (Exception Code) (exception.report - (list ["Condition" (%.code condition)])))] + (list ["Condition" (code.as_text condition)])))] [pre_condition_failed] [post_condition_failed] diff --git a/stdlib/source/library/lux/control/function/named.lux b/stdlib/source/library/lux/control/function/named.lux index 07f94cb855..e87951b681 100644 --- a/stdlib/source/library/lux/control/function/named.lux +++ b/stdlib/source/library/lux/control/function/named.lux @@ -22,6 +22,7 @@ [number ["n" nat]]] ["[0]" meta (.only) + ["[0]" symbol] ["[0]" module] ["[0]" code (.only) ["?[1]" \\projection]] @@ -33,13 +34,13 @@ (exception.the .public (duplicate_parameters [definition parameters]) (Exception [Symbol (List Text)]) (exception.report - (list ["Definition" (%.symbol definition)] + (list ["Definition" (symbol.as_text definition)] ["Parameters" (%.list %.text parameters)]))) (exception.the .public (invalid_parameters [definition expected actual]) (Exception [Symbol (List Text) (List Text)]) (exception.report - (list ["Definition" (%.symbol definition)] + (list ["Definition" (symbol.as_text definition)] ["Expected" (%.list %.text expected)] ["Actual" (%.list %.text actual)]))) diff --git a/stdlib/source/library/lux/control/function/polymorphism/context.lux b/stdlib/source/library/lux/control/function/polymorphism/context.lux index 195357c002..006524730c 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/context.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/context.lux @@ -15,7 +15,7 @@ ["[0]" predicate (.only Predicate)]]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" set (.only Set)] ["[0]" list (.use "[1]#[0]" functor)]]] @@ -185,7 +185,7 @@ (do [! meta.monad] [.let [criterion (is (Predicate Polymorphism) (|>> (its #function) - (text#= (its #name signature))))] + (text.= (its #name signature))))] it (context.search criterion ..stack)] (with_symbols [g!self g!predicate g!parameters g!context g!_ g!next g!again] (do ! diff --git a/stdlib/source/library/lux/control/function/polymorphism/predicate.lux b/stdlib/source/library/lux/control/function/polymorphism/predicate.lux index d19f76a687..c9030e36a9 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/predicate.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/predicate.lux @@ -11,7 +11,7 @@ ["?" projection (.use "[1]#[0]" monad)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" meta (.only) @@ -123,7 +123,7 @@ (do [! meta.monad] [.let [criterion (is (-> Polymorphism Bit) (|>> (its #function) - (text#= (its #name signature))))] + (text.= (its #name signature))))] it (context.search criterion ..stack)] (with_symbols [g!self] (do ! diff --git a/stdlib/source/library/lux/control/function/polymorphism/type.lux b/stdlib/source/library/lux/control/function/polymorphism/type.lux index a734eba52d..3a08330346 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/type.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/type.lux @@ -9,7 +9,7 @@ [control ["?" projection (.use "[1]#[0]" monad)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" meta (.only) @@ -75,7 +75,7 @@ (?code.tuple (?.many ?code.any)) ?code.any)]) (do meta.monad - [it (context.search (|>> (its #name) (text#= name)) ..stack) + [it (context.search (|>> (its #name) (text.= name)) ..stack) .let [name (code.local name)]] (with_symbols ['self] (in (list (` (.the (, (its #export_policy it)) (, 'self) diff --git a/stdlib/source/library/lux/control/function/variadic.lux b/stdlib/source/library/lux/control/function/variadic.lux index 5e4a948b4d..ae97dc5fad 100644 --- a/stdlib/source/library/lux/control/function/variadic.lux +++ b/stdlib/source/library/lux/control/function/variadic.lux @@ -21,6 +21,7 @@ ["n" nat]]] ["[0]" meta (.only) ["[0]" module] + ["[0]" symbol] ["[0]" code (.only) ["?[1]" \\projection]] [macro (.only with_symbols) @@ -30,13 +31,13 @@ (exception.the .public (duplicate_parameters [definition parameters]) (Exception [Symbol (List Text)]) (exception.report - (list ["Definition" (%.symbol definition)] + (list ["Definition" (symbol.as_text definition)] ["Parameters" (%.list %.text parameters)]))) (exception.the .public (must_have_rest_parameter definition) (Exception Symbol) (exception.report - (list ["Definition" (%.symbol definition)]))) + (list ["Definition" (symbol.as_text definition)]))) (.the .public the (syntax.macro (_ [[exported? [name parameters] type body] diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 940505217b..0f11c03193 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -17,6 +17,7 @@ [collection ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" meta (.only) + ["[0]" symbol] ["[0]" module] ["[0]" code (.only) ["<[1]>" \\projection]] @@ -47,8 +48,8 @@ (do [! meta.monad] [[this_module _] module.current .let [[name vars] declaration] - g!brand (of ! each (|>> %.code code.text) - (macro.symbol (%.message (%.symbol [this_module name])))) + g!brand (of ! each (|>> code.as_text code.text) + (macro.symbol (%.message (symbol.as_text [this_module name])))) .let [type (` (..Capability (.Nominal (, g!brand)) (, input) (, output)))]] (in (list (` (every (, export_policy) (, (|declaration|.injection declaration)) diff --git a/stdlib/source/library/lux/data/any.lux b/stdlib/source/library/lux/data/any.lux index ec5b85d7e1..f7579ecfc0 100644 --- a/stdlib/source/library/lux/data/any.lux +++ b/stdlib/source/library/lux/data/any.lux @@ -18,6 +18,9 @@ (the (= _ _) true))) +(alias [=] + ..equivalence) + (the .public hash (Hash Any) (implementation diff --git a/stdlib/source/library/lux/data/binary.lux b/stdlib/source/library/lux/data/binary.lux index 63a5454869..0efab1d201 100644 --- a/stdlib/source/library/lux/data/binary.lux +++ b/stdlib/source/library/lux/data/binary.lux @@ -86,6 +86,9 @@ (the (= expected actual) (/.= expected actual)))) +(alias [=] + ..equivalence) + (exception.the .public (cannot_copy [bytes source_input target_output]) (Exception [Nat Nat Nat]) (exception.report diff --git a/stdlib/source/library/lux/data/bit.lux b/stdlib/source/library/lux/data/bit.lux index 38da904dfe..ea6eec5392 100644 --- a/stdlib/source/library/lux/data/bit.lux +++ b/stdlib/source/library/lux/data/bit.lux @@ -34,6 +34,9 @@ y (not y))))) +(alias [=] + ..equivalence) + (the .public hash (Hash Bit) (implementation diff --git a/stdlib/source/library/lux/data/collection/list/property.lux b/stdlib/source/library/lux/data/collection/list/property.lux index b93ffd1e33..86394a78a4 100644 --- a/stdlib/source/library/lux/data/collection/list/property.lux +++ b/stdlib/source/library/lux/data/collection/list/property.lux @@ -12,7 +12,7 @@ ["[0]" try (.only Try)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [math @@ -55,7 +55,7 @@ (Try of))) (when properties {.#Item [k' v'] properties'} - (if (text#= key k') + (if (text.= key k') {try.#Success v'} (value key properties')) @@ -90,7 +90,7 @@ (List of))) (when properties {.#Item [k' v'] properties'} - (if (text#= key k') + (if (text.= key k') {.#Item [key val] properties'} {.#Item [k' v'] @@ -105,7 +105,7 @@ (List of))) (when properties {.#Item [k' v'] properties'} - (if (text#= key k') + (if (text.= key k') {.#Item [k' (f v')] properties'} {.#Item [k' v'] (revised key f properties')}) @@ -118,7 +118,7 @@ (List of))) (when properties {.#Item [k' v'] properties'} - (if (text#= key k') + (if (text.= key k') properties' {.#Item [k' v'] (lacks key properties')}) diff --git a/stdlib/source/library/lux/data/collection/set.lux b/stdlib/source/library/lux/data/collection/set.lux index b0cfee34d4..b711c78975 100644 --- a/stdlib/source/library/lux/data/collection/set.lux +++ b/stdlib/source/library/lux/data/collection/set.lux @@ -76,6 +76,9 @@ (list.every? (..member? reference) (..list sample)))))) +(alias [=] + ..equivalence) + (the .public hash (for_any (_ a) (Hash (Set a))) (implementation diff --git a/stdlib/source/library/lux/data/color/cmyk.lux b/stdlib/source/library/lux/data/color/cmyk.lux index 3d259870dc..9efb3daaca 100644 --- a/stdlib/source/library/lux/data/color/cmyk.lux +++ b/stdlib/source/library/lux/data/color/cmyk.lux @@ -60,6 +60,9 @@ d.equivalence )) +(alias [=] + ..equivalence) + (the top (-- rgb.limit)) diff --git a/stdlib/source/library/lux/data/color/hsb.lux b/stdlib/source/library/lux/data/color/hsb.lux index 8ae4826b23..1be2ac4357 100644 --- a/stdlib/source/library/lux/data/color/hsb.lux +++ b/stdlib/source/library/lux/data/color/hsb.lux @@ -68,6 +68,9 @@ [#brightness] ))))))) + (alias [=] + ..equivalence) + (template.with [ ] [(the .public (-> HSB diff --git a/stdlib/source/library/lux/data/color/hsl.lux b/stdlib/source/library/lux/data/color/hsl.lux index 5069735778..bce68ce169 100644 --- a/stdlib/source/library/lux/data/color/hsl.lux +++ b/stdlib/source/library/lux/data/color/hsl.lux @@ -81,6 +81,9 @@ [#luminance] ))))))) +(alias [=] + ..equivalence) + (the .public (hsl hue saturation luminance) (-> Dec Dec Dec HSL) diff --git a/stdlib/source/library/lux/data/color/rgb.lux b/stdlib/source/library/lux/data/color/rgb.lux index 27796c2f48..2e804e120a 100644 --- a/stdlib/source/library/lux/data/color/rgb.lux +++ b/stdlib/source/library/lux/data/color/rgb.lux @@ -92,6 +92,9 @@ (Equivalence RGB) (of ..hash equivalence)) +(alias [=] + ..equivalence) + (the (opposite_intensity value) (-> Value Value) diff --git a/stdlib/source/library/lux/data/color/terminal.lux b/stdlib/source/library/lux/data/color/terminal.lux index 5df76337b1..bdc2dea1ca 100644 --- a/stdlib/source/library/lux/data/color/terminal.lux +++ b/stdlib/source/library/lux/data/color/terminal.lux @@ -8,7 +8,7 @@ [abstract [equivalence (.only Equivalence)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["[0]" char] ["%" \\injection]]] [math @@ -31,8 +31,11 @@ (the (= reference it) (let [[beforeR afterR] (nominal.representation Command reference) [beforeI afterI] (nominal.representation Command it)] - (and (text#= beforeR beforeI) - (text#= afterR afterI)))))) + (and (text.= beforeR beforeI) + (text.= afterR afterI)))))) + + (alias [=] + ..equivalence) (the command Text diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 1acb1cd4b8..40b7f3a397 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -21,7 +21,7 @@ [data ["[0]" bit] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence monoid) + ["[0]" text (.use "[1]#[0]" monoid) ["<[1]>" \\projection (.only Projection)]] [collection ["[0]" list (.use "[1]#[0]" mix functor)] @@ -251,6 +251,9 @@ _ false))))) +(alias [=] + ..equivalence) + ............................................................ ............................................................ ............................................................ @@ -433,7 +436,7 @@ (do [! <>.monad] [chars (.some (.none_of (text#composite "\" text.double_quote))) stop .next]) - (if (text#= "\" stop) + (if (text.= "\" stop) (do ! [escaped escaped_projection next_chars (again [])] diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 29d436daf8..8c208b75e1 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -21,7 +21,7 @@ ["[1]!" \\unsafe] ["![1]" \\injection (.only Injection) (.use "[1]#[0]" monoid)] ["?[1]" \\projection (.only Projection)]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [char (.only Char)] ["%" \\injection] [encoding @@ -660,7 +660,7 @@ (^.or {#Normal it} {#Contiguous it}) (let [[actual _ _ _ content] it] - (if (text#= (from_path expected) + (if (text.= (from_path expected) (from_path actual)) {.#Some (data content)} {.#None})) diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux index 6e87e746cc..fb67547637 100644 --- a/stdlib/source/library/lux/data/format/xml.lux +++ b/stdlib/source/library/lux/data/format/xml.lux @@ -11,11 +11,10 @@ [equivalence (.only Equivalence)] [format (.only Format)]] [control - [try (.only Try)] ["<>" projection (.use "[1]#[0]" monad)]] [data ["[0]" product] - ["[0]" text (.only \n) (.use "[1]#[0]" equivalence monoid) + ["[0]" text (.only \n) (.use "[1]#[0]" monoid) ["<[1]>" \\projection (.only Projection Slice)]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -25,7 +24,7 @@ ["n" nat] ["[0]" int]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence absolute)]]]]) + ["[0]" symbol (.use "[1]#[0]" absolute)]]]]) (every .public Tag Symbol) @@ -142,7 +141,7 @@ (<>.assertion (all text#composite "Close tag does not match open tag." \n "Expected: " (symbol#injection expected) \n " Actual: " (symbol#injection actual) \n) - (symbol#= expected actual)))) + (symbol.= expected actual)))) (the comment^ (Projection Slice) @@ -293,11 +292,11 @@ (the (= expected actual) (when [expected actual] [{#Text expected/value} {#Text actual/value}] - (text#= expected/value actual/value) + (text.= expected/value actual/value) [{#Node expected/tag expected/attrs expected/children} {#Node actual/tag actual/attrs actual/children}] - (and (symbol#= expected/tag actual/tag) + (and (symbol.= expected/tag actual/tag) (of (dictionary.equivalence text.equivalence) = expected/attrs actual/attrs) (n.= (list.size expected/children) (list.size actual/children)) @@ -306,3 +305,6 @@ _ false)))) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index a6bdfa54d3..e585b3b1fe 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -300,6 +300,9 @@ (the (= expected actual) (.text_=# expected actual)))) +(alias [=] + ..equivalence) + (the .public order (Order Text) (implementation diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux index 4ec0668443..422d47fd4b 100644 --- a/stdlib/source/library/lux/data/text/unicode/block.lux +++ b/stdlib/source/library/lux/data/text/unicode/block.lux @@ -76,6 +76,9 @@ (and (n.= (..start expected) (..start actual)) (n.= (..end expected) (..end actual)))))) +(alias [=] + ..equivalence) + (the .public hash (Hash Block) (implementation diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux index 93cdd09e76..fef65f8cf6 100644 --- a/stdlib/source/library/lux/data/text/unicode/set.lux +++ b/stdlib/source/library/lux/data/text/unicode/set.lux @@ -9,7 +9,7 @@ [data [collection ["[0]" list (.use "[1]#[0]" mix functor)] - ["[0]" set (.use "[1]#[0]" equivalence)] + ["[0]" set] ["[0]" tree ["[1]" finger (.only Tree)]]]] [meta @@ -235,8 +235,11 @@ (Equivalence Set) (implementation (the (= expected actual) - (set#= (set.of_list block.hash (tree.tags (nominal.representation expected))) + (set.= (set.of_list block.hash (tree.tags (nominal.representation expected))) (set.of_list block.hash (tree.tags (nominal.representation actual))))))) + + (alias [=] + ..equivalence) ) (template.with [ ] diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index d883eb945f..cbada56632 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -24,11 +24,14 @@ ["[0]" dictionary]]] [math [number - [frac (.only Frac)] ["n" nat] - ["i" int]]] + ["i" int] + ["[0]" frac (.only Frac)]]] ["[0]" meta (.only) - ["[0]" binding] + ["[0]" symbol] + ["[0]" location] + ["[0]" binding (.only) + ["[0]" local]] ["[0]" code (.only) ["<[1]>" \\projection]] [macro @@ -378,7 +381,7 @@ (exception.the .public (cannot_represent_value type) (Exception Type) (exception.report - (list ["Type" (%.type type)]))) + (list ["Type" (type.as_text type)]))) (.every Representation (text.Injection Any)) @@ -413,11 +416,11 @@ (in (|>> (as ) )))] - [Frac %.frac] - [Symbol %.symbol] - [Location %.location] - [Type %.type] - [Code %.code])) + [Frac frac.as_text] + [Symbol symbol.as_text] + [Location location.as_text] + [Type type.as_text] + [Code code.as_text])) (do <>.monad [[_ elemT] (.applied (<>.and (.exactly List) .any)) @@ -528,8 +531,8 @@ (exception.the .public (type_hole [location type]) (Exception [Location Type]) (exception.report - (list ["Location" (%.location location)] - ["Type" (%.type type)]))) + (list ["Location" (location.as_text location)] + ["Type" (type.as_text type)]))) (the .public hole (syntax.macro (_ []) @@ -560,7 +563,7 @@ (<>.else (list))))]) (do [! meta.monad] [location meta.location - locals binding.locals + locals local.all .let [environment (|> locals list.together ... The list is reversed to make sure that, when building the dictionary, @@ -582,7 +585,7 @@ (function.constant (exception.except ..unknown_local_binding [name])))) targets)))] (in (list (` (..log! (.text_composite# - (, (code.text (%.message (%.location location) text.new_line))) + (, (code.text (%.message (location.as_text location) text.new_line))) (exception.report (.list (,* (|> targets (list#each (function (_ [name injection]) diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 15a6e029fe..0e857c960e 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -34,7 +34,7 @@ ["[0]" binding] ["[0]" symbol] ["[0]" label] - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" type] [module ["[0]" import]] ["[0]" code (.only) @@ -112,14 +112,14 @@ [Location Text]) (`` (when example [new_location {.#Symbol [module short]}] - (let [documentation (cond (text#= expected_module module) + (let [documentation (cond (text.= expected_module module) short - (text#= .prelude module) + (text.= .prelude module) (%.message "." short) ... else - (%.symbol [module short]))] + (symbol.as_text [module short]))] [(revised .#column (n.+ (text.size documentation)) new_location) (%.message (padding reference_column old_location new_location) documentation)]) @@ -247,14 +247,14 @@ (-> Text Symbol Text) (let [[_module _name] it - label (cond (text#= module _module) + label (cond (text.= module _module) _name - (text#= .prelude _module) + (text.= .prelude _module) (%.message "." _name) ... else - (%.symbol it))] + (symbol.as_text it))] (%.message "" label ""))) (the (%type' level type_function_name nestable? module type) @@ -296,7 +296,7 @@ (,, (template.with [] [{ id} - (%.type type)] + (type.as_text type)] [.#Var] [.#Opaque])) @@ -490,7 +490,7 @@ (exception.the .public (unqualified_symbol name) (Exception Symbol) (exception.report - (list ["Name" (%.symbol name)]))) + (list ["Name" (symbol.as_text name)]))) (the qualified_symbol (Projection Symbol) @@ -527,18 +527,18 @@ (md.and (md.anchor (, (let [[module short] name] (code.text (%.message module ":" short)))))) md.text - (, (code.text (%.code (let [g!name (|> name product.right code.local)] - (when parameters - {.#End} - g!name + (, (code.text (code.as_text (let [g!name (|> name product.right code.local)] + (when parameters + {.#End} + g!name - _ - (` ((, g!name) (,* (list#each code.local parameters)))))))))) + _ + (` ((, g!name) (,* (list#each code.local parameters)))))))))) ... Type (let [(, g!type) (.in_module# (, g!module) (.type_of (, (code.symbol name))))] - (, (if (type#= .Type def_type) + (, (if (type.= .Type def_type) (` (|> (, (code.symbol name)) (as .Type) type.anonymous @@ -561,11 +561,11 @@ ... Name (md.heading/4 (md.and (md.anchor (, (let [[module short] name] (code.text (%.message module ":" short))))) - (md.text (, (code.text (%.code (|> name product.right code.local))))))) + (md.text (, (code.text (code.as_text (|> name product.right code.local))))))) (md.paragraph (all md.and (md.text (, (code.text "Alias for"))) - (md.link (md.text (, (code.text (%.symbol original)))) + (md.link (md.text (, (code.text (symbol.as_text original)))) (, (code.text (..link original))))))) )))))) @@ -725,7 +725,7 @@ (all md.then (md.heading/3 (md.text heading)) (|> (set.list it) - (list.only (|>> (text#= descriptor.runtime) not)) + (list.only (|>> (text.= descriptor.runtime) not)) (list.sorted text#<) (list#each (function (_ it) [(md.link (md.text it) (%.message "#" it)) diff --git a/stdlib/source/library/lux/documentation/remember.lux b/stdlib/source/library/lux/documentation/remember.lux index 6f0a64b6fc..623f8390b5 100644 --- a/stdlib/source/library/lux/documentation/remember.lux +++ b/stdlib/source/library/lux/documentation/remember.lux @@ -33,7 +33,7 @@ ["Message" message] ["Code" (when focus {.#Some focus} - (%.code focus) + (code.as_text focus) {.#None} "")]))) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 3781d5bd66..b39916fd86 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -15,7 +15,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection]] [collection @@ -36,7 +36,7 @@ ["[0]" template] ["[0]" context] ["[0]" expansion]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check]] [compiler [target @@ -1904,17 +1904,17 @@ (exception.the .public (cannot_convert_to_jvm_type type) (Exception .Type) (exception.report - (list ["Lux type" (%.type type)]))) + (list ["Lux type" (type.as_text type)]))) (expansion.let [ (these (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))] (the (lux_type->jvm_type context type) (-> Type_Context .Type (Meta (Type Value))) - (if (type#= .Any type) + (if (type.= .Any type) (of meta.monad in $Object) (when type {.#Nominal name params} (`` (cond (,, (template.with [] - [(text#= (..reflection ) name) + [(text.= (..reflection ) name) (when params {.#End} (of meta.monad in ) @@ -1932,7 +1932,7 @@ [jvm.char])) (,, (template.with [] - [(text#= (..reflection (jvm.array )) name) + [(text.= (..reflection (jvm.array )) name) (when params {.#End} (of meta.monad in (jvm.array )) @@ -1949,7 +1949,7 @@ [jvm.double] [jvm.char])) - (text#= array.nominal name) + (text.= array.nominal name) (when params {.#Item {.#Apply writeLT {.#Apply readLT _Mutable}} {.#End}} (of meta.monad each jvm.array diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 99971baac7..1131edf0ca 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -14,7 +14,7 @@ ["[0]" try (.only Try)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" monoid monad mix)]]] @@ -1061,7 +1061,7 @@ (maybe#each (|>> [] (.js_apply# (.js_constant# "Object.prototype.toString.call")) (as Text) - (text#= "[object process]"))) + (text.= "[object process]"))) (maybe.else false)))) (these))) ) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index 4f0b102691..76d4533a7a 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -22,14 +22,14 @@ [macro ["[0]" template] ["[0]" expansion]] - [type + ["[0]" type (.only) ["[0]" check]] [compiler [language [lux ["[0]" phase (.use "[1]#[0]" monad)] ["[0]" analysis (.only Operation Phase) - ["[0]" type]]]] + ["[0]A" type]]]] [meta [archive (.only Archive)]]]]]] [/ @@ -45,7 +45,7 @@ (exception.the (no_arithmetic_for type) (Exception Type) (exception.report - (list ["Type" (%.type type)]))) + (list ["Type" (type.as_text type)]))) (the (composite phase archive <+> last prevs) (-> Phase Archive Code analysis.Term (List analysis.Term) @@ -59,7 +59,7 @@ _ (do phase.monad - [[_ $] (type.inferring + [[_ $] (typeA.inferring (phase archive <+>))] (in (list#mix (function (_ left right) (analysis.reified [$ (list left right)])) @@ -75,13 +75,13 @@ (these (the .public .Analysis (analysis (_ phase archive [operands (<>.some .any)]) - (<| type.with_var + (<| typeA.with_var (function (_ [$it :it:])) (do [! phase.monad] - [operands (monad.each ! (|>> (phase archive) (type.expecting :it:)) + [operands (monad.each ! (|>> (phase archive) (typeA.expecting :it:)) operands) - _ (type.inference :it:) - :it: (type.check (check.identity (list) $it))] + _ (typeA.inference :it:) + :it: (typeA.check (check.identity (list) $it))] (when (list.reversed operands) (list single) (in single) @@ -116,26 +116,26 @@ [.Int (in (analysis.int location.dummy +0)) .i64_+#|translation] [.Rev (in (analysis.rev location.dummy .0)) .i64_+#|translation] [.Dec (in (analysis.dec location.dummy +0.0)) .f64_+#|translation] - [Frac (type.expecting Frac (phase archive (` ))) frac.+] - [Complex (type.expecting Complex (phase archive (` ))) complex.+]]] + [Frac (typeA.expecting Frac (phase archive (` ))) frac.+] + [Complex (typeA.expecting Complex (phase archive (` ))) complex.+]]] [- [[.Nat (in (analysis.nat location.dummy 0)) .i64_-#|translation] [.Int (in (analysis.int location.dummy -0)) .i64_-#|translation] [.Rev (in (analysis.rev location.dummy .0)) .i64_-#|translation] [.Dec (in (analysis.dec location.dummy -0.0)) .f64_-#|translation] - [Frac (type.expecting Frac (phase archive (` ))) frac.-] - [Complex (type.expecting Complex (phase archive (` ))) complex.-]]] + [Frac (typeA.expecting Frac (phase archive (` ))) frac.-] + [Complex (typeA.expecting Complex (phase archive (` ))) complex.-]]] [* [[.Nat (in (analysis.nat location.dummy 1)) nat.*] [.Int (in (analysis.int location.dummy +1)) .int_*#|translation] [.Rev (in (analysis.rev location.dummy rev./1)) rev.*] [.Dec (in (analysis.dec location.dummy +1.0)) .f64_*#|translation] - [Frac (type.expecting Frac (phase archive (` ))) frac.*] - [Complex (type.expecting Complex (phase archive (` ))) complex.*]]] + [Frac (typeA.expecting Frac (phase archive (` ))) frac.*] + [Complex (typeA.expecting Complex (phase archive (` ))) complex.*]]] [/ [[.Nat (in (analysis.nat location.dummy 1)) nat./] [.Int (in (analysis.int location.dummy +1)) .int_/#|translation] [.Rev (in (analysis.rev location.dummy rev./1)) rev./] [.Dec (in (analysis.dec location.dummy +1.0)) .f64_/#|translation] - [Frac (type.expecting Frac (phase archive (` ))) frac./] - [Complex (type.expecting Complex (phase archive (` ))) complex./]]] + [Frac (typeA.expecting Frac (phase archive (` ))) frac./] + [Complex (typeA.expecting Complex (phase archive (` ))) complex./]]] ) (template.with [ '] [(expansion.let [ (template.spliced ')] @@ -143,13 +143,13 @@ .Analysis (analysis (_ phase archive [left .any right .any]) - (<| type.with_var + (<| typeA.with_var (function (_ [$it :it:])) (do [! phase.monad] - [left (type.expecting :it: (phase archive left)) - right (type.expecting :it: (phase archive right)) - _ (type.inference .Bit) - :it: (type.check (check.identity (list) $it))] + [left (typeA.expecting :it: (phase archive left)) + right (typeA.expecting :it: (phase archive right)) + _ (typeA.inference .Bit) + :it: (typeA.check (check.identity (list) $it))] (`` (cond (check.subsumed? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) @@ -195,13 +195,13 @@ .Analysis (analysis (_ phase archive [left .any right .any]) - (<| type.with_var + (<| typeA.with_var (function (_ [$it :it:])) (do [! phase.monad] - [left (type.expecting :it: (phase archive left)) - right (type.expecting :it: (phase archive right)) - _ (type.inference :it:) - :it: (type.check (check.identity (list) $it))] + [left (typeA.expecting :it: (phase archive left)) + right (typeA.expecting :it: (phase archive right)) + _ (typeA.inference :it:) + :it: (typeA.check (check.identity (list) $it))] (`` (cond (check.subsumed? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index 1560536d6e..028170b870 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -366,16 +366,17 @@ (its ..#imaginary standard) (its ..#imaginary value)))) -(the .public (injection it) - (-> Complex - Text) +(the .public (as_text it) + (text.Injection Complex) (.text_composite# (of d.decimal injection (its ..#real it)) - " " (of d.decimal injection (its ..#imaginary it)) "i")) + " " + (of d.decimal injection (its ..#imaginary it)) + "i")) (the .public format (Format Text Complex) (implementation - (the injection ..injection) + (the injection ..as_text) (the (projection it) (when (text.split_by " " it) {.#Some [real imaginary]} diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux index 4a4305e315..3e8ca70fab 100644 --- a/stdlib/source/library/lux/math/number/frac.lux +++ b/stdlib/source/library/lux/math/number/frac.lux @@ -167,13 +167,17 @@ (the separator "/") +(the .public (as_text (open "/[0]")) + (text.Injection Frac) + (all text#composite + (n#injection /#numerator) + ..separator + (n#injection /#denominator))) + (the .public format (Format Text Frac) (implementation - (the (injection (open "/[0]")) - (all text#composite - (n#injection /#numerator) - ..separator (n#injection /#denominator))) + (the injection ..as_text) (the (projection input) (when (text.split_by ..separator input) diff --git a/stdlib/source/library/lux/math/number/i16.lux b/stdlib/source/library/lux/math/number/i16.lux index 8ff4943ddc..9bdbb52923 100644 --- a/stdlib/source/library/lux/math/number/i16.lux +++ b/stdlib/source/library/lux/math/number/i16.lux @@ -31,6 +31,10 @@ (static.literal type.code)))))) (the .public equivalence (Equivalence I16) (of ..sub sub_equivalence)) + +(alias [=] + ..equivalence) + (the .public width Nat (of ..sub bits)) (the .public i16 (-> I64 I16) (of ..sub narrow)) (the .public i64 (-> I16 I64) (of ..sub wide)) diff --git a/stdlib/source/library/lux/math/number/i32.lux b/stdlib/source/library/lux/math/number/i32.lux index 0b643000ed..981c6eb747 100644 --- a/stdlib/source/library/lux/math/number/i32.lux +++ b/stdlib/source/library/lux/math/number/i32.lux @@ -31,6 +31,10 @@ (static.literal type.code)))))) (the .public equivalence (Equivalence I32) (of ..sub sub_equivalence)) + +(alias [=] + ..equivalence) + (the .public width Nat (of ..sub bits)) (the .public i32 (-> I64 I32) (of ..sub narrow)) (the .public i64 (-> I32 I64) (of ..sub wide)) diff --git a/stdlib/source/library/lux/math/number/i64.lux b/stdlib/source/library/lux/math/number/i64.lux index d65349b7a1..66de6736f1 100644 --- a/stdlib/source/library/lux/math/number/i64.lux +++ b/stdlib/source/library/lux/math/number/i64.lux @@ -150,6 +150,9 @@ (the (= expected actual) (.i64_=# expected actual)))) +(alias [=] + ..equivalence) + (the .public hash (for_any (_ of) (Hash (I64 of))) diff --git a/stdlib/source/library/lux/math/number/i8.lux b/stdlib/source/library/lux/math/number/i8.lux index 4b5d60371d..fc2e23a1a5 100644 --- a/stdlib/source/library/lux/math/number/i8.lux +++ b/stdlib/source/library/lux/math/number/i8.lux @@ -31,6 +31,10 @@ (static.literal type.code)))))) (the .public equivalence (Equivalence I8) (of ..sub sub_equivalence)) + +(alias [=] + ..equivalence) + (the .public width Nat (of ..sub bits)) (the .public i8 (-> I64 I8) (of ..sub narrow)) (the .public i64 (-> I8 I64) (of ..sub wide)) diff --git a/stdlib/source/library/lux/meta/binding.lux b/stdlib/source/library/lux/meta/binding.lux index 8db30c81aa..f8cccec159 100644 --- a/stdlib/source/library/lux/meta/binding.lux +++ b/stdlib/source/library/lux/meta/binding.lux @@ -18,6 +18,8 @@ [math [number ["n" nat]]]]] + [/ + ["[0]" local]] ["[0]" // (.only) ["[0]" module] ["[0]" location] @@ -73,55 +75,19 @@ _ (of //.monad in type)))) -(the (on_either f x1 x2) - (for_any (_ input output) - (-> (-> input (Maybe output)) input input - (Maybe output))) - (when (f x1) - {.#None} - (f x2) - - some - some)) - -(the .public (var_type name) - (-> Text - (Meta Type)) - (function (_ lux) - (let [test (is (-> [Text [Type Any]] Bit) - (|>> product.left (text#= name)))] - (when (do maybe.monad - [scope (list.example (function (_ env) - (.or (list.any? test (is (List [Text [Type Any]]) - (its [.#locals .#mappings] env))) - (list.any? test (is (List [Text [Type Any]]) - (its [.#captured .#mappings] env))))) - (its .#scopes lux)) - [_ [type _]] (on_either (list.example test) - (is (List [Text [Type Any]]) - (its [.#locals .#mappings] scope)) - (is (List [Text [Type Any]]) - (its [.#captured .#mappings] scope)))] - (in type)) - {.#Some var_type} - ((clean_type var_type) lux) - - {.#None} - {try.#Failure (all text#composite "Unknown variable: " name)})))) - (the without_lux_runtime - (-> (List Text) - (List Text)) + (-> (List module.Name) + (List module.Name)) ... The Lux runtime shows up as "" ... so I'm excluding it. - (list.only (|>> text.empty? not))) + (list.only (|>> (text.= module.runtime) not))) (the listing_separator Text (all text#composite text.new_line " ")) (the module_listing - (-> (List Text) + (-> (List module.Name) Text) (|>> ..without_lux_runtime (list.sorted text#<) @@ -163,7 +129,7 @@ (`` (when global { _} (if (.and exported? - (text#= normal_short def_name)) + (text.= normal_short def_name)) {.#Some (symbol#injection [module_name def_name])} {.#None}) @@ -207,13 +173,13 @@ (when definition {.#Definition it} (if (.or exported? - (text#= expected actual)) + (text.= expected actual)) (in it) (//.failure (all text#composite "Definition is not an export: " (symbol#injection name)))) {.#Alias it} (if (.or exported? - (text#= expected actual)) + (text.= expected actual)) (export it) (//.failure (all text#composite "Alias is not an export: " (symbol#injection name)))) @@ -245,7 +211,7 @@ (do ! [.let [[expected _] name] [actual _] module.current] - (if (text#= expected actual) + (if (text.= expected actual) (in it) (//.failure (all text#composite "Default is not an export: " (symbol#injection name))))))))) @@ -284,7 +250,7 @@ (Meta Type)) (when name ["" _name] - (//.either (var_type _name) + (//.either (local.type _name) (definition_type name)) _ @@ -312,7 +278,7 @@ (//.failure (all text#composite "Default is not a type: " (symbol#injection name)))))) (the .public (globals module) - (-> Text + (-> module.Name (Meta (List [Text [Bit Global]]))) (function (_ lux) (when (property.value module (its .#modules lux)) @@ -323,7 +289,7 @@ {try.#Failure (all text#composite "Unknown module: " module)}))) (the .public (definitions module) - (-> Text + (-> module.Name (Meta (List [Text [Bit Definition]]))) (of //.monad each (list.all (function (_ [name [exported? global]]) @@ -344,7 +310,7 @@ "Cannot de-alias a default global.")) (the .public (resolved_globals module) - (-> Text + (-> module.Name (Meta (List [Text [Bit Definition]]))) (do [! //.monad] [it (..globals module) @@ -398,7 +364,7 @@ {try.#Failure error}))))))) (the .public (exports module_name) - (-> Text + (-> module.Name (Meta (List [Text Definition]))) (do //.monad [constants (..definitions module_name)] @@ -408,25 +374,6 @@ (in [name [def_type def_value]]) (list)))))) -(the .public no_local_environment - Error - (location.with (location.here) - "No local environment.")) - -(the .public locals - (Meta (List (List [Text Type]))) - (function (_ lux) - (when (list.inits (its .#scopes lux)) - {try.#Success scopes} - {try.#Success [lux - (list#each (|>> (its [.#locals .#mappings]) - (list#each (function (_ [name [type _]]) - [name type]))) - scopes)]} - - {try.#Failure error} - {try.#Failure ..no_local_environment}))) - (the .public (de_aliased def_name) (-> Symbol (Meta Symbol)) diff --git a/stdlib/source/library/lux/meta/binding/local.lux b/stdlib/source/library/lux/meta/binding/local.lux new file mode 100644 index 0000000000..e54d63a719 --- /dev/null +++ b/stdlib/source/library/lux/meta/binding/local.lux @@ -0,0 +1,114 @@ +... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + +(.require + [library + [lux (.except type all) + [abstract + [monad (.only do)]] + [control + ["[0]" maybe] + ["[0]" try]] + [data + ["[0]" product] + ["[0]" text (.use "[1]#[0]" monoid)] + [collection + ["[0]" list (.use "[1]#[0]" functor)]]] + [math + [number + ["n" nat]]]]] + ["[0]" /// (.only) + ["[0]" location]]) + +(the with_template' (.in_module# .prelude .with_template)) + +(the (type_variable idx bindings) + (-> Nat (List [Nat (Maybe Type)]) + (Maybe Type)) + (when bindings + {.#End} + {.#None} + + {.#Item [var bound] bindings'} + (if (n.= idx var) + bound + (type_variable idx bindings')))) + +(`` (the (clean_type type) + (-> Type + (Meta Type)) + (when type + {.#Var var} + (function (_ lux) + (when (|> lux + (its [.#type_context .#var_bindings]) + (type_variable var)) + (,, (with_template' [] + [ + {try.#Success [lux type]}] + + [{.#None}] + [{.#Some {.#Var _}}])) + + + {.#Some type'} + {try.#Success [lux type']})) + + _ + (of ///.monad in type)))) + +(the (on_either f x1 x2) + (for_any (_ input output) + (-> (-> input (Maybe output)) input input + (Maybe output))) + (when (f x1) + {.#None} + (f x2) + + some + some)) + +(the .public (type name) + (-> Text + (Meta Type)) + (function (_ lux) + (let [test (is (-> [Text [Type Any]] Bit) + (|>> product.left + (text.= name)))] + (when (do maybe.monad + [scope (list.example (function (_ env) + (.or (list.any? test (is (List [Text [Type Any]]) + (its [.#locals .#mappings] env))) + (list.any? test (is (List [Text [Type Any]]) + (its [.#captured .#mappings] env))))) + (its .#scopes lux)) + [_ [type _]] (on_either (list.example test) + (is (List [Text [Type Any]]) + (its [.#locals .#mappings] scope)) + (is (List [Text [Type Any]]) + (its [.#captured .#mappings] scope)))] + (in type)) + {.#Some type} + ((clean_type type) lux) + + {.#None} + {try.#Failure (.all text#composite "Unknown variable: " name)})))) + +(the .public no_environment + Error + (location.with (location.here) + "No local environment.")) + +(the .public all + (Meta (List (List [Text Type]))) + (function (_ lux) + (when (list.inits (its .#scopes lux)) + {try.#Success scopes} + {try.#Success [lux + (list#each (|>> (its [.#locals .#mappings]) + (list#each (function (_ [name [type _]]) + [name type]))) + scopes)]} + + {try.#Failure error} + {try.#Failure ..no_environment}))) diff --git a/stdlib/source/library/lux/meta/code.lux b/stdlib/source/library/lux/meta/code.lux index 1db3e38ead..a26eace1fd 100644 --- a/stdlib/source/library/lux/meta/code.lux +++ b/stdlib/source/library/lux/meta/code.lux @@ -9,7 +9,7 @@ [data ["[0]" product] ["[0]" bit] - ["[0]" text (.use "[1]#[0]" monoid equivalence)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [math @@ -90,6 +90,9 @@ _ false))))) +(alias [=] + ..equivalence) + (the .public (absolute it) (-> Code Text) @@ -114,7 +117,7 @@ (list#mix (function (_ next prev) (let [next (absolute next)] - (if (text#= "" prev) + (if (text.= "" prev) next (all text#composite prev " " next)))) "" @@ -150,7 +153,7 @@ (list#mix (function (_ next prev) (let [next (relative module next)] - (if (text#= "" prev) + (if (text.= "" prev) next (all text#composite prev " " next)))) "" @@ -178,3 +181,6 @@ _ it)))) + +(alias [as_text] + ..absolute) diff --git a/stdlib/source/library/lux/meta/compiler/default/init.lux b/stdlib/source/library/lux/meta/compiler/default/init.lux index 0cea19b609..44c8d6e7b4 100644 --- a/stdlib/source/library/lux/meta/compiler/default/init.lux +++ b/stdlib/source/library/lux/meta/compiler/default/init.lux @@ -277,7 +277,7 @@ (the (default_dependencies prelude input) (-> descriptor.Module ///.Input (List descriptor.Module)) (list.partial descriptor.runtime - (if (text#= prelude (its ///.#module input)) + (if (text.= prelude (its ///.#module input)) (list) (list prelude)))) @@ -328,7 +328,7 @@ [[state [analysis_module [final_buffer final_registry]]] (<| (phase.value' state) (do [! phase.monad] - [_ (if (text#= program_module module) + [_ (if (text.= program_module module) (when program_definition {.#Some program_definition} (///declaration.of_translation diff --git a/stdlib/source/library/lux/meta/compiler/default/platform.lux b/stdlib/source/library/lux/meta/compiler/default/platform.lux index 7499f93eb5..8c28500a37 100644 --- a/stdlib/source/library/lux/meta/compiler/default/platform.lux +++ b/stdlib/source/library/lux/meta/compiler/default/platform.lux @@ -22,7 +22,7 @@ ["[0]" product] ["[0]" binary (.only Binary) ["_" \\injection (.only Injection)]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" dictionary (.only Dictionary)] @@ -34,7 +34,8 @@ ["[0]" binding] ["[0]" static] ["[0]" configuration (.only Configuration)] - [type (.only sharing) + ["[0]" symbol] + ["[0]" type (.only sharing) ["[0]" check]] [macro ["[0]" expansion]]] @@ -372,7 +373,7 @@ (the (verify_dependencies importer importee dependence) (-> descriptor.Module descriptor.Module Dependence (Try Any)) - (cond (text#= importer importee) + (cond (text.= importer importee) (exception.except ..module_cannot_import_itself [importer]) (..circular_dependency? importer importee dependence) @@ -436,7 +437,7 @@ (as_expected (stm.commit! (do [! stm.monad] - [dependence (if (text#= descriptor.runtime importer) + [dependence (if (text.= descriptor.runtime importer) (stm.read dependence) (do ! [[_ dependence] (stm.update (..depend importer module) dependence)] @@ -558,7 +559,7 @@ (let [[all_dependencies duplicates _] (is [(Set descriptor.Module) (Set descriptor.Module) Bit] (list#mix (function (_ new [all duplicates seen_prelude?]) (if (set.member? all new) - (if (text#= .prelude new) + (if (text.= .prelude new) (if seen_prelude? [all (set.has new duplicates) seen_prelude?] [all duplicates true]) @@ -782,9 +783,9 @@ (exception.the .public (invalid_custom_compiler [definition type]) (Exception [Symbol Type]) (exception.report - (list ["Definition" (%.symbol definition)] - ["Expected type" (%.type ..Custom)] - ["Actual type" (%.type type)]))) + (list ["Definition" (symbol.as_text definition)] + ["Expected type" (type.as_text ..Custom)] + ["Actual type" (type.as_text type)]))) (the (custom import! it) (for_any (_ ) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis.lux index 6834376282..eeaa602461 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis.lux @@ -17,8 +17,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] @@ -30,6 +29,7 @@ [meta ["[0]" location] ["[0]" configuration (.only Configuration)] + ["[0]" symbol] ["[0]" type] ["[0]" code ["<[1]>" \\projection]] @@ -127,6 +127,9 @@ _ false)))) +(alias [=] + ..equivalence) + (template.with [ ] [(the .public (template.macro ( location content) @@ -259,7 +262,7 @@ (|> parameters (list#each injection) (text.interposed " ") - (%.message (%.symbol name) " ") + (%.message (symbol.as_text name) " ") (text.enclosed ["(" ")"])))) (every .public State @@ -306,7 +309,7 @@ (for_any (_ of) (-> Location (Operation of) (Operation of))) - (if (text#= "" (product.left location)) + (if (text.= "" (product.left location)) action (function (_ state) (let [old_location (its .#location state)] @@ -321,7 +324,7 @@ (the (located location error) (-> Location Text Text) - (%.message (%.location location) text.new_line + (%.message (location.as_text location) text.new_line error)) (the .public (failure error) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/complex.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/complex.lux index 3aa781156e..dda90c37e7 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/complex.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/complex.lux @@ -9,7 +9,7 @@ [equivalence (.only Equivalence)] [hash (.only Hash)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only Injection) ["%" \\injection]] [collection @@ -61,7 +61,7 @@ [{#Variant [expected_lefts expected_right? expected_value]} {#Variant [actual_lefts actual_right? actual_value]}] (and (n.= expected_lefts actual_lefts) - (bit#= expected_right? actual_right?) + (bit.= expected_right? actual_right?) (/#= expected_value actual_value)) [{#Tuple expected} {#Tuple actual}] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux index 8d8e4509b6..23c00cd2fb 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux @@ -13,13 +13,13 @@ ["[0]" try (.only Try)] ["[0]" exception (.only Exception)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor mix)] ["[0]" dictionary (.only Dictionary)] - ["[0]" set (.only Set) (.use "[1]#[0]" equivalence)]]] + ["[0]" set (.only Set)]]] [math [number ["n" nat (.use "[1]#[0]" interval)] @@ -94,11 +94,11 @@ true [{#Bit sideR} {#Bit sideS}] - (bit#= sideR sideS) + (bit.= sideR sideS) (,, (template.with [] [[{ partialR} { partialS}] - (set#= partialR partialS)] + (set.= partialR partialS)] [#Nat] [#Int] @@ -125,7 +125,8 @@ _ false))))) -(use "/#[0]" ..equivalence) +(alias [=] + ..equivalence) (the .public (injection value) (text.Injection Coverage) @@ -273,7 +274,7 @@ (-> Coverage Coverage (Try Coverage)) (expansion.let [ (exception.except ..redundancy [so_far addition]) {try.#Success {#Alt addition so_far}} - (if (/#= so_far addition) + (if (= so_far addition) ... The addition cannot possibly improve the coverage. ... There are now 2 alternative paths. @@ -334,7 +335,7 @@ {#Variant (maybe#composite allA allSF) casesM}))))) [{#Seq leftA rightA} {#Seq leftSF rightSF}] - (when [(/#= leftSF leftA) (/#= rightSF rightA)] + (when [(= leftSF leftA) (= rightSF rightA)] ... Same prefix [.true .false] (do try.monad @@ -419,13 +420,13 @@ ... The left part will always match, so the addition is redundant. [{#Seq left right} single] - (if (/#= left single) + (if (= left single) ) ... The right part is not necessary, since it can always match the left. [single {#Seq left right}] - (if (/#= left single) + (if (= left single) {try.#Success single} ) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux index 4944a2de57..91895e4cd5 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux @@ -39,20 +39,20 @@ (exception.the .public (cannot_infer [module type arguments]) (Exception [Text Type (List Code)]) (exception.report - (list ["Type" (%.type type)] + (list ["Type" (type.as_text type)] ["Arguments" (exception.listing (code.relative module) arguments)]))) (exception.the .public (cannot_infer_argument [module type argument]) (Exception [Text Type Code]) (exception.report - (list ["Type" (%.type type)] + (list ["Type" (type.as_text type)] ["Argument" (code.relative module argument)]))) (template.with [] [(exception.the .public ( type) (Exception Type) (exception.report - (list ["Type" (%.type type)])))] + (list ["Type" (type.as_text type)])))] [not_a_variant] [not_a_record] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux index 35827b2168..05f8627cdb 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux @@ -14,6 +14,7 @@ ["%" \\injection]]] ["[0]" meta (.only) ["[0]" module] + ["[0]" symbol] ["[0]" code]]]] [/// ["[0]" phase]]) @@ -21,14 +22,14 @@ (exception.the .public (expansion_failed [module macro inputs error]) (Exception [Text Symbol (List Code) Text]) (exception.report - (list ["Macro" (%.symbol macro)] + (list ["Macro" (symbol.as_text macro)] ["Inputs" (exception.listing (code.relative module) inputs)] ["Error" error]))) (exception.the .public (must_have_single_expansion [module macro inputs outputs]) (Exception [Text Symbol (List Code) (List Code)]) (exception.report - (list ["Macro" (%.symbol macro)] + (list ["Macro" (symbol.as_text macro)] ["Inputs" (exception.listing (code.relative module) inputs)] ["Outputs" (exception.listing (code.relative module) outputs)]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux index 92e9722dc2..eb40c0536e 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux @@ -11,13 +11,14 @@ ["[0]" try] ["[0]" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" mix functor) ["[0]" property]]]] ["[0]" meta (.only) ["[0]" module] + ["[0]" symbol] [macro ["[0]" template]]]]] ["/" // (.only Operation) @@ -32,16 +33,16 @@ (exception.the .public (cannot_define_more_than_once [name already_existing]) (Exception [Symbol Global]) (exception.report - (list ["Definition" (%.symbol name)] + (list ["Definition" (symbol.as_text name)] ["Original" (when already_existing {.#Alias it} - (%.message "alias of " (%.symbol it)) + (%.message "alias of " (symbol.as_text it)) {.#Definition it} - (%.message "definition " (%.symbol name)) + (%.message "definition " (symbol.as_text name)) {.#Default it} - (%.message "default " (%.symbol name)))]))) + (%.message "default " (symbol.as_text name)))]))) (exception.the .public (can_only_change_state_of_active_module [module state]) (Exception [Text Module_State]) @@ -69,7 +70,7 @@ (function (_ state) {try.#Success [(revised .#modules (property.revised self_name (revised .#imports (function (_ current) - (if (list.any? (text#= module) + (if (list.any? (text.= module) current) current {.#Item module current})))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/pattern.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/pattern.lux index c800133416..57686fb7eb 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/pattern.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/pattern.lux @@ -49,6 +49,9 @@ _ false)))) +(alias [=] + ..equivalence) + (the .public (injection it) (text.Injection Pattern) (when it diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/scope.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/scope.lux index 5dd21230cb..b2b8125b17 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/scope.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/scope.lux @@ -11,7 +11,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] ["[0]" product] [collection ["[0]" list (.use "[1]#[0]" functor mix monoid) @@ -56,7 +56,7 @@ mappings (its [.#captured .#mappings] scope)]) (when mappings {.#Item [_name [_source_type _source_ref]] mappings'} - (if (text#= name _name) + (if (text.= name _name) {.#Some [_source_type {variable.#Foreign idx}]} (again (++ idx) mappings')) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/simple.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/simple.lux index 1cb1176a11..96e61d1b00 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/simple.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/simple.lux @@ -7,8 +7,8 @@ [abstract [equivalence (.only Equivalence)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) (.only Injection) + ["[0]" bit] + ["[0]" text (.only Injection) ["%" \\injection]]] [math [number @@ -42,16 +42,19 @@ [[{ expected} { actual}] (<=> expected actual)] - [#Bit bit#=] + [#Bit bit.=] [#Nat n.=] [#Int i.=] [#Rev r.=] [#Dec d.=] - [#Text text#=])) + [#Text text.=])) _ false))))) +(alias [=] + ..equivalence) + (the .public (injection it) (Injection Simple) (`` (when it diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/type.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/type.lux index fcb77209cf..6262fa1938 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/type.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/type.lux @@ -19,6 +19,7 @@ ["n" nat]]] ["[0]" meta (.only) ["[0]" module] + ["[0]" symbol] [macro ["^" pattern]] [type @@ -39,7 +40,7 @@ ((/.failure error) state)))) (the prefix - (%.message (%.symbol (symbol ..type)) "#")) + (%.message (symbol.as_text (symbol ..type)) "#")) (the .public (existential? type) (-> Type Bit) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux index 62852db085..23f5b2b564 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux @@ -14,7 +14,7 @@ ["[0]" state]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" monad)] @@ -24,11 +24,12 @@ ["n" nat]]] ["[0]" meta (.only) ["[0]" module] - ["[0]" binding] ["[0]" symbol] ["[0]" code] ["[0]" label] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" binding (.only) + ["[0]" local]] + ["[0]" type (.only) ["[0]" check]] [macro ["[0]" template]]]]] @@ -47,13 +48,13 @@ (exception.the .public (not_a_quantified_type type) (Exception Type) (exception.report - (list ["Type" (%.type type)]))) + (list ["Type" (type.as_text type)]))) (template.with [] [(exception.the .public ( [module type members]) (Exception [Text Type (List Code)]) (exception.report - (list ["Type" (%.type type)] + (list ["Type" (type.as_text type)] ["Expression" (code.relative module (` [(,* members)]))])))] [invalid_tuple_type] @@ -64,7 +65,7 @@ [(exception.the .public ( [module type lefts right? code]) (Exception [Text Type Nat Bit Code]) (exception.report - (list ["Type" (%.type type)] + (list ["Type" (type.as_text type)] ["Lefts" (%.nat lefts)] ["Right?" (%.bit right?)] ["Expression" (code.relative module code)])))] @@ -77,14 +78,14 @@ (exception.the .public (cannot_analyse_variant [module type tag code]) (Exception [Text Type Symbol Code]) (exception.report - (list ["Type" (%.type type)] - ["Tag" (%.symbol tag)] + (list ["Type" (type.as_text type)] + ["Tag" (symbol.as_text tag)] ["Expression" (code.relative module code)]))) (exception.the .public (cannot_order_record [module @ code]) (Exception [Text Code (List [Symbol Code])]) (exception.report - (list ["@" (%.code @)] + (list ["@" (code.as_text @)] ["Expression" (|> code (list#each (function (_ [slot value]) (list (code.symbol slot) value))) @@ -339,8 +340,8 @@ (-> Text (Meta Bit)) (of meta.monad each - (list.any? (list.any? (|>> product.left (text#= name)))) - binding.locals)) + (list.any? (list.any? (|>> product.left (text.= name)))) + local.all)) (the (slot it) (-> Symbol @@ -360,7 +361,7 @@ (when it (list.partial head tail) (let [expected (slot_type head)] - (list.every? (|>> slot_type (type#= expected)) tail)) + (list.every? (|>> slot_type (type.= expected)) tail)) (list) false)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux index 8177dffe5a..af59591011 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux @@ -37,7 +37,7 @@ (exception.the .public (cannot_analyse [module expected function argument body]) (Exception [Text Type Text Text Code]) (exception.report - (list ["Type" (%.type expected)] + (list ["Type" (type.as_text expected)] ["Function" function] ["Argument" argument] ["Body" (code.relative module body)]))) @@ -45,7 +45,7 @@ (exception.the .public (cannot_apply [module :function: functionC arguments]) (Exception [Text Type Code (List Code)]) (exception.report - (list ["Function type" (%.type :function:)] + (list ["Function type" (type.as_text :function:)] ["Function" (code.relative module functionC)] ["Arguments" (|> arguments list.enumeration diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/when.lux index 8881cfad9e..d3b3f60e06 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/when.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/when.lux @@ -45,14 +45,14 @@ (exception.the .public (mismatch [module type pattern]) (Exception [Text Type Code]) (exception.report - (list ["Type" (%.type type)] + (list ["Type" (type.as_text type)] ["Pattern" (code.relative module pattern)]))) (exception.the .public (sum_has_no_case [case type]) (Exception [Nat Type]) (exception.report (list ["Case" (%.nat case)] - ["Type" (%.type type)]))) + ["Type" (type.as_text type)]))) (exception.the .public (invalid [module it]) (Exception [Text Code]) @@ -62,7 +62,7 @@ (exception.the .public (non_tuple type) (Exception Type) (exception.report - (list ["Type" (%.type type)]))) + (list ["Type" (type.as_text type)]))) (exception.the .public (non_exhaustive [module input branches coverage]) (Exception [Text Code (List [Code Code]) Coverage]) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux index 10281c40e2..9fb398d62d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux @@ -14,7 +14,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.only) @@ -23,7 +23,7 @@ ["[0]" meta (.only) ["[0]" binding] ["[0]" symbol] - [type (.only sharing) + ["[0]" type (.only sharing) ["[0]" check]]]]] [/// ["[0]" phase (.only Operation Phase) (.use "[1]#[0]" functor)] @@ -68,9 +68,9 @@ (exception.the .public (invalid [global expected actual]) (Exception [Symbol Type Type]) (exception.report - (list ["Definition" (%.symbol global)] - ["Expected" (%.type expected)] - ["Actual" (%.type actual)]))) + (list ["Definition" (symbol.as_text global)] + ["Expected" (type.as_text expected)] + ["Actual" (type.as_text actual)]))) (exception.the .public (error error) (Exception Text) @@ -103,7 +103,7 @@ (in it)) {.#None it} - (meta.failure (%.message "Unknown global: " (%.symbol name))))))) + (meta.failure (%.message "Unknown global: " (symbol.as_text name))))))) (the (global_value name) (-> Symbol @@ -168,4 +168,4 @@ (exception.the .public (defaults_cannot_be_referenced global) (Exception Symbol) (exception.report - (list ["Default" (%.symbol global)]))) + (list ["Default" (symbol.as_text global)]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux index b89892e154..f17b4b423b 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -21,7 +21,7 @@ [binary (.only Binary) ["[0]" \\injection]] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection]] [collection @@ -40,6 +40,8 @@ [macro ["^" pattern] ["[0]" template]] + ["[0]" type (.only) + ["[0]" check (.only Check) (.use "[1]#[0]" monad)]] [compiler [target ["[0]" jvm @@ -55,7 +57,7 @@ ["[0]" pool (.only Resource)]] [encoding ["[0]" name (.only External)]] - ["[1]" type (.only Type Argument Typed) (.use "[1]#[0]" equivalence) + ["[1]" type (.only Type Argument Typed) ["[0]" category (.only Void Value' Value Return' Return Primitive Object Class Array Var Parameter Method)] ["[0]" box] ["[0]" reflection] @@ -63,9 +65,7 @@ ["[0]" signature] ["[0]" projection] ["[0]" alias (.only Aliasing)] - ["[0]T" lux (.only Mapping)]]]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check (.only Check) (.use "[1]#[0]" monad)]]]]] + ["[0]T" lux (.only Mapping)]]]]]]]] ["[0]" // ["[1][0]" lux (.only custom install)] ["/[1]" // (.only) @@ -177,7 +177,7 @@ (exception.report (list ["Class" (%.text class)] ["Method" (%.text method)] - ["Type" (%.type type)]))) + ["Type" (type.as_text type)]))) (exception.the .public (deprecated_class class) (exception.Exception External) @@ -257,7 +257,7 @@ [(exception.the .public ( type) (exception.Exception .Type) (exception.report - (list ["Type" (%.type type)])))] + (list ["Type" (type.as_text type)])))] [non_object] [non_array] @@ -279,11 +279,11 @@ (the (method_signature_injection it) (text.Injection Method_Signature) (exception.report - (list ["Type" (%.type (its #method it))] + (list ["Type" (type.as_text (its #method it))] ["Arguments" (exception.listing jvm.injection (its #inputs it))] ["Return" (jvm.injection (its #output it))] ["Deprecated?" (%.bit (its #deprecated? it))] - ["Throws" (exception.listing %.type (its #throws it))]))) + ["Throws" (exception.listing type.as_text (its #throws it))]))) (template.with [] [(exception.the .public ( [class_variables class method method_variables inputsJT hints]) @@ -560,7 +560,7 @@ {.#Nominal name parameters} (`` (cond (or (,, (template.with [] - [(text#= (..reflection ) name)] + [(text.= (..reflection ) name)] [jvm.boolean] [jvm.byte] @@ -620,7 +620,7 @@ (`` (when objectT {.#Nominal name {.#End}} (`` (cond (,, (template.with [] - [(text#= (..reflection ) name) + [(text.= (..reflection ) name) (phase#in )] [jvm.boolean] @@ -633,7 +633,7 @@ [jvm.char])) (,, (template.with [] - [(text#= (..reflection (jvm.array )) name) + [(text.= (..reflection (jvm.array )) name) (phase#in (jvm.array ))] [jvm.boolean] @@ -993,11 +993,11 @@ can_cast? (is (Operation Bit) (`` (cond (,, (template.with [ ] [(let [=primitive (reflection.reflection )] - (or (and (text#= =primitive from_name) - (or (text#= to_name) - (text#= =primitive to_name))) - (and (text#= from_name) - (text#= =primitive to_name)))) + (or (and (text.= =primitive from_name) + (or (text.= to_name) + (text.= =primitive to_name))) + (and (text.= from_name) + (text.= =primitive to_name)))) (in true)] [reflection.boolean box.boolean] @@ -1019,7 +1019,7 @@ from_class (phase.of_try (reflection!.load class_loader from_name))] (if (ffi.of_boolean (java/lang/Class::isAssignableFrom [from_class] to_class)) (loop (again [[current_name currentT] [from_name fromT]]) - (if (text#= to_name current_name) + (if (text.= to_name current_name) (in true) (do ! [candidate_parents (is (Operation (List [[Text .Type] Bit])) @@ -1032,7 +1032,7 @@ {.#End} (in false))))) - (in (when [(type#= java/lang/Object fromT) + (in (when [(type.= java/lang/Object fromT) (projection.array? toJT)] [.true {.#Some _}] true @@ -1223,7 +1223,7 @@ correct_method? (|> method (java/lang/reflect/Method::getName []) ffi.of_string - (text#= method_name)) + (text.= method_name)) same_static? (when method_style {#Static} (ffi.of_boolean (java/lang/reflect/Modifier::isStatic [modifiers])) @@ -1240,7 +1240,7 @@ same_inputs? (and (n.= (list.size inputsJT) (list.size parameters)) (list.every? (function (_ [expectedJC actualJC]) - (jvm#= expectedJC (de_aliased aliasing actualJC))) + (jvm.= expectedJC (de_aliased aliasing actualJC))) (list.zipped_2 parameters inputsJT)))]] (in (and correct_class? correct_method? @@ -1262,7 +1262,7 @@ (java/lang/Object::equals [class]))) (n.= (list.size inputsJT) (list.size parameters)) (list.every? (function (_ [expectedJC actualJC]) - (jvm#= expectedJC (de_aliased aliasing actualJC))) + (jvm.= expectedJC (de_aliased aliasing actualJC))) (list.zipped_2 parameters inputsJT)))))) (the index_parameter @@ -1506,7 +1506,7 @@ (array.list {.#None} (java/lang/Class::getDeclaredMethods [] class))) (list.only (|>> (java/lang/reflect/Method::getName []) ffi.of_string - (text#= method_name))) + (text.= method_name))) (monad.each ! (is (-> java/lang/reflect/Method (Operation Evaluation)) (function (_ method) (do ! @@ -2408,7 +2408,7 @@ (let [[parent_name parent_parameters] (projection.read_class parent_type)] (when (list.one (function (_ super) (let [[super_name super_parameters] (projection.read_class super)] - (if (text#= parent_name super_name) + (if (text.= parent_name super_name) {.#Some super_parameters} {.#None}))) supers) @@ -2497,8 +2497,8 @@ (-> [(Type Class) Text (Type Method)] [(Type Class) Text (Type Method)] Bit) (and (of descriptor.equivalence = (jvm.descriptor super) (jvm.descriptor sub)) - (text#= super_method sub_method) - (jvm#= superJT subJT))) + (text.= super_method sub_method) + (jvm.= superJT subJT))) (the (mismatched_methods super_set sub_set) (-> (List [(Type Class) Text (Type Method)]) (List [(Type Class) Text (Type Method)]) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index feab91f67d..a12d66d12b 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -12,7 +12,7 @@ ["[0]" try] ["[0]" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [char (.only Char)] ["%" \\injection]] [collection @@ -24,6 +24,7 @@ ["[0]" meta (.only) ["[0]" module] ["[0]" binding] + ["[0]" symbol] [module ["[0]" import]] ["[0]" code @@ -257,7 +258,7 @@ (Exception [Text Symbol]) (exception.report (list ["From" (%.text from)] - ["Global" (%.symbol global)]))) + ["Global" (symbol.as_text global)]))) (the (expected_module current quoted) (-> Text Text @@ -294,7 +295,7 @@ [current _] module.current .let [expected (..expected_module current quoted_module)] imported! (import.by? ::module expected)] - (if (let [in_the_same_module? (text#= expected ::module) + (if (let [in_the_same_module? (text.= expected ::module) can_access_export? (and exported? imported!)] (or validated_access? in_the_same_module? diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux index f368aa348f..a4b545bd7d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux @@ -33,7 +33,7 @@ ["^" pattern] ["[0]" expansion] ["[0]" template]] - ["[0]" type (.only sharing) (.use "[1]#[0]" equivalence) + ["[0]" type (.only sharing) ["[0]" check]]]]] ["[0]" /// (.only) ["[1][0]" analysis] @@ -275,7 +275,7 @@ (-> Type Type Type Type) (function (again type) - (if (type#= original type) + (if (type.= original type) replacement (`` (when type {.#Nominal name parameters} diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/synthesis/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/synthesis/lux.lux index dfa4cc9ca8..df093b0cd3 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/synthesis/lux.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/synthesis/lux.lux @@ -13,7 +13,7 @@ ["[0]" dictionary]]] [meta ["[0]" location] - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] [macro ["[0]" template]]]]] ["[0]" /// (.only) @@ -42,7 +42,7 @@ (|>> (list#each (function (_ it) (when it [@ {synthesis.#Extension actual parameters}] - (if (symbol#= expected actual) + (if (symbol.= expected actual) parameters (list it)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux index 95a0c95cb4..7142b2492b 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/translation/jvm/host.lux @@ -15,7 +15,7 @@ ["[0]" product] [binary ["[0]" \\injection]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection]] [collection @@ -622,14 +622,14 @@ (do phase.monad [valueG (translate archive valueS)] (in (`` (cond (,, (template.with [ ] - [(and (text#= (..reflection ) from) - (text#= to)) + [(and (text.= (..reflection ) from) + (text.= to)) (all _.composite valueG (///value.boxed )) - (and (text#= from) - (text#= (..reflection ) to)) + (and (text.= from) + (text.= (..reflection ) to)) (all _.composite valueG (///value.primitive ))] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux index 7b08992a57..1fafd46c8f 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/when.lux @@ -11,8 +11,8 @@ ["[0]" pipe]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor mix monoid)] ["[0]" set (.only Set)]]] @@ -161,7 +161,7 @@ [{/.#Bit_Fork new_when new_then new_else} {/.#Bit_Fork old_when old_then old_else}] - (if (bit#= new_when old_when) + (if (bit.= new_when old_when) {/.#Bit_Fork old_when (weave new_then old_then) (when [new_else old_else] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++.lux index 0686203136..3fd41281d3 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++.lux @@ -6,23 +6,9 @@ [lux (.except) [abstract [monad (.only do)]] - [control - ["[0]" try] - ["[0]" exception (.only Exception)]] - [data - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\injection]]] - ["[0]" meta (.only) + [meta [macro - ["[0]" template]] - [type - ["[0]" check]] - [compiler - [meta - ["[0]" archive (.only Archive)] - ["[0]" cache - [dependency - ["[1]/[0]" artifact]]]]]]]] + ["[0]" template]]]]] ["[0]" / [runtime (.only Operation Phase Handler)] ["[1][0]" primitive] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux index e7cc7b78ed..e7501f074c 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux @@ -7,25 +7,15 @@ if let exec when int local its) [abstract ["[0]" monad (.only do)]] - [control - ["[0]" function]] [data [collection ["[0]" list (.use "[1]#[0]" mix)] - ["[0]" set]] - ["[0]" text (.use "[1]#[0]" equivalence)]] - [math - [number - ["n" nat] - ["[0]" i32]]] + ["[0]" set]]] [meta ["[0]" location] - [macro - ["^" pattern]] [compiler [target - ["_" c++ (.only) - ["[0]" type]]]]]]] + ["_" c++]]]]]] ["[0]" // ["[1][0]" type] ["[0]" runtime (.only Operation Phase)] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/common_lisp/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/common_lisp/runtime.lux index b23f1899f3..bf7ba244cc 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/common_lisp/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/common_lisp/runtime.lux @@ -114,7 +114,7 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (, (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (let [g!name (code.local name) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux index edce6aba36..91bb85769d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux @@ -123,7 +123,7 @@ (<>.some .local)))) code .any]) (macro.with_symbols [g!_ runtime] - (let [runtime_name (` (_.var (, (code.text (%.code runtime)))))] + (let [runtime_name (` (_.var (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (let [g!name (code.local name)] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm.lux index 3d4cadf573..60fcbc7c52 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm.lux @@ -10,7 +10,7 @@ ["[0]" try] ["[0]" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] ["[0]" meta (.only) [macro @@ -51,7 +51,7 @@ [.let [[expected_module line column] @] actual_module translation.module it it] - (in (if (text#= expected_module actual_module) + (in (if (text.= expected_module actual_module) (do _.monad [_ (_.map line)] it) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux index 2860c8f034..3b4a8d1914 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux @@ -11,7 +11,7 @@ [target [jvm ["_" bytecode (.only Bytecode)] - ["[0]" type (.only Type) (.use "[1]#[0]" equivalence) + ["[0]" type (.only Type) [category (.only Primitive)] ["[0]" box]]]]]]]]) @@ -22,7 +22,7 @@ (-> (Type Primitive) Text) (`` (cond (,, (template.with [ ] - [(type#= type) ] + [(type.= type) ] [type.boolean ] [type.byte ] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux index 07d1ccfbaf..11b06bb993 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux @@ -7,12 +7,9 @@ if let exec when int its) [abstract ["[0]" monad (.only do)]] - [control - ["[0]" function]] [data [collection - ["[0]" list (.use "[1]#[0]" mix)]] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" list (.use "[1]#[0]" mix)]]] [math [number ["n" nat] @@ -23,10 +20,7 @@ [compiler [target [jvm - ["_" bytecode (.only Label Bytecode) (.use "[1]#[0]" monad) - [environment - [limit - ["[0]" stack]]]] + ["_" bytecode (.only Label Bytecode) (.use "[1]#[0]" monad)] ["[0]" type (.only Type) [category (.only Method)]]]]]]]] ["[0]" // diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux index 3e20f4652b..4dcc6c0d26 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux @@ -154,7 +154,7 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (, (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (macro.with_symbols [g!_] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux index 3b57fdfb8b..0193cf503f 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux @@ -100,7 +100,7 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.constant (, (code.text (%.code runtime)))))] + runtime_name (` (_.constant (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (macro.with_symbols [g!_] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux index a4fa673a86..c6c5395cda 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux @@ -103,7 +103,7 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (, (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (let [g!name (code.local name)] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux index e419f1b798..edb8d1d595 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux @@ -136,7 +136,7 @@ {.#Left name} (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.constant (, (code.text (%.code runtime))))) + runtime_name (` (_.constant (, (code.text (code.as_text runtime))))) g!name (code.local name)] (in (list (` (the .public (, g!name) _.CVar (, runtime_name))) (` (the (, (code.local (%.message "@" name))) @@ -151,7 +151,7 @@ {.#Right [name inputs]} (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.local (, (code.text (%.code runtime))))) + runtime_name (` (_.local (, (code.text (code.as_text runtime))))) g!name (code.local name) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux index ff4581be3f..b9a546df3b 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux @@ -85,7 +85,7 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (, (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (code.as_text runtime)))))] (when declaration {.#Left name} (let [g!name (code.local name)] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux index 0851615f44..f16614d0bf 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux @@ -194,7 +194,7 @@ (the !failure (template.macro (_ projection where offset source_code) [{.#Left [[where offset source_code] - (exception.error ..unrecognized_input [where (%.symbol (symbol projection)) source_code offset])]}])) + (exception.error ..unrecognized_input [where (symbol.as_text (symbol projection)) source_code offset])]}])) (the !end_of_file (template.macro (_ where offset source_code current_module) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis.lux index 955e3d932c..08c7b90326 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis.lux @@ -17,8 +17,8 @@ [data ["[0]" sum] ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -488,7 +488,7 @@ [{#Bit_Fork expected_when expected_then expected_else} {#Bit_Fork actual_when actual_then actual_else}] - (and (bit#= expected_when actual_when) + (and (bit.= expected_when actual_when) (= expected_then actual_then) (of (maybe.equivalence =) = expected_else actual_else)) @@ -683,7 +683,7 @@ (of (list.hash super) hash resets)) )))) -(the (function_equivalence (open "#[0]")) +(the (function_equivalence (open "/#[0]")) (for_any (_ of) (-> (Equivalence of) (Equivalence (Function of)))) @@ -692,14 +692,14 @@ (.when [expected actual] [{#Abstraction [expected_environment expected_arity expected_body]} {#Abstraction [actual_environment actual_arity actual_body]}] - (and (of (list.equivalence #=) = expected_environment actual_environment) + (and (of (list.equivalence /#=) = expected_environment actual_environment) (n.= expected_arity actual_arity) - (#= expected_body actual_body)) + (/#= expected_body actual_body)) [{#Apply [expected_abstraction expected_arguments]} {#Apply [actual_abstraction actual_arguments]}] - (and (#= expected_abstraction actual_abstraction) - (of (list.equivalence #=) = expected_arguments actual_arguments)) + (and (/#= expected_abstraction actual_abstraction) + (of (list.equivalence /#=) = expected_arguments actual_arguments)) _ false)))) @@ -726,7 +726,7 @@ (of (list.hash super) hash arguments)) )))) -(the (control_equivalence (open "#[0]")) +(the (control_equivalence (open "/#[0]")) (for_any (_ of) (-> (Equivalence of) (Equivalence (Control of)))) @@ -735,7 +735,7 @@ (`` (.when [expected actual] (,, (template.with [ ] [[{ expected} { actual}] - (of ( #=) = expected actual)] + (of ( /#=) = expected actual)] [#Branch ..branch_equivalence] [#Loop ..loop_equivalence] @@ -781,6 +781,9 @@ _ false))))) +(alias [=] + ..equivalence) + (the .public path_equivalence (Equivalence Path) (path'_equivalence equivalence)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access.lux b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access.lux index 0f814153c1..3b46bae842 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access.lux @@ -39,3 +39,6 @@ (the .public equivalence (Equivalence Access) (of ..hash equivalence)) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/member.lux b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/member.lux index a2942380a3..b3745d5bb6 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/member.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/member.lux @@ -35,3 +35,6 @@ (the .public equivalence (Equivalence Member) (of ..hash equivalence)) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/side.lux b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/side.lux index a0d5a0835b..41f1b16e3d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/side.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/access/side.lux @@ -35,3 +35,6 @@ (the .public equivalence (Equivalence Side) (of ..hash equivalence)) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/simple.lux b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/simple.lux index da9bf7641f..1de6ecb2d8 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/simple.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/synthesis/simple.lux @@ -10,15 +10,15 @@ [control ["[0]" pipe]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]]] [math [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] ["n" nat] ["i" int] - ["d" dec]]] + ["d" dec] + ["[0]" i64]]] [meta [macro ["[0]" template]]]]]) @@ -53,16 +53,19 @@ [[{ expected'} { actual'}] ( expected' actual')] - [#Bit bit#= %.bit] + [#Bit bit.= %.bit] [#F64 d.= %.dec] - [#Text text#= %.text])) + [#Text text.= %.text])) [{#I64 expected'} {#I64 actual'}] - (i64#= expected' actual') + (i64.= expected' actual') _ false))))) +(alias [=] + ..equivalence) + (the .public hash (Hash Simple) (implementation 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 640d85e342..456bec7c34 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/translation.lux @@ -14,7 +14,7 @@ [data [binary (.only Binary)] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" sequence (.only Sequence)] @@ -302,7 +302,7 @@ (let [[_module _name] name] (do try.monad [@module (archive.id _module archive) - registry (if (text#= (its #module state) _module) + registry (if (text.= (its #module state) _module) {try.#Success (its #registry state)} (do try.monad [[_module output registry] (archive.find _module archive)] @@ -322,7 +322,7 @@ (let [[_module _name] name] (do try.monad [@module (archive.id _module archive) - registry (if (text#= (its #module state) _module) + registry (if (text.= (its #module state) _module) {try.#Success (its #registry state)} (do try.monad [[_module output registry] (archive.find _module archive)] diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive.lux b/stdlib/source/library/lux/meta/compiler/meta/archive.lux index f7674160ad..0fbeecc142 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive.lux @@ -7,29 +7,25 @@ #module has) [abstract - ["[0]" equivalence (.only Equivalence)] - ["[0]" monad (.only do)]] + [monad (.only do)]] [control ["<>" projection] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only Exception)] - ["[0]" function]] + ["[0]" exception (.only Exception)]] [data - ["[0]" product] ["[0]" binary (.only Binary) ["[0]" \\injection (.only Injection)] ["<[1]>" \\projection (.only Projection)]] ["[0]" text (.only) ["%" \\injection]] [collection + [sequence (.only Sequence)] ["[0]" list (.use "[1]#[0]" functor mix)] - ["[0]" dictionary (.only Dictionary)] - ["[0]" set] - ["[0]" sequence (.only Sequence)]]] + ["[0]" dictionary (.only Dictionary)]]] [math [number - ["n" nat (.use "[1]#[0]" equivalence)]]] + ["n" nat]]] [meta ["[0]" configuration (.only Configuration)] [type @@ -289,7 +285,7 @@ (do try.monad [[actual_version actual_configuration next reservations] (.value ..projection binary) _ (exception.assertion ..version_mismatch [expected_version actual_version] - (n#= expected_version actual_version)) + (n.= expected_version actual_version)) _ (exception.assertion ..configuration_mismatch [expected_configuration actual_configuration] (of configuration.equivalence = expected_configuration diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact.lux index b997bc037f..f76d335549 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact.lux @@ -33,3 +33,6 @@ /category.equivalence bit.equivalence )) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/category.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/category.lux index eec98a5fe6..1cb71babee 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/category.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/category.lux @@ -10,7 +10,7 @@ ["[0]" maybe]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math [number ["[0]" nat]]] @@ -40,8 +40,11 @@ (of definition.equivalence = left right) [{#Custom left} {#Custom right}] - (text#= left right) + (text.= left right) _ false )))) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/definition.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/definition.lux index f3551c9cd8..e27b896edc 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/definition.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/artifact/definition.lux @@ -31,3 +31,6 @@ nat.equivalence )) )) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/module/descriptor.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/module/descriptor.lux index 1697ab0640..3c3f49863d 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/module/descriptor.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/module/descriptor.lux @@ -66,6 +66,9 @@ set.equivalence )) +(alias [=] + ..equivalence) + (the .public injection (Injection Descriptor) (all \\injection.and diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux index 6e3719968c..356f5f5dac 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux @@ -20,7 +20,7 @@ [type (.only sharing) ["[0]" nominal]]]]] [/// - ["[0]" signature (.only Signature) (.use "[1]#[0]" equivalence)] + ["[0]" signature (.only Signature)] ["[0]" key (.only Key)]]) (exception.the .public (invalid_signature [expected actual]) @@ -37,9 +37,8 @@ (the .public (content key document) (for_any (_ d) (-> (Key d) (Document Any) (Try d))) (let [[document//signature document//content] (nominal.representation document)] - (if (of signature.equivalence = - (key.signature key) - document//signature) + (if (signature.= (key.signature key) + document//signature) {try.#Success (sharing [e] (is (Key e) key) @@ -80,7 +79,7 @@ (do <>.monad [actual signature.projection .let [expected (key.signature key)] - _ (if (signature#= expected actual) + _ (if (signature.= expected actual) (in []) (<>.of_try (exception.except ..invalid_signature [expected actual]))) it it] diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/signature.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/signature.lux index f1c037afbd..d93b7088cf 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/signature.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/signature.lux @@ -34,9 +34,12 @@ symbol.equivalence nat.equivalence)) +(alias [=] + ..equivalence) + (the .public (description signature) (-> Signature Text) - (%.message (%.symbol (its #name signature)) + (%.message (symbol.as_text (its #name signature)) " " (version.injection (its #version signature)))) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux index 90049b5273..b5f3e265e3 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux @@ -46,6 +46,9 @@ (Equivalence ID) (of ..hash equivalence)) +(alias [=] + ..equivalence) + (the .public none (Set ID) (set.empty ..hash)) diff --git a/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux b/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux index 94b36783a5..b081c5507e 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux @@ -13,7 +13,7 @@ [data [binary (.only Binary)] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -110,7 +110,7 @@ pairs (|> files (list#each (function (_ file) [(file.name fs file) file])) - (list.only (|>> product.left (text#= ..file) not)) + (list.only (|>> product.left (text.= ..file) not)) (monad.each ! (function (_ [name path]) (|> path (of fs read) diff --git a/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux b/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux index 8584ca2598..05059dbaf0 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux @@ -13,7 +13,7 @@ [function [predicate (.only Predicate)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text (.only)] [collection ["[0]" list (.use "[1]#[0]" mix functor)] ["[0]" dictionary (.only Dictionary)] @@ -55,9 +55,9 @@ (the .public (valid? expected actual) (-> Descriptor Input Bit) - (and (text#= (its descriptor.#name expected) + (and (text.= (its descriptor.#name expected) (its ////.#module actual)) - (text#= (its descriptor.#file expected) + (text.= (its descriptor.#file expected) (its ////.#file actual)) (n.= (its descriptor.#hash expected) (its ////.#hash actual)))) diff --git a/stdlib/source/library/lux/meta/compiler/meta/cli.lux b/stdlib/source/library/lux/meta/compiler/meta/cli.lux index 377ee2e7d9..0768cc5bec 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/cli.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/cli.lux @@ -5,23 +5,13 @@ [library [lux (.except Module Source Target #module #target #configuration) - [abstract - [monad (.only do)] - [equivalence (.only Equivalence)]] [control ["<>" projection] - ["[0]" pipe]] + ["|" pipe]] [data - ["[0]" product] - ["[0]" text (.only) - ["%" \\injection] - ["<[1]>" \\projection]] - [collection - ["[0]" list (.use "[1]#[0]" functor)]]] - [math - [number (.only hex)]] + ["[0]" text + ["<[1]>" \\projection]]] [meta - ["[0]" symbol] ["[0]" configuration (.only Configuration)] [macro ["^" pattern] @@ -119,8 +109,7 @@ (the .public target (-> Service Target) - (|>> (pipe.when - (^.or {#Compilation [host_dependencies libraries compilers sources target module]} - {#Interpretation [host_dependencies libraries compilers sources target module]} - {#Export [sources target]}) + (|>> (|.when (^.or {#Compilation [host_dependencies libraries compilers sources target module]} + {#Interpretation [host_dependencies libraries compilers sources target module]} + {#Export [sources target]}) target))) diff --git a/stdlib/source/library/lux/meta/compiler/meta/cli/compiler.lux b/stdlib/source/library/lux/meta/compiler/meta/cli/compiler.lux index ddd967063b..a81fb27d6c 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/cli/compiler.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/cli/compiler.lux @@ -35,6 +35,9 @@ (list.equivalence text.equivalence) )) +(alias [=] + ..equivalence) + (template.with [ ] [(the Text diff --git a/stdlib/source/library/lux/meta/compiler/meta/io/archive.lux b/stdlib/source/library/lux/meta/compiler/meta/io/archive.lux index 7301ea7517..37d7d00f34 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/io/archive.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/io/archive.lux @@ -16,7 +16,7 @@ ["[0]" product] ["[0]" binary (.only Binary) ["<[1]>" \\projection (.only Projection)]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection [set (.only Set)] @@ -123,7 +123,7 @@ {category.#Definition [name function_artifact]} (let [output (sequence.suffix [@artifact {.#None} data] output)] - (if (text#= $/program.name name) + (if (text.= $/program.name name) (in [definitions output]) (do ! @@ -208,7 +208,7 @@ [data (is (Async (Try Binary)) (cache/module.cache fs @module)) [module registry] (async#in (.value (..cache_projection customs) data))] - (if (text#= descriptor.runtime module_name) + (if (text.= descriptor.runtime module_name) (in [true ]) (do ! [input (//context.read fs ..pseudo_module import contexts (its context.#host_module_extension context) module_name)] diff --git a/stdlib/source/library/lux/meta/compiler/reference.lux b/stdlib/source/library/lux/meta/compiler/reference.lux index a3f095cb01..2cbe81cc18 100644 --- a/stdlib/source/library/lux/meta/compiler/reference.lux +++ b/stdlib/source/library/lux/meta/compiler/reference.lux @@ -46,6 +46,9 @@ _ false))))) +(alias [=] + ..equivalence) + (the .public hash (Hash Reference) (implementation @@ -96,4 +99,4 @@ (/variable.injection variable) {#Constant constant} - (%.symbol constant)))) + (symbol.as_text constant)))) diff --git a/stdlib/source/library/lux/meta/compiler/reference/variable.lux b/stdlib/source/library/lux/meta/compiler/reference/variable.lux index 1d59c2bc07..d1e67375ed 100644 --- a/stdlib/source/library/lux/meta/compiler/reference/variable.lux +++ b/stdlib/source/library/lux/meta/compiler/reference/variable.lux @@ -44,6 +44,9 @@ _ false))))) +(alias [=] + ..equivalence) + (the .public hash (Hash Variable) (implementation diff --git a/stdlib/source/library/lux/meta/compiler/target/c++.lux b/stdlib/source/library/lux/meta/compiler/target/c++.lux index 94f0708667..3654b37b95 100644 --- a/stdlib/source/library/lux/meta/compiler/target/c++.lux +++ b/stdlib/source/library/lux/meta/compiler/target/c++.lux @@ -13,7 +13,7 @@ [function [predicate (.only Predicate)]]] [data - ["[0]" text (.only \n \t) (.use "[1]#[0]" equivalence) + ["[0]" text (.only \n \t) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor monoid)]]] @@ -48,7 +48,7 @@ (Equivalence (Code of))) (implementation (the (= refererence it) - (text#= (%> refererence) + (text.= (%> refererence) (%> it))))) (the .public manual diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute.lux index 57c1c5a1e6..2776656bfa 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute.lux @@ -87,6 +87,9 @@ (info_equivalence /line_number_table.equivalence) )))) +(alias [=] + ..equivalence) + (the common_attribute_length (all n.+ ... u2 attribute_name_index; diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/code/exception.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/code/exception.lux index 88bc6e28dd..0d5b972b98 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/code/exception.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/code/exception.lux @@ -38,6 +38,9 @@ ////index.equivalence )) +(alias [=] + ..equivalence) + ... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3 (the .public length Nat diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/constant.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/constant.lux index a398a946df..abf71946a4 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/constant.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/constant.lux @@ -22,6 +22,9 @@ (for_any (_ a) (Equivalence (Constant a))) ///index.equivalence) +(alias [=] + ..equivalence) + (the .public length ///index.length) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/line_number_table.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/line_number_table.lux index 49076159a0..e048b4e802 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/line_number_table.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/attribute/line_number_table.lux @@ -69,6 +69,9 @@ (Equivalence Line_Number_Table) (sequence.equivalence entry_equivalence)) +(alias [=] + ..equivalence) + (the .public injection (Injection Line_Number_Table) (!binary.sequence_16 entry_injection)) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode.lux index d9904e1269..f0ce2e9f8c 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode.lux @@ -30,6 +30,7 @@ ["i" int] ["[0]" i32 (.only I32)]]] [meta + ["[0]" symbol] [macro ["[0]" template] ["[0]" expansion]]]]] @@ -149,7 +150,7 @@ (exception.the .public (mismatched_environments [instruction label address expected actual]) (exception.Exception [Symbol Label Address Stack Stack]) (exception.report - (list ["Instruction" (%.symbol instruction)] + (list ["Instruction" (symbol.as_text instruction)] ["Label" (%.nat label)] ["Address" (/address.text address)] ["Expected" (/stack.text expected)] diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/address.lux index d78c8a75aa..e9af1a89ce 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/address.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/address.lux @@ -74,6 +74,9 @@ (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the .public injection (Injection Address) (|>> nominal.representation diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit.lux index 1c052b5757..cd9b290dc0 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit.lux @@ -3,7 +3,8 @@ (.require [library - [lux (.except Type static) + [lux (.except Type + static) [abstract [monad (.only do)] [equivalence (.only Equivalence)]] @@ -57,6 +58,9 @@ /registry.equivalence )) +(alias [=] + ..equivalence) + (the .public (injection limit) (Injection Limit) (all \\injection#composite diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/registry.lux index f83d25be1c..bc2ee73ab6 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/registry.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/registry.lux @@ -3,7 +3,8 @@ (.require [library - [lux (.except Type for static has) + [lux (.except Type + for static has) [abstract ["[0]" equivalence (.only Equivalence)]] [control @@ -70,6 +71,9 @@ (|>> nominal.representation) /////unsigned.equivalence)) + (alias [=] + ..equivalence) + (the .public injection (Injection Registry) (|>> nominal.representation diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/stack.lux index e0aff4da79..b5c5ad864f 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/stack.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/environment/limit/stack.lux @@ -44,6 +44,9 @@ (|>> nominal.representation) /////unsigned.equivalence)) + (alias [=] + ..equivalence) + (the .public injection (Injection Stack) (|>> nominal.representation diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/jump.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/jump.lux index 1cc5a60265..a1066027e8 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/jump.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/bytecode/jump.lux @@ -20,6 +20,9 @@ (Equivalence Jump) ///signed.equivalence) +(alias [=] + ..equivalence) + (the .public injection (Injection Jump) ///signed.injection/2) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/class.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/class.lux index 7953b9cbd0..979ecd6e8c 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/class.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/class.lux @@ -79,6 +79,9 @@ (sequence.equivalence //method.equivalence) (sequence.equivalence //attribute.equivalence))) +(alias [=] + ..equivalence) + (the (install_classes this super interfaces) (-> Internal Internal (List Internal) (Resource [(Index //constant.Class) (Index //constant.Class) (Sequence (Index //constant.Class))])) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/constant.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/constant.lux index 549fea24d0..1ae4f1ef2f 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/constant.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/constant.lux @@ -227,6 +227,9 @@ ... ) ) +(alias [=] + ..equivalence) + (the .public injection (Injection Constant) (expansion.let [ (these [#UTF8 /tag.utf8 ..utf8_injection] diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/constant/pool.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/constant/pool.lux index a3dedfbf6d..89c1953b5a 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/constant/pool.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/constant/pool.lux @@ -48,6 +48,9 @@ (sequence.equivalence (product.equivalence //index.equivalence //.equivalence)))) +(alias [=] + ..equivalence) + (every .public (Resource a) (state.With Try Pool a)) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/constant/tag.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/constant/tag.lux index 8bcd24aac0..06355090b5 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/constant/tag.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/constant/tag.lux @@ -30,6 +30,9 @@ (u1//= (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (template.with [ ] [(the .public Tag diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/signed.lux index ff18c734b2..c1a80ac524 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/signed.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/signed.lux @@ -41,6 +41,9 @@ (the (= expected actual) (i.= (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the .public order (for_any (_ brand) (Order (Signed brand))) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/unsigned.lux index 7679796060..2daf30afc1 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/encoding/unsigned.lux @@ -20,6 +20,7 @@ ["n" nat] ["[0]" i64]]] [meta + ["[0]" symbol] [macro ["[0]" template] ["[0]" expansion]] @@ -40,6 +41,9 @@ (n.= (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the .public order (for_any (_ brand) (Order (Unsigned brand))) (implementation @@ -51,7 +55,7 @@ (exception.the .public (value_exceeds_the_maximum [type value maximum]) (Exception [Symbol Nat (Unsigned Any)]) (exception.report - (list ["Type" (%.symbol type)] + (list ["Type" (symbol.as_text type)] ["Value" (%.nat value)] ["Maximum" (%.nat (nominal.representation maximum))]))) @@ -59,7 +63,7 @@ (for_any (_ brand) (Exception [Symbol (Unsigned brand) (Unsigned brand)])) (exception.report - (list ["Type" (%.symbol type)] + (list ["Type" (symbol.as_text type)] ["Parameter" (%.nat (nominal.representation parameter))] ["Subject" (%.nat (nominal.representation subject))]))) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/field.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/field.lux index 601c024ea9..ce3057cac4 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/field.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/field.lux @@ -56,6 +56,9 @@ //index.equivalence (sequence.equivalence //attribute.equivalence))) +(alias [=] + ..equivalence) + (the .public (injection field) (Injection Field) (`` (all binaryF#composite diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/index.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/index.lux index b8fc3c9e4a..a41d88a236 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/index.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/index.lux @@ -39,6 +39,9 @@ ..value //unsigned.equivalence)) + (alias [=] + ..equivalence) + (the .public injection (for_any (_ kind) (Injection (Index kind))) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/method.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/method.lux index a1b51c8621..936fe19cdc 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/method.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/method.lux @@ -112,6 +112,9 @@ (sequence.equivalence //attribute.equivalence) )) +(alias [=] + ..equivalence) + (the .public (injection field) (Injection Method) (`` (all \\injection#composite diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/modifier.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/modifier.lux index b92682f2cf..cc6e7fbb61 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/modifier.lux @@ -45,6 +45,9 @@ (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the !abstraction (template.macro (_ value) [(|> value diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/reflection.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/reflection.lux index 7f8c107c0d..810085c6ba 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/reflection.lux @@ -11,7 +11,7 @@ ["[0]" try (.only Try) (.use "[1]#[0]" functor)] ["[0]" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["" \\projection]] [collection @@ -152,7 +152,7 @@ (java/lang/Class::getName []) ffi.of_string)] (`` (if (or (,, (template.with [] - [(text#= (/reflection.reflection ) + [(text.= (/reflection.reflection ) class_name)] [/reflection.boolean] @@ -250,7 +250,7 @@ (java/lang/Class::getName []) ffi.of_string)] (`` (cond (,, (template.with [ ] - [(text#= (/reflection.reflection ) + [(text.= (/reflection.reflection ) class_name) {try.#Success }] @@ -284,7 +284,7 @@ (as (java/lang/Class java/lang/Object)) (java/lang/Class::getName []) ffi.of_string)] - (if (text#= (/reflection.reflection /reflection.void) + (if (text.= (/reflection.reflection /reflection.void) class_name) {try.#Success /.void} )) @@ -296,7 +296,7 @@ (Exception [(java/lang/Class java/lang/Object) Type]) (exception.report (list ["Class" (ffi.of_string (java/lang/Object::toString [] class))] - ["Type" (%.type type)]))) + ["Type" (type.as_text type)]))) (exception.the .public (type_parameter_mismatch [expected actual class type]) (Exception [Nat Nat (java/lang/Class java/lang/Object) Type]) @@ -304,12 +304,12 @@ (list ["Expected" (%.nat expected)] ["Actual" (%.nat actual)] ["Class" (ffi.of_string (java/lang/Object::toString [] class))] - ["Type" (%.type type)]))) + ["Type" (type.as_text type)]))) (exception.the .public (non_jvm_type type) (Exception Type) (exception.report - (list ["Type" (%.type type)]))) + (list ["Type" (type.as_text type)]))) (the .public (correspond class type) (-> (java/lang/Class java/lang/Object) Type @@ -326,7 +326,7 @@ class_params (array.list {.#None} (java/lang/Class::getTypeParameters [] class)) num_class_params (list.size class_params) num_type_params (list.size params)] - (if (text#= class_name name) + (if (text.= class_name name) (if (n.= num_class_params num_type_params) (|> params (list.zipped_2 (list#each (|>> (java/lang/reflect/TypeVariable::getName []) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/type.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/type.lux index c56bc83d66..ba02f365e2 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/type.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/type.lux @@ -177,6 +177,9 @@ (..signature parameter) (..signature subject))))) + (alias [=] + ..equivalence) + (the .public hash (for_any (_ category) (Hash (Type category))) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/type/descriptor.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/type/descriptor.lux index c7e8176a93..03762f6102 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/type/descriptor.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/type/descriptor.lux @@ -10,7 +10,7 @@ [control ["[0]" maybe]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -112,9 +112,12 @@ (Equivalence (Descriptor category))) (implementation (the (= parameter subject) - (text#= (nominal.representation parameter) + (text.= (nominal.representation parameter) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (the .public class_name (-> (Descriptor Object) Internal) (let [prefix_size (text.size ..class_prefix) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/type/lux.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/type/lux.lux index 5ff9be1556..bdcb2a621f 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/type/lux.lux @@ -12,7 +12,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection (.only Projection)]] [collection @@ -189,7 +189,7 @@ (when elementT {.#Nominal name {.#End}} (if (`` (or (,, (template.with [] - [(text#= (//reflection.reflection ) name)] + [(text.= (//reflection.reflection ) name)] [//reflection.boolean] [//reflection.byte] diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/type/reflection.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/type/reflection.lux index f2da15b798..6b609db481 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/type/reflection.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/type/reflection.lux @@ -8,7 +8,7 @@ [abstract [equivalence (.only Equivalence)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [meta [type @@ -34,9 +34,12 @@ (Equivalence (Reflection category))) (implementation (the (= parameter subject) - (text#= (nominal.representation parameter) + (text.= (nominal.representation parameter) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (template.with [ ] [(the .public (Reflection ) diff --git a/stdlib/source/library/lux/meta/compiler/target/jvm/type/signature.lux b/stdlib/source/library/lux/meta/compiler/target/jvm/type/signature.lux index d8b3864a0f..1305bf6c27 100644 --- a/stdlib/source/library/lux/meta/compiler/target/jvm/type/signature.lux +++ b/stdlib/source/library/lux/meta/compiler/target/jvm/type/signature.lux @@ -182,9 +182,12 @@ (Equivalence (Signature category))) (implementation (the (= parameter subject) - (text#= (nominal.representation parameter) + (text.= (nominal.representation parameter) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (the .public hash (for_any (_ category) (Hash (Signature category))) diff --git a/stdlib/source/library/lux/meta/configuration.lux b/stdlib/source/library/lux/meta/configuration.lux index 77a94ae66e..5e1fda37b3 100644 --- a/stdlib/source/library/lux/meta/configuration.lux +++ b/stdlib/source/library/lux/meta/configuration.lux @@ -13,7 +13,7 @@ ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection (.only Projection)]] [collection @@ -35,6 +35,9 @@ (Equivalence Configuration) (/.equivalence text.equivalence)) +(alias [=] + ..equivalence) + (the .public monoid (Monoid Configuration) /.monoid) @@ -85,7 +88,7 @@ {.#Item [feature value] tail} (and (|> actual (/.value feature) - (maybe#each (text#= value)) + (maybe#each (text.= value)) (maybe.else false)) (subsumed? expected tail)))) diff --git a/stdlib/source/library/lux/meta/label.lux b/stdlib/source/library/lux/meta/label.lux index 82ce9a4f82..0ae54dc54c 100644 --- a/stdlib/source/library/lux/meta/label.lux +++ b/stdlib/source/library/lux/meta/label.lux @@ -10,15 +10,15 @@ ["[0]" try] ["[0]" exception (.only Exception)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text (.only)] [collection ["[0]" list (.use "[1]#[0]" mix) ["[0]" property]]]]]] ["[0]" // (.only) ["[0]" module] ["[0]" binding] - ["[0]" symbol (.use "[1]#[0]" equivalence absolute)] - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" symbol (.use "[1]#[0]" absolute)] + ["[0]" type] [macro ["[0]" template] ["[0]" expansion]]]) @@ -36,7 +36,7 @@ (list [(template.text [,type]) (symbol#injection it)]))) (exception.the (,cannot_access [it from]) - (Exception [Symbol Text]) + (Exception [Symbol module.Name]) (exception.report (list [(template.text [,type]) (symbol#injection it)] ["From" (text.injection from)]))) @@ -55,9 +55,9 @@ [this_module_name _] module.current] (when (property.value (symbol.short it) (its .#definitions module)) {try.#Success [exported? {.#Definition [def_type def_value]}]} - (if (.or (text#= this_module_name (symbol.module it)) + (if (.or (text.= this_module_name (symbol.module it)) exported?) - (if (type#= ,type def_type) + (if (type.= ,type def_type) (in (as Label def_value)) (//.of_try (exception.except ,not_a [it]))) (//.of_try (exception.except ,cannot_access [it this_module_name]))) @@ -83,11 +83,11 @@ (expansion.let [,try_again (,plural tail)] (when global {.#Definition [type value]} - (if (type#= ,type type) + (if (type.= ,type type) (let [[label type] (as Label value)] (when type {.#Named actual_name anonymous} - (if (symbol#= type_name actual_name) + (if (symbol.= type_name actual_name) (in (when label {.#Some [lefts right? family]} family @@ -112,7 +112,7 @@ ) (the .public (tag_lists module) - (-> Text + (-> module.Name (Meta (List [(List Symbol) Type]))) (do //.monad [=module (module.by_name module) @@ -121,9 +121,9 @@ (list#mix (function (_ [short [exported? global]] output) (when global {.#Definition [type value]} - (if (and (type#= Slot type) + (if (and (type.= Slot type) (or exported? - (text#= this_module_name module))) + (text.= this_module_name module))) (let [[label type] (as Label value)] (when label {.#Some [lefts right? family]} diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux index b7bbb9b70a..73b5de39d0 100644 --- a/stdlib/source/library/lux/meta/location.lux +++ b/stdlib/source/library/lux/meta/location.lux @@ -15,6 +15,9 @@ (.i64_=# (its .#line expected) (its .#line actual)) (.i64_=# (its .#column expected) (its .#column actual)))))) +(alias [=] + ..equivalence) + (the .public dummy Location [.#module "" @@ -35,7 +38,7 @@ _ {.#Left .wrong_syntax}))) -(the .public (injection it) +(the .public (as_text it) (-> Location Text) (let [separator "," @@ -51,5 +54,5 @@ (the .public (with location error) (-> Location Text Text) - (.text_composite# (..injection location) \n + (.text_composite# (as_text location) \n error)) diff --git a/stdlib/source/library/lux/meta/macro/context.lux b/stdlib/source/library/lux/meta/macro/context.lux index dba4ef2f13..d036833834 100644 --- a/stdlib/source/library/lux/meta/macro/context.lux +++ b/stdlib/source/library/lux/meta/macro/context.lux @@ -13,7 +13,7 @@ [function [predicate (.only Predicate)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence monoid)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.only) ["[0]" property]]]] @@ -58,7 +58,7 @@ [.let [[@ expected_name] it] defs (binding.definitions @)] (when (list.one (function (_ [actual_name [exported? [type value]]]) - (if (text#= expected_name actual_name) + (if (text.= expected_name actual_name) {.#Some value} {.#None})) defs) diff --git a/stdlib/source/library/lux/meta/macro/expansion.lux b/stdlib/source/library/lux/meta/macro/expansion.lux index f487a851fb..4a67332808 100644 --- a/stdlib/source/library/lux/meta/macro/expansion.lux +++ b/stdlib/source/library/lux/meta/macro/expansion.lux @@ -134,7 +134,7 @@ [location ///.location output ( token) .let [_ (.log!# (all text#composite - (symbol#injection macro_name) " " (location.injection location) + (symbol#injection macro_name) " " (location.as_text location) (|> output (list#each (|>> code.absolute (all text#composite text.\n text.\t))) diff --git a/stdlib/source/library/lux/meta/macro/syntax/check.lux b/stdlib/source/library/lux/meta/macro/syntax/check.lux index fcdc8262d3..1f3a307b48 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/check.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/check.lux @@ -30,6 +30,9 @@ code.equivalence )) +(alias [=] + ..equivalence) + (the .public (injection (open "_[0]")) (-> Check Code) (` ((, (code.text ..extension)) diff --git a/stdlib/source/library/lux/meta/macro/syntax/declaration.lux b/stdlib/source/library/lux/meta/macro/syntax/declaration.lux index 92f3f2726d..768f30a7f8 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/declaration.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/declaration.lux @@ -29,6 +29,9 @@ (list.equivalence text.equivalence) )) +(alias [=] + ..equivalence) + (the .public projection (Projection Declaration) (<>.either (<>.and .local diff --git a/stdlib/source/library/lux/meta/macro/syntax/definition.lux b/stdlib/source/library/lux/meta/macro/syntax/definition.lux index d5ce2f038a..0bbadb5433 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/definition.lux @@ -45,6 +45,9 @@ bit.equivalence )) +(alias [=] + ..equivalence) + (the extension (symbol .def#)) @@ -87,7 +90,7 @@ (exception.the .public (lacks_type definition) (Exception Definition) (exception.report - (list ["Definition" (%.code (..injection definition))]))) + (list ["Definition" (code.as_text (..injection definition))]))) (the .public (typed compiler) (-> Lux (Projection Definition)) diff --git a/stdlib/source/library/lux/meta/macro/syntax/input.lux b/stdlib/source/library/lux/meta/macro/syntax/input.lux index a154fd7f56..7a1a2d87d2 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/input.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/input.lux @@ -28,6 +28,9 @@ code.equivalence )) +(alias [=] + ..equivalence) + (the .public injection (-> (List Input) Code) (|>> (list#each (function (_ value) diff --git a/stdlib/source/library/lux/meta/macro/syntax/type/variable.lux b/stdlib/source/library/lux/meta/macro/syntax/type/variable.lux index e9b764113a..6f86f143e7 100644 --- a/stdlib/source/library/lux/meta/macro/syntax/type/variable.lux +++ b/stdlib/source/library/lux/meta/macro/syntax/type/variable.lux @@ -19,6 +19,9 @@ (Equivalence Variable) text.equivalence) +(alias [=] + ..equivalence) + (the .public injection (-> Variable Code) code.local) diff --git a/stdlib/source/library/lux/meta/module/import.lux b/stdlib/source/library/lux/meta/module/import.lux index 7c9a52fca5..e810d3fcda 100644 --- a/stdlib/source/library/lux/meta/module/import.lux +++ b/stdlib/source/library/lux/meta/module/import.lux @@ -6,7 +6,7 @@ [lux (.except all) [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list]]]]] ["[0]" /// (.use "[1]#[0]" monad) @@ -22,7 +22,7 @@ (-> Text Text (Meta Bit)) (///#each (|>> (its .#imports) - (list.any? (text#= import))) + (list.any? (text.= import))) (module.by_name module))) (the .public (current? import) diff --git a/stdlib/source/library/lux/meta/symbol.lux b/stdlib/source/library/lux/meta/symbol.lux index 41c2b7db0d..dbbb2d9df0 100644 --- a/stdlib/source/library/lux/meta/symbol.lux +++ b/stdlib/source/library/lux/meta/symbol.lux @@ -10,7 +10,7 @@ [order (.only Order)] [format (.only Format)]] [data - ["[0]" text (.use "[1]#[0]" equivalence monoid)] + ["[0]" text (.use "[1]#[0]" monoid)] ["[0]" product]]]]) (the with_template' (.in_module# .prelude .with_template)) @@ -36,12 +36,15 @@ (Equivalence Symbol) (.of ..hash equivalence)) +(alias [=] + ..equivalence) + (the .public order (Order Symbol) (implementation (the equivalence ..equivalence) (the (< [moduleP shortP] [moduleS shortS]) - (if (text#= moduleP moduleS) + (if (text.= moduleP moduleS) (.of text.order < shortP shortS) (.of text.order < moduleP moduleS))))) @@ -84,7 +87,7 @@ _ (all text#composite - (if (text#= expected module) + (if (text.= expected module) ..separator module) ..separator short))) @@ -124,3 +127,7 @@ _ (failure .wrong_syntax))))) + +(the .public as_text + (text.Injection Symbol) + (.of ..absolute injection)) diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux index 8daa3e9f9c..2115db27c7 100644 --- a/stdlib/source/library/lux/meta/type.lux +++ b/stdlib/source/library/lux/meta/type.lux @@ -16,7 +16,7 @@ ["[0]" predicate (.only Predicate)]]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" monoid equivalence)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" array] ["[0]" list (.use "[1]#[0]" monad monoid mix)]]] @@ -25,7 +25,7 @@ ["n" nat (.use "[1]#[0]" decimal)]]] ["[0]" meta (.use "[1]#[0]" functor) ["[0]" location] - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] ["[0]" binding] ["[0]" code (.only) ["?[1]" \\projection (.only Projection)]] @@ -215,7 +215,7 @@ (same? x y)) (when [x y] [{.#Nominal xname xparams} {.#Nominal yname yparams}] - (and (text#= xname yname) + (and (text.= xname yname) (n.= (list.size yparams) (list.size xparams)) (list#mix (.function (_ [x y] prev) (and prev (= x y))) true @@ -242,7 +242,7 @@ )) [{.#Named xname xtype} {.#Named yname ytype}] - (and (symbol#= xname yname) + (and (symbol.= xname yname) (= xtype ytype)) (,, (with_template' [] @@ -261,6 +261,9 @@ false )))))) +(alias [=] + ..equivalence) + (`` (the .public (applied params func) (-> (List Type) Type (Maybe Type)) @@ -434,7 +437,7 @@ (expansion.let [ [0 type]] (when type {.#Nominal name (list element_type)} - (if (text#= array.nominal name) + (if (text.= array.nominal name) (.let [[depth element_type] (flat_array element_type)] [(++ depth) element_type]) ) @@ -468,7 +471,7 @@ valueT (binding.type valueN) .let [[@ _ _] location _ (.log!# (all text#composite - (of symbol.absolute injection (symbol ..log!)) " " (location.injection location) text.new_line + (of symbol.absolute injection (symbol ..log!)) " " (location.as_text location) text.new_line "Expression: " (when valueC {.#Some valueC} (code.absolute valueC) @@ -635,3 +638,6 @@ ..as_type list) (specialized_function function parameters)))) + +(alias [as_text] + ..absolute_injection) diff --git a/stdlib/source/library/lux/meta/type/check.lux b/stdlib/source/library/lux/meta/type/check.lux index 776d13dd70..01e22f0fa3 100644 --- a/stdlib/source/library/lux/meta/type/check.lux +++ b/stdlib/source/library/lux/meta/type/check.lux @@ -14,7 +14,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" monoid equivalence)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" mix)] ["[0]" set (.only Set)]]] @@ -25,7 +25,7 @@ [macro ["^" pattern] ["[0]" template]]]]] - ["[0]" // (.use "[1]#[0]" equivalence)]) + ["[0]" //]) (the !n#= (template.macro (_ expected actual) @@ -436,8 +436,8 @@ (the (assumed? [e a] assumptions) (-> Assumption (List Assumption) Bit) (list.any? (function (_ [e' a']) - (and (//#= e e') - (//#= a a'))) + (and (//.= e e') + (//.= a a'))) assumptions)) ... TODO: "if_can_bind" can be optimized... @@ -646,7 +646,7 @@ ... TODO: Remove this once JPHP is gone. false (or (same? expected actual) - (//#= expected actual))) + (//.= expected actual))) (check#in assumptions) (with_exception ..type_check_failed [expected actual] (`` (when [expected actual] diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux index fb236fc900..ad822a4a09 100644 --- a/stdlib/source/library/lux/meta/type/dynamic.lux +++ b/stdlib/source/library/lux/meta/type/dynamic.lux @@ -23,8 +23,8 @@ (exception.the .public (wrong_type [expected actual]) (Exception [Type Type]) (exception.report - (list ["Expected" (%.type expected)] - ["Actual" (%.type actual)]))) + (list ["Expected" (//.as_text expected)] + ["Actual" (//.as_text actual)]))) (expansion.let [ [Type Any]] (nominal.every .public Dynamic diff --git a/stdlib/source/library/lux/meta/type/implicit.lux b/stdlib/source/library/lux/meta/type/implicit.lux index 882b8f6b3a..3dd87b4521 100644 --- a/stdlib/source/library/lux/meta/type/implicit.lux +++ b/stdlib/source/library/lux/meta/type/implicit.lux @@ -13,7 +13,7 @@ ["[0]" try]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" monad mix)] @@ -23,8 +23,10 @@ ["n" nat]]] ["[0]" meta (.only) ["[0]" module] - ["[0]" binding] ["[0]" label] + ["[0]" symbol] + ["[0]" binding (.only) + ["[0]" local]] [module ["[0]" import]] ["[0]" code (.only) @@ -32,7 +34,7 @@ ["[0]" macro (.only) ["[0]" syntax] ["[0]" expansion]]]]] - ["[0]" // (.use "[1]#[0]" equivalence) + ["[0]" // (.only) ["[0]" check (.only Check)]]) (the (type_var id env) @@ -78,7 +80,7 @@ {.#Apply arg func} (when (//.applied (list arg) func) {.#None} - (check.failure (%.message "Cannot apply type " (%.type func) " to type " (%.type arg))) + (check.failure (%.message "Cannot apply type " (//.as_text func) " to type " (//.as_text arg))) {.#Some sig_type'} (member_type idx sig_type')) @@ -91,7 +93,7 @@ _ (if (n.= 0 idx) (of check.monad in sig_type) - (check.failure (%.message "Cannot find member type " (%.nat idx) " for " (%.type sig_type)))))) + (check.failure (%.message "Cannot find member type " (%.nat idx) " for " (//.as_text sig_type)))))) (the (member_name member) (-> Symbol @@ -107,17 +109,17 @@ imp_mods (import.all this_module_name) tag_lists (monad.each ! label.tag_lists imp_mods) .let [tag_lists (|> tag_lists list#conjoint (list#each product.left) list#conjoint) - candidates (list.only (|>> product.right (text#= simple_name)) + candidates (list.only (|>> product.right (text.= simple_name)) tag_lists)]] (when candidates {.#End} - (meta.failure (%.message "Unknown slot: " (%.symbol member))) + (meta.failure (%.message "Unknown slot: " (symbol.as_text member))) {.#Item winner {.#End}} (in winner) _ - (meta.failure (%.message "Too many candidate slots: " (%.list %.symbol candidates)))))) + (meta.failure (%.message "Too many candidate slots: " (%.list symbol.as_text candidates)))))) _ (of meta.monad in member))) @@ -141,7 +143,7 @@ (the (compatible_type? interface candidate) (-> Type Type Bit) - (expansion.let [ (//#= interface candidate)] + (expansion.let [ (//.= interface candidate)] (<| (or ) (let [[parameters candidate] (//.flat_univ_q candidate)]) @@ -160,7 +162,7 @@ (-> Type Text Text (List [Text [Bit Definition]]) (-> (List [Symbol Type]) (List [Symbol Type]))) (list#mix (function (_ [name [exported? [def_type def_value]]] aggregate) - (if (and (or (text#= target_module source_module) + (if (and (or (text.= target_module source_module) exported?) (compatible_type? sig_type def_type)) {.#Item [[source_module name] def_type] aggregate} @@ -172,7 +174,7 @@ (-> Type (Meta (List [Symbol Type]))) (do meta.monad - [local_batches binding.locals + [local_batches local.all .let [total_locals (list#mix (function (_ [name type] table) (try.else table (dictionary.has' name type table))) (is (Dictionary Text Type) @@ -226,7 +228,7 @@ (in output)) _ - (check.failure (%.message "Invalid function type: " (%.type func))))) + (check.failure (%.message "Invalid function type: " (//.as_text func))))) (the (concrete_type type) (-> Type @@ -278,7 +280,7 @@ (list [alt_name =deps])))) list#conjoint) {.#End} - (meta.failure (%.message "No candidates for provisioning: " (%.type dep))) + (meta.failure (%.message "No candidates for provisioning: " (//.as_text dep))) found (in found)))) @@ -297,13 +299,13 @@ {.#Right candidates} (when candidates {.#End} - (check.failure (%.message "No candidates for provisioning: " (%.type dep))) + (check.failure (%.message "No candidates for provisioning: " (//.as_text dep))) {.#Item winner {.#End}} (of check.monad in winner) _ - (check.failure (%.message "Too many candidates for provisioning: " (%.type dep) " --- " (%.list (|>> product.left %.symbol) candidates)))) + (check.failure (%.message "Too many candidates for provisioning: " (//.as_text dep) " --- " (%.list (|>> product.left symbol.as_text) candidates)))) )) (the (candidate_alternatives sig_type member_idx input_types output_type alts) @@ -331,7 +333,7 @@ (list [alt_name =deps])))) list#conjoint) {.#End} - (meta.failure (%.message "No alternatives for " (%.type (//.function input_types output_type)))) + (meta.failure (%.message "No alternatives for " (//.as_text (//.function input_types output_type)))) found (in found)))) @@ -384,7 +386,7 @@ chosen_ones (alternatives sig_type member_idx input_types output_type)] (when chosen_ones {.#End} - (meta.failure (%.message "No implementation could be found for member: " (%.symbol member))) + (meta.failure (%.message "No implementation could be found for member: " (symbol.as_text member))) {.#Item chosen {.#End}} (in (list (` (.of (, (instance$ chosen)) @@ -394,9 +396,9 @@ _ (meta.failure (%.message "Too many implementations available: " (|> chosen_ones - (list#each (|>> product.left %.symbol)) + (list#each (|>> product.left symbol.as_text)) (text.interposed ", ")) - " --- for type: " (%.type sig_type))))) + " --- for type: " (//.as_text sig_type))))) {.#Right [args _]} (do [! meta.monad] diff --git a/stdlib/source/library/lux/meta/type/nominal.lux b/stdlib/source/library/lux/meta/type/nominal.lux index c0f3a1ae8a..3ab750b92f 100644 --- a/stdlib/source/library/lux/meta/type/nominal.lux +++ b/stdlib/source/library/lux/meta/type/nominal.lux @@ -13,7 +13,7 @@ ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" meta (.only) ["[0]" module] - ["[0]" symbol (.use "[1]#[0]" absolute equivalence)] + ["[0]" symbol (.use "[1]#[0]" absolute)] ["[0]" binding] ["[0]" code (.only) ["<[1]>" \\projection (.only Projection)]] @@ -45,7 +45,7 @@ (.the .public (specific name) (-> Symbol (Meta Frame)) - (context.search (|>> (its #name) (symbol#= name)) + (context.search (|>> (its #name) (symbol.= name)) ..frames)) (.the cast diff --git a/stdlib/source/library/lux/meta/type/poly.lux b/stdlib/source/library/lux/meta/type/poly.lux index 5c803e4e56..9f895cc3ec 100644 --- a/stdlib/source/library/lux/meta/type/poly.lux +++ b/stdlib/source/library/lux/meta/type/poly.lux @@ -33,14 +33,14 @@ ["^" pattern] ["[0]" syntax] ["[0]" template]]]]] - ["[0]" // (.use "[1]#[0]" equivalence) + ["[0]" // (.only) ["?[1]" \\projection (.only Env)] ["/[1]" //]]) (exception.the (invalid [it]) (Exception Type) (exception.report - (list ["Type" (%.type it)]))) + (list ["Type" (//.as_text it)]))) (the Poly (type (-> Type @@ -114,7 +114,7 @@ (Maybe Code)) (when specializations (list.partial [expected specialization] tail) - (if (//#= expected it) + (if (//.= expected it) {.#Some specialization} (specialized tail it)) diff --git a/stdlib/source/library/lux/meta/type/unit.lux b/stdlib/source/library/lux/meta/type/unit.lux index 21e9586d0a..27b4d49c27 100644 --- a/stdlib/source/library/lux/meta/type/unit.lux +++ b/stdlib/source/library/lux/meta/type/unit.lux @@ -46,6 +46,9 @@ (the (= expected actual) (i.= (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the .public order (for_any (_ scale unit) (Order (Measure scale unit))) diff --git a/stdlib/source/library/lux/meta/version.lux b/stdlib/source/library/lux/meta/version.lux index d473c3893e..1465dcd4ab 100644 --- a/stdlib/source/library/lux/meta/version.lux +++ b/stdlib/source/library/lux/meta/version.lux @@ -10,7 +10,7 @@ ["<>" projection] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" mix)]]] ["[0]" meta (.only) @@ -39,7 +39,7 @@ (do meta.monad [current meta.version] (when (list#mix (function (_ [when then] choice) - (if (text#= when current) + (if (text.= when current) {.#Some then} choice)) default diff --git a/stdlib/source/library/lux/music/chord.lux b/stdlib/source/library/lux/music/chord.lux index 61f353b569..dde3be3da8 100644 --- a/stdlib/source/library/lux/music/chord.lux +++ b/stdlib/source/library/lux/music/chord.lux @@ -31,6 +31,9 @@ (Equivalence Chord) (sequence.equivalence nat.equivalence)) +(alias [=] + ..equivalence) + (the .public injection (text.Injection Chord) (sequence#mix (function (_ interval it) diff --git a/stdlib/source/library/lux/music/mode.lux b/stdlib/source/library/lux/music/mode.lux index 787d61b525..a7c79520ec 100644 --- a/stdlib/source/library/lux/music/mode.lux +++ b/stdlib/source/library/lux/music/mode.lux @@ -16,7 +16,7 @@ [macro ["[0]" template]]]]] [// - ["[0]" scale (.only Scale) (.use "[1]#[0]" equivalence)]]) + ["[0]" scale (.only Scale)]]) ... https://en.wikipedia.org/wiki/Mode_(music) (every .public Mode @@ -54,7 +54,7 @@ (loop (next [tries 0 it' it]) (and (n.< maximum tries) - (or (scale#= base it') + (or (scale.= base it') (next (++ tries) (..next it')))))))) (template.with [ <0> <1> <2> <3> <4> <5> <6>] diff --git a/stdlib/source/library/lux/music/scale.lux b/stdlib/source/library/lux/music/scale.lux index 7ebe364c5d..ad85ba6551 100644 --- a/stdlib/source/library/lux/music/scale.lux +++ b/stdlib/source/library/lux/music/scale.lux @@ -76,6 +76,9 @@ (nominal.representation reference) (nominal.representation it))))) + (alias [=] + ..equivalence) + (the .public hash (Hash Scale) (implementation diff --git a/stdlib/source/library/lux/test/inline.lux b/stdlib/source/library/lux/test/inline.lux index 09bb7003b8..389bd3fd3c 100644 --- a/stdlib/source/library/lux/test/inline.lux +++ b/stdlib/source/library/lux/test/inline.lux @@ -25,7 +25,7 @@ (exception.the .public (failure test) (Exception Code) (exception.report - (list ["Test" (%.code test)]))) + (list ["Test" (code.as_text test)]))) (every .public Test (Random Bit)) diff --git a/stdlib/source/library/lux/test/property.lux b/stdlib/source/library/lux/test/property.lux index 2b3e43810f..2615a00f5f 100644 --- a/stdlib/source/library/lux/test/property.lux +++ b/stdlib/source/library/lux/test/property.lux @@ -171,7 +171,7 @@ report (is (-> Coverage Text) (|>> set.list (list.sorted (of symbol.order <)) - (exception.listing %.symbol))) + (exception.listing symbol.as_text))) expected_coverage (set.size (its tally.#expected tally)) unexpected_coverage (set.size unexpected) actual_coverage (n.- unexpected_coverage diff --git a/stdlib/source/library/lux/test/unit.lux b/stdlib/source/library/lux/test/unit.lux index e1bee75825..261850e69a 100644 --- a/stdlib/source/library/lux/test/unit.lux +++ b/stdlib/source/library/lux/test/unit.lux @@ -101,7 +101,8 @@ (the coverage_injection (text.Injection Symbol) - (|>> %.symbol (%.message ..clean_up_marker))) + (|>> symbol.as_text + (%.message ..clean_up_marker))) (the (with_coverage coverage condition) (-> (List Symbol) Bit Test) diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux index f23ef3b828..fed73710d2 100644 --- a/stdlib/source/library/lux/world/environment.lux +++ b/stdlib/source/library/lux/world/environment.lux @@ -16,7 +16,7 @@ ["[0]" atom] ["[0]" async (.only Async)]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]] [collection @@ -388,7 +388,7 @@ .ruby (Dir::home) ... .php (do io.monad ... [output (..getenv/1 ["HOME"])] - ... (in (if (bit#= false (as Bit output)) + ... (in (if (bit.= false (as Bit output)) ... "~" ... output))) @@ -420,7 +420,7 @@ .ruby (fileutils/FileUtils::pwd) ... .php (do io.monad ... [output (..getcwd [])] - ... (in (if (bit#= false (as Bit output)) + ... (in (if (bit.= false (as Bit output)) ... "." ... output))) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 6f7a8805d9..9a6d13103e 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -18,10 +18,10 @@ ["[0]" async (.only Async)] ["[0]" stm (.only Var STM)]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" product] ["[0]" binary (.only Binary)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" array (.only Array)] @@ -846,7 +846,7 @@ ... [(the ( data) ... (do [! (try.with io.monad)] ... [outcome (..file_put_contents [path ("php pack" ..byte_array_format data) ])] - ... (if (bit#= false (as Bit outcome)) + ... (if (bit.= false (as Bit outcome)) ... (of io.monad in (exception.except ..cannot_write_to_file [path])) ... (in []))))] @@ -857,7 +857,7 @@ ... (the (content _) ... (do [! (try.with io.monad)] ... [data (..file_get_contents [path])] - ... (if (bit#= false (as Bit data)) + ... (if (bit.= false (as Bit data)) ... (of io.monad in (exception.except ..cannot_find_file [path])) ... (in (..unpack [..byte_array_format data]))))) @@ -868,7 +868,7 @@ ... [(the ( _) ... (do [! (try.with io.monad)] ... [value ( [path])] - ... (if (bit#= false (as Bit value)) + ... (if (bit.= false (as Bit value)) ... (of io.monad in (exception.except ..cannot_find_file [path])) ... (in (`` (|> value (,, (template.spliced ))))))))] @@ -882,21 +882,21 @@ ... (the (modify moment) ... (do [! (try.with io.monad)] ... [verdict (..touch [path (|> moment instant.relative duration.millis (i./ +1,000))])] - ... (if (bit#= false (as Bit verdict)) + ... (if (bit.= false (as Bit verdict)) ... (of io.monad in (exception.except ..cannot_find_file [path])) ... (in [])))) ... (the (move destination) ... (do [! (try.with io.monad)] ... [verdict (..rename [path destination])] - ... (if (bit#= false (as Bit verdict)) + ... (if (bit.= false (as Bit verdict)) ... (of io.monad in (exception.except ..cannot_find_file [path])) ... (in (file destination))))) ... (the (delete _) ... (do (try.with io.monad) ... [verdict (..unlink [path])] - ... (if (bit#= false (as Bit verdict)) + ... (if (bit.= false (as Bit verdict)) ... (of io.monad in (exception.except ..cannot_find_file [path])) ... (in [])))) ... ))) @@ -914,8 +914,8 @@ ... (loop (again [input (|> children ... (array.list {.#None}) ... (list.only (function (_ child) - ... (not (or (text#= "." child) - ... (text#= ".." child)))))) + ... (not (or (text.= "." child) + ... (text.= ".." child)))))) ... output (is (List ( IO)) ... (list))]) ... (when input @@ -936,7 +936,7 @@ ... (the (discard _) ... (do (try.with io.monad) ... [verdict (..rmdir [path])] - ... (if (bit#= false (as Bit verdict)) + ... (if (bit.= false (as Bit verdict)) ... (of io.monad in (exception.except ..cannot_find_directory [path])) ... (in [])))) ... ))) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 0e72ac7a5c..d83e505d23 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -37,7 +37,7 @@ ["[0]" template]]] [world [time - ["[0]" instant (.only Instant) (.use "[1]#[0]" equivalence)]]]]] + ["[0]" instant (.only Instant)]]]]] ["[0]" //]) (nominal.every .public Concern @@ -269,7 +269,7 @@ (list#each (|>> product.left [..creation]) creations) (|> modifications (list.only (function (_ [path previous_modification current_modification]) - (not (instant#= previous_modification current_modification)))) + (not (instant.= previous_modification current_modification)))) (list#each (|>> product.left [..modification]))) (list#each (|>> [..deletion]) deletions) ))))) diff --git a/stdlib/source/library/lux/world/finance/market/price.lux b/stdlib/source/library/lux/world/finance/market/price.lux index 86f85e52b2..b2c83aa6f5 100644 --- a/stdlib/source/library/lux/world/finance/market/price.lux +++ b/stdlib/source/library/lux/world/finance/market/price.lux @@ -117,11 +117,8 @@ (Equivalence (Action $))) (of ..order equivalence)) - (the .public = - (for_any (_ $) - (-> (Action $) (Action $) - Bit)) - (of ..equivalence =)) + (alias [=] + ..equivalence) (template.with [

] [(the .public (

parameter subject) diff --git a/stdlib/source/library/lux/world/finance/money.lux b/stdlib/source/library/lux/world/finance/money.lux index 048f2b74d8..91c0cb649e 100644 --- a/stdlib/source/library/lux/world/finance/money.lux +++ b/stdlib/source/library/lux/world/finance/money.lux @@ -92,6 +92,9 @@ (Equivalence (Money $))) (of ..order equivalence)) + (alias [=] + ..equivalence) + (the .public (monoid $) (for_any (_ $) (-> (/.Currency $) @@ -107,12 +110,6 @@ #amount (n.+ (its #amount (nominal.representation left)) (its #amount (nominal.representation right)))])))) - (the .public = - (for_any (_ $) - (-> (Money $) (Money $) - Bit)) - (of ..equivalence =)) - (the .public (+ parameter subject) (for_any (_ $) (-> (Money $) (Money $) diff --git a/stdlib/source/library/lux/world/finance/money/currency.lux b/stdlib/source/library/lux/world/finance/money/currency.lux index c327173590..dd20f85722 100644 --- a/stdlib/source/library/lux/world/finance/money/currency.lux +++ b/stdlib/source/library/lux/world/finance/money/currency.lux @@ -63,6 +63,9 @@ n.equivalence n.equivalence ))) + + (alias [=] + ..equivalence) ) (the .public type diff --git a/stdlib/source/library/lux/world/finance/trade/session.lux b/stdlib/source/library/lux/world/finance/trade/session.lux index 290839f491..31022d32aa 100644 --- a/stdlib/source/library/lux/world/finance/trade/session.lux +++ b/stdlib/source/library/lux/world/finance/trade/session.lux @@ -105,6 +105,9 @@ volume.equivalence )) +(alias [=] + ..equivalence) + (the (size from to) (for_any (_ $) (-> (Price $) (Price $) diff --git a/stdlib/source/library/lux/world/finance/trade/volume.lux b/stdlib/source/library/lux/world/finance/trade/volume.lux index fc4bf85baa..78fe0a738f 100644 --- a/stdlib/source/library/lux/world/finance/trade/volume.lux +++ b/stdlib/source/library/lux/world/finance/trade/volume.lux @@ -29,6 +29,9 @@ money.equivalence )) +(alias [=] + ..equivalence) + (the .public (monoid $) (for_any (_ $) (-> (Currency $) diff --git a/stdlib/source/library/lux/world/locale.lux b/stdlib/source/library/lux/world/locale.lux index 8a8e5c77a5..95ad2c41da 100644 --- a/stdlib/source/library/lux/world/locale.lux +++ b/stdlib/source/library/lux/world/locale.lux @@ -48,4 +48,7 @@ (the .public equivalence (Equivalence Locale) (of ..hash equivalence)) + + (alias [=] + ..equivalence) ) diff --git a/stdlib/source/library/lux/world/locale/language.lux b/stdlib/source/library/lux/world/locale/language.lux index d09d19cadf..5d3743703a 100644 --- a/stdlib/source/library/lux/world/locale/language.lux +++ b/stdlib/source/library/lux/world/locale/language.lux @@ -570,6 +570,9 @@ (the (= expected actual) (same? expected actual)))) + (alias [=] + ..equivalence) + (the .public hash (Hash Language) (implementation diff --git a/stdlib/source/library/lux/world/locale/territory.lux b/stdlib/source/library/lux/world/locale/territory.lux index 24ef9df462..042cf858e0 100644 --- a/stdlib/source/library/lux/world/locale/territory.lux +++ b/stdlib/source/library/lux/world/locale/territory.lux @@ -306,6 +306,9 @@ (the (= expected actual) (same? expected actual)))) + (alias [=] + ..equivalence) + (the .public hash (Hash Territory) (implementation diff --git a/stdlib/source/library/lux/world/net/http/server.lux b/stdlib/source/library/lux/world/net/http/server.lux index e0315db927..6242af09c5 100644 --- a/stdlib/source/library/lux/world/net/http/server.lux +++ b/stdlib/source/library/lux/world/net/http/server.lux @@ -37,7 +37,7 @@ ["[0]" response (.only Response)] [// [uri (.only URI) - ["[0]" scheme (.use "[1]#[0]" equivalence)] + ["[0]" scheme] ["[0]" query (.use "[1]#[0]" format)]]]]) (every .public (Server !) @@ -50,7 +50,7 @@ (-> (Server !) (Server !))) (function (_ ! request) - (if (scheme#= (its [request.#protocol request.#scheme] request)) + (if (scheme.= (its [request.#protocol request.#scheme] request)) (server ! request) (of ! in (response.not_found !)))))] diff --git a/stdlib/source/library/lux/world/net/http/version.lux b/stdlib/source/library/lux/world/net/http/version.lux index c16a41d59c..059db877ba 100644 --- a/stdlib/source/library/lux/world/net/http/version.lux +++ b/stdlib/source/library/lux/world/net/http/version.lux @@ -22,9 +22,12 @@ (Equivalence Version) (implementation (the (= reference it) - (text#= (nominal.representation reference) + (text.= (nominal.representation reference) (nominal.representation it))))) + (alias [=] + ..equivalence) + (the .public hash (Hash Version) (implementation diff --git a/stdlib/source/library/lux/world/net/mime.lux b/stdlib/source/library/lux/world/net/mime.lux index cff1aef700..e71c15cdaf 100644 --- a/stdlib/source/library/lux/world/net/mime.lux +++ b/stdlib/source/library/lux/world/net/mime.lux @@ -32,6 +32,9 @@ (Equivalence MIME) (of equivalence.functor each ..name text.equivalence)) + (alias [=] + ..equivalence) + (the .public hash (Hash MIME) (of hash.functor each ..name text.hash)) diff --git a/stdlib/source/library/lux/world/net/uri/query.lux b/stdlib/source/library/lux/world/net/uri/query.lux index e608d2337f..87c5d6f5d7 100644 --- a/stdlib/source/library/lux/world/net/uri/query.lux +++ b/stdlib/source/library/lux/world/net/uri/query.lux @@ -37,6 +37,9 @@ (Equivalence Query) (dictionary.equivalence text.equivalence)) +(alias [=] + ..equivalence) + (the component (Projection Text) (?.rec diff --git a/stdlib/source/library/lux/world/net/uri/scheme.lux b/stdlib/source/library/lux/world/net/uri/scheme.lux index 612c38eb11..23e40b229c 100644 --- a/stdlib/source/library/lux/world/net/uri/scheme.lux +++ b/stdlib/source/library/lux/world/net/uri/scheme.lux @@ -140,6 +140,9 @@ (Equivalence Scheme) (of equivalence.functor each ..name text.equivalence)) + (alias [=] + ..equivalence) + (the .public hash (Hash Scheme) (of hash.functor each ..name text.hash)) diff --git a/stdlib/source/library/lux/world/output/video/resolution.lux b/stdlib/source/library/lux/world/output/video/resolution.lux index 04ca292d6d..878af9c931 100644 --- a/stdlib/source/library/lux/world/output/video/resolution.lux +++ b/stdlib/source/library/lux/world/output/video/resolution.lux @@ -29,6 +29,9 @@ (Equivalence Resolution) (of ..hash equivalence)) +(alias [=] + ..equivalence) + ... https://en.wikipedia.org/wiki/Display_resolution#Common_display_resolutions (template.with [ ] [(the .public diff --git a/stdlib/source/library/lux/world/time.lux b/stdlib/source/library/lux/world/time.lux index 6f4e7a44c8..a38a8c0146 100644 --- a/stdlib/source/library/lux/world/time.lux +++ b/stdlib/source/library/lux/world/time.lux @@ -110,6 +110,9 @@ (n.= (nominal.representation param) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (the .public order (Order Time) (implementation diff --git a/stdlib/source/library/lux/world/time/date.lux b/stdlib/source/library/lux/world/time/date.lux index 13a337150f..360a9ca3cc 100644 --- a/stdlib/source/library/lux/world/time/date.lux +++ b/stdlib/source/library/lux/world/time/date.lux @@ -118,6 +118,9 @@ (n.= (its #day expected) (its #day actual))))))) + (alias [=] + ..equivalence) + (the .public order (Order Date) (implementation diff --git a/stdlib/source/library/lux/world/time/day.lux b/stdlib/source/library/lux/world/time/day.lux index 5657489ae2..8feb72e1f3 100644 --- a/stdlib/source/library/lux/world/time/day.lux +++ b/stdlib/source/library/lux/world/time/day.lux @@ -56,6 +56,9 @@ _ false))))) +(alias [=] + ..equivalence) + (the (nat day) (-> Day Nat) (`` (when day diff --git a/stdlib/source/library/lux/world/time/duration.lux b/stdlib/source/library/lux/world/time/duration.lux index c35195a219..8e97738b2c 100644 --- a/stdlib/source/library/lux/world/time/duration.lux +++ b/stdlib/source/library/lux/world/time/duration.lux @@ -81,6 +81,9 @@ (i.= (nominal.representation param) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (the .public order (Order Duration) (implementation diff --git a/stdlib/source/library/lux/world/time/instant.lux b/stdlib/source/library/lux/world/time/instant.lux index 574e012ec1..6835abc12d 100644 --- a/stdlib/source/library/lux/world/time/instant.lux +++ b/stdlib/source/library/lux/world/time/instant.lux @@ -88,6 +88,9 @@ (nominal.representation param) (nominal.representation subject))))) + (alias [=] + ..equivalence) + (the .public order (Order Instant) (implementation diff --git a/stdlib/source/library/lux/world/time/month.lux b/stdlib/source/library/lux/world/time/month.lux index e3178b663a..7f89686485 100644 --- a/stdlib/source/library/lux/world/time/month.lux +++ b/stdlib/source/library/lux/world/time/month.lux @@ -66,6 +66,9 @@ _ false))))) +(alias [=] + ..equivalence) + (expansion.let [ (these [01 #January] [02 #February] [03 #March] diff --git a/stdlib/source/library/lux/world/time/series.lux b/stdlib/source/library/lux/world/time/series.lux index d1cdb4062e..8ee2524f7a 100644 --- a/stdlib/source/library/lux/world/time/series.lux +++ b/stdlib/source/library/lux/world/time/series.lux @@ -27,7 +27,7 @@ [macro ["[0]" template]]]]] [// - ["[0]" duration (.only Duration) (.use "[1]#[0]" equivalence)] + ["[0]" duration (.only Duration)] ["[0]" instant (.only Instant) (.use "[1]#[0]" order)]]) (every .public (Series of) diff --git a/stdlib/source/library/lux/world/time/year.lux b/stdlib/source/library/lux/world/time/year.lux index 59c0b1a889..dca31ad541 100644 --- a/stdlib/source/library/lux/world/time/year.lux +++ b/stdlib/source/library/lux/world/time/year.lux @@ -141,6 +141,9 @@ (the (= expected actual) (i.= (..value expected) (..value actual))))) +(alias [=] + ..equivalence) + (the .public order (Order Year) (implementation diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index 73129a511f..fe87297caf 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -51,6 +51,9 @@ (Equivalence Artifact) (of ..hash equivalence)) +(alias [=] + ..equivalence) + (the .public order (Order Artifact) (implementation @@ -61,12 +64,12 @@ (<| (or (text#< (its #group expected) (its #group actual))) - (and (text#= (its #group expected) + (and (text.= (its #group expected) (its #group actual))) (or (text#< (its #name expected) (its #name actual))) - (and (text#= (its #name expected) + (and (text.= (its #name expected) (its #name actual))) (text#< (its #version expected) (its #version actual)))))) diff --git a/stdlib/source/program/aedifex/artifact/snapshot.lux b/stdlib/source/program/aedifex/artifact/snapshot.lux index eea8d3a07b..144200baeb 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot.lux @@ -41,6 +41,9 @@ /stamp.equivalence )) +(alias [=] + ..equivalence) + (template.with [ ] [(the xml.Tag ["" ])] diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux index aefaa63987..2a8881bca5 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux @@ -27,6 +27,9 @@ (Equivalence Build) nat.equivalence) +(alias [=] + ..equivalence) + (the tag xml.Tag ["" "buildNumber"]) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux index 7d711babcc..2fa4b6ce41 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux @@ -32,6 +32,9 @@ //build.equivalence )) +(alias [=] + ..equivalence) + (the xml.Tag ["" "timestamp"]) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/time.lux b/stdlib/source/program/aedifex/artifact/snapshot/time.lux index 0e59bd9ee9..e1a9d8b0c1 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/time.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/time.lux @@ -31,6 +31,9 @@ (Equivalence Time) ///time.equivalence) +(alias [=] + ..equivalence) + (the separator ".") diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux index 7f87e3ad84..b93a5b828c 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux @@ -37,6 +37,9 @@ ///time.equivalence )) +(alias [=] + ..equivalence) + (template.with [ ] [(the xml.Tag ["" ])] diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux index 6fdaf0087c..2fe91225dc 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -26,6 +26,9 @@ ///.equivalence )) +(alias [=] + ..equivalence) + (the separator "-") diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux index 15e62580c3..4ef43a031b 100644 --- a/stdlib/source/program/aedifex/artifact/time.lux +++ b/stdlib/source/program/aedifex/artifact/time.lux @@ -47,6 +47,9 @@ (product.equivalence /date.equivalence time.equivalence)) +(alias [=] + ..equivalence) + (the .public (injection [date time]) (Injection Time) (%.message (/date.injection date) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 813559f37c..01d8c9d3a2 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -24,7 +24,7 @@ ["[0]" nominal]]] [world [time - ["[0]" date (.use "[1]#[0]" equivalence)] + ["[0]" date] ["[0]" year] ["[0]" month]]]]]) @@ -67,9 +67,12 @@ (Equivalence Date) (implementation (the (= expected actual) - (date#= (nominal.representation expected) + (date.= (nominal.representation expected) (nominal.representation actual))))) + (alias [=] + ..equivalence) + (the .public (injection value) (text.Injection Date) (%.message (|> value nominal.representation date.year year.value .nat %.nat) diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index ef0958bd6f..b0c8fba9cd 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -54,6 +54,9 @@ (list.equivalence //snapshot/version.equivalence) )) +(alias [=] + ..equivalence) + (template.with [ ] [(the xml.Tag ["" ])] diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index d9a75017ce..c58c406c32 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -75,6 +75,9 @@ ... #Auto ..compilation_equivalence)) +(alias [=] + ..equivalence) + (the command' (Projection Command) (all <>.or diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 14164f6a6d..3d9d21038d 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -63,8 +63,8 @@ (-> Group Name Finder) (|>> dictionary.entries (list.one (function (_ [dependency package]) - (if (and (text#= group (its [///dependency.#artifact ///artifact.#group] dependency)) - (text#= name (its [///dependency.#artifact ///artifact.#name] dependency))) + (if (and (text.= group (its [///dependency.#artifact ///artifact.#group] dependency)) + (text.= name (its [///dependency.#artifact ///artifact.#name] dependency))) {.#Some dependency} {.#None}))))) @@ -138,7 +138,7 @@ (for_any (_ !) (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys (list.only (|>> (its ///dependency.#type) - (text#= ///artifact/type.lux_library))) + (text.= ///artifact/type.lux_library))) (list#each (..path fs home)))) (the version_separator @@ -155,7 +155,7 @@ right (text.all_split_by ..version_separator right)]) (when [left right] [{.#Item leftH leftT} {.#Item rightH rightT}] - (if (text#= leftH rightH) + (if (text.= leftH rightH) (again leftT rightT) (or (n.< (text.size leftH) (text.size rightH)) (text#< leftH rightH))) @@ -175,7 +175,7 @@ (List Path))) (|>> dictionary.keys (list.only (|>> (its ///dependency.#type) - (text#= ///artifact/type.lux_library) + (text.= ///artifact/type.lux_library) not)) (list#mix (function (_ dependency uniques) (let [artifact (its ///dependency.#artifact dependency) diff --git a/stdlib/source/program/aedifex/dependency.lux b/stdlib/source/program/aedifex/dependency.lux index 296a1542fe..247310412a 100644 --- a/stdlib/source/program/aedifex/dependency.lux +++ b/stdlib/source/program/aedifex/dependency.lux @@ -31,6 +31,9 @@ (Equivalence Dependency) (of hash equivalence)) +(alias [=] + ..equivalence) + (the .public order (Order Dependency) (implementation @@ -41,7 +44,7 @@ (<| (or (//#< (its #artifact expected) (its #artifact actual))) - (and (//#= (its #artifact expected) + (and (//.= (its #artifact expected) (its #artifact actual))) (text#< (its #type expected) (its #type actual)))))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index b67865b193..30ca0de3cf 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -160,6 +160,9 @@ (Equivalence Resolution) (dictionary.equivalence ///package.equivalence)) +(alias [=] + ..equivalence) + (exception.the .public (cannot_resolve dependency) (Exception Dependency) (exception.report diff --git a/stdlib/source/program/aedifex/dependency/status.lux b/stdlib/source/program/aedifex/dependency/status.lux index c97afb982b..6ee5174a92 100644 --- a/stdlib/source/program/aedifex/dependency/status.lux +++ b/stdlib/source/program/aedifex/dependency/status.lux @@ -38,6 +38,9 @@ ///hash.equivalence) )) +(alias [=] + ..equivalence) + (the .public (verified payload) (-> Binary Status) {#Verified diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index b4c0afa468..b625f8177e 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -176,4 +176,7 @@ (of binary.equivalence = (nominal.representation expected) (nominal.representation actual))))) + + (alias [=] + ..equivalence) ) diff --git a/stdlib/source/program/aedifex/injection.lux b/stdlib/source/program/aedifex/injection.lux index 8a2c011e6e..150c1560f7 100644 --- a/stdlib/source/program/aedifex/injection.lux +++ b/stdlib/source/program/aedifex/injection.lux @@ -5,7 +5,7 @@ [library [lux (.except) [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" dictionary (.only Dictionary)] ["[0]" list (.use "[1]#[0]" monad)] @@ -140,7 +140,7 @@ (the (dependency [artifact type]) (Injection Dependency) - (if (text#= //artifact/type.lux_library type) + (if (text.= //artifact/type.lux_library type) (` [(,* (..artifact' artifact))]) (` [(,* (..artifact' artifact)) (, (code.text type))]))) diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 2c095824ee..3d6751098f 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -173,6 +173,9 @@ instant.equivalence )) +(alias [=] + ..equivalence) + (the .public uri (-> Artifact URI) //.remote_project_uri) diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index f5b14626f7..70aa7894eb 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -126,6 +126,9 @@ ///artifact/versioning.equivalence )) +(alias [=] + ..equivalence) + (the .public uri (-> Artifact URI) //.remote_artifact_uri) diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux index 77e30aa4ff..14a29f8abc 100644 --- a/stdlib/source/program/aedifex/package.lux +++ b/stdlib/source/program/aedifex/package.lux @@ -95,3 +95,6 @@ binary.equivalence //status.equivalence) )) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 1a949746dc..5c3c0553af 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -13,7 +13,7 @@ ["[0]" exception]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" set (.only Set)] ["[0]" dictionary (.only Dictionary)] @@ -34,8 +34,8 @@ [net (.only URL)] [file (.only Path)]]]] [// - ["[0]" runtime (.only Runtime) (.use "[1]#[0]" equivalence)] - ["[0]" dependency (.only Dependency) (.use "[1]#[0]" equivalence)] + ["[0]" runtime (.only Runtime)] + ["[0]" dependency (.only Dependency)] ["[0]" artifact (.only Artifact) ["[0]" type]] [repository @@ -230,6 +230,9 @@ ... #ruby runtime.equivalence)) +(alias [=] + ..equivalence) + (the .public monoid (Monoid Profile) (implementation @@ -255,7 +258,7 @@ (the (composite override baseline) (template.let [(!runtime ) - [(if (runtime#= (its override)) + [(if (runtime.= (its override)) (its baseline) (its override))]] [#parents (list#composite (its #parents baseline) (its #parents override)) @@ -263,12 +266,12 @@ #info (maybe#composite (its #info override) (its #info baseline)) #repositories (set.union (its #repositories baseline) (its #repositories override)) #dependencies (set.union (its #dependencies baseline) (its #dependencies override)) - #lux (if (dependency#= ..default_lux (its #lux override)) + #lux (if (dependency.= ..default_lux (its #lux override)) (its #lux baseline) (its #lux override)) #compilers (list#composite (its #compilers baseline) (its #compilers override)) #sources (set.union (its #sources baseline) (its #sources override)) - #target (if (text#= ..default_target (its #target baseline)) + #target (if (text.= ..default_target (its #target baseline)) (its #target override) (its #target baseline)) #program (maybe#composite (its #program override) (its #program baseline)) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 927aa4f8d8..3ac2757dda 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -35,6 +35,9 @@ (Equivalence Project) (dictionary.equivalence //.equivalence)) +(alias [=] + ..equivalence) + (the .public monoid (Monoid Project) (implementation diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux index 3a97632c0b..58b746dd6f 100644 --- a/stdlib/source/program/aedifex/repository/identity.lux +++ b/stdlib/source/program/aedifex/repository/identity.lux @@ -32,6 +32,9 @@ text.equivalence )) +(alias [=] + ..equivalence) + (import java/util/Base64$Encoder "[1]::[0]" (encodeToString [[byte]] java/lang/String)) diff --git a/stdlib/source/program/aedifex/repository/origin.lux b/stdlib/source/program/aedifex/repository/origin.lux index b2f60016ed..f1b967c278 100644 --- a/stdlib/source/program/aedifex/repository/origin.lux +++ b/stdlib/source/program/aedifex/repository/origin.lux @@ -24,3 +24,6 @@ text.equivalence text.equivalence )) + +(alias [=] + ..equivalence) diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux index de99b7a5a0..5735689e8c 100644 --- a/stdlib/source/program/aedifex/runtime.lux +++ b/stdlib/source/program/aedifex/runtime.lux @@ -32,6 +32,9 @@ (list.equivalence text.equivalence) )) +(alias [=] + ..equivalence) + (template.with [ ] [(the .public Runtime diff --git a/stdlib/source/projection/lux/data/format/json.lux b/stdlib/source/projection/lux/data/format/json.lux index 35c59d5e2e..e7372c135f 100644 --- a/stdlib/source/projection/lux/data/format/json.lux +++ b/stdlib/source/projection/lux/data/format/json.lux @@ -12,7 +12,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" bit] - ["[0]" text (.use "[1]#[0]" equivalence monoid)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence] @@ -177,7 +177,7 @@ (function (again inputs) (when inputs (list.partial {/.#String key} value inputs') - (if (text#= key field_name) + (if (text.= key field_name) (when (//.value projection (list value)) {try.#Success [{.#End} output]} {try.#Success [inputs' output]} diff --git a/stdlib/source/projection/lux/data/format/xml.lux b/stdlib/source/projection/lux/data/format/xml.lux index 30ff723e20..e330fa0e65 100644 --- a/stdlib/source/projection/lux/data/format/xml.lux +++ b/stdlib/source/projection/lux/data/format/xml.lux @@ -17,7 +17,7 @@ ["[0]" list] ["[0]" dictionary]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence absolute)]]]] + ["[0]" symbol (.use "[1]#[0]" absolute)]]]] [\\library ["[0]" / (.only Attribute Attrs Tag XML)]]) @@ -119,7 +119,7 @@ (exception.except ..unexpected_input []) {/.#Node actual attrs' children} - (if (symbol#= expected actual) + (if (symbol.= expected actual) (|> children (..value' projection attrs') (try#each (|>> [[attrs tail]]))) diff --git a/stdlib/source/projection/lux/meta/code.lux b/stdlib/source/projection/lux/meta/code.lux index 5424023f47..166cd6bd6f 100644 --- a/stdlib/source/projection/lux/meta/code.lux +++ b/stdlib/source/projection/lux/meta/code.lux @@ -23,7 +23,7 @@ [meta ["[0]" location] ["[0]" symbol] - ["[0]" code (.use "[1]#[0]" equivalence)] + ["[0]" code] [macro ["[0]" expansion]]]]]) @@ -110,7 +110,7 @@ (function (_ tokens) (when tokens {.#Item [token tokens']} - (if (code#= code token) + (if (code.= code token) {try.#Success [tokens' []]} {try.#Failure (all text#composite "Expected a " (code.absolute code) " but instead got " (code.absolute token) (remaining_inputs tokens))}) diff --git a/stdlib/source/projection/lux/meta/type.lux b/stdlib/source/projection/lux/meta/type.lux index 7d0f64fd11..a43eb76c1f 100644 --- a/stdlib/source/projection/lux/meta/type.lux +++ b/stdlib/source/projection/lux/meta/type.lux @@ -26,7 +26,7 @@ ["^" pattern] ["[0]" template]]]]] [\\library - ["[0]" / (.use "[1]#[0]" equivalence) + ["[0]" / (.only) ["[0]" check]]]) (the .public recursion_parameter @@ -47,7 +47,7 @@ [(exception.the .public ( type) (Exception Type) (exception.report - (list ["Type" (%.type type)])))] + (list ["Type" (/.as_text type)])))] [not_existential] [not_recursive] @@ -65,8 +65,8 @@ [(exception.the .public ( [expected actual]) (Exception [Type Type]) (exception.report - (list ["Expected" (%.type expected)] - ["Actual" (%.type actual)])))] + (list ["Expected" (/.as_text expected)] + ["Actual" (/.as_text actual)])))] [types_do_not_match] [wrong_parameter] @@ -78,7 +78,7 @@ (Exception (List Type)) (exception.report (list ["Types" (|> remaining - (list#each (|>> %.type (%.message text.new_line "* "))) + (list#each (|>> /.as_text (%.message text.new_line "* "))) (text.interposed ""))]))) (every .public Env @@ -265,7 +265,7 @@ (in []) (//.failure (exception.error ..types_do_not_match [expected actual])))))] - [exactly /#=] + [exactly /.=] [sub check.subsumed?] [super (function.flipped check.subsumed?)] ) diff --git a/stdlib/source/projection/lux/program.lux b/stdlib/source/projection/lux/program.lux index 9867de8c65..a0d8ad7e4f 100644 --- a/stdlib/source/projection/lux/program.lux +++ b/stdlib/source/projection/lux/program.lux @@ -10,7 +10,7 @@ ["//" projection] ["[0]" try (.only Try)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [meta ["[0]" location]]]]) @@ -66,7 +66,7 @@ (function (_ inputs) (do try.monad [[remaining raw] (any inputs)] - (if (text#= reference raw) + (if (text.= reference raw) (in [remaining []]) {try.#Failure (%.message "Missing token: '" reference "'")})))) diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 0d963621da..c21f95d4af 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -14,7 +14,7 @@ ["[0]" order ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)]] [world @@ -60,7 +60,7 @@ (_.coverage [/.injection /.identity] (and (text.ends_with? (/.identity sample) (/.injection sample)) - (not (text#= (/.identity sample) (/.injection sample))))) + (not (text.= (/.identity sample) (/.injection sample))))) /extension.test /snapshot.test diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux index 113526a96d..1fff331dc7 100644 --- a/stdlib/source/test/aedifex/artifact/extension.lux +++ b/stdlib/source/test/aedifex/artifact/extension.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" set] ["[0]" list]]] @@ -38,9 +38,9 @@ (set.size uniques)))) (_.coverage [/.extension /.type] (`` (and (,, (template.with [ ] - [(and (text#= + [(and (text.= (/.extension )) - (text#= + (text.= (/.type (/.extension ))))] [//.lux_library /.lux_library] diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux index 6d87e07774..cfb5d62681 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux @@ -11,7 +11,7 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection]]] [math @@ -54,7 +54,7 @@ (let [version (its /.#version sample) local! - (text#= version + (text.= version (/.injection (has /.#snapshot {///.#Local} sample))) remote_injection (/.injection [/.#version (%.message version /.snapshot) diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux index e1111f269f..1316f77b1d 100644 --- a/stdlib/source/test/aedifex/artifact/time.lux +++ b/stdlib/source/test/aedifex/artifact/time.lux @@ -19,7 +19,7 @@ ["i" int]]] [world [time - ["[0]" instant (.use "[1]#[0]" equivalence)]]] + ["[0]" instant]]] [test ["_" property (.only Test)]]]] [\\program @@ -60,7 +60,7 @@ (try#each (of /.equivalence = expected)) (try.else false)))) (_.coverage [/.epoch] - (instant#= instant.epoch (/.instant /.epoch))) + (instant.= instant.epoch (/.instant /.epoch))) /date.test /time.test diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux index c6c9c02bea..48989b68f8 100644 --- a/stdlib/source/test/aedifex/artifact/time/date.lux +++ b/stdlib/source/test/aedifex/artifact/time/date.lux @@ -21,7 +21,7 @@ ["i" int]]] [world [time - ["[0]" date (.use "[1]#[0]" equivalence)] + ["[0]" date] ["[0]" year]]] [test ["_" property (.only Test)]]]] @@ -71,5 +71,5 @@ {try.#Failure error} (exception.is? /.year_is_out_of_range error))) (_.coverage [/.epoch] - (date#= date.epoch (/.value /.epoch))) + (date.= date.epoch (/.value /.epoch))) )))) diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index 5ba945e780..61f99faaa8 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -14,7 +14,7 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" dictionary]]] [math @@ -197,8 +197,8 @@ (has ///.#lux compiler profile)) start (of console read_line []) end (of console read_line [])] - (in (and (text#= /.start start) - (text#= /.success end))))] + (in (and (text.= /.start start) + (text.= /.success end))))] (unit.coverage [/.do! /.lux_group /.jvm_lux_name @@ -219,8 +219,8 @@ (has ///.#lux compiler profile)) start (of console read_line []) end (of console read_line [])] - (in (and (text#= /.start start) - (text#= /.failure end))))] + (in (and (text.= /.start start) + (text.= /.failure end))))] (unit.coverage [/.failure] (try.else false verdict))))) (do ! @@ -248,9 +248,9 @@ {try.#Success _} false) {try.#Success})))] - (in (and (text#= expected/0 actual/0) - (text#= expected/1 actual/1) - (text#= expected/2 actual/2) + (in (and (text.= expected/0 actual/0) + (text.= expected/1 actual/1) + (text.= expected/2 actual/2) end!)))] (unit.coverage [] (try.else false verdict)))))] diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index e7d65ac124..7417d163fa 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -13,7 +13,7 @@ [data [binary (.only Binary)] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -119,6 +119,6 @@ (not target_exists!/post)) (and sub_exists!/pre (not sub_exists!/post)) - (text#= (/.success target_path) logging))))] + (text.= (/.success target_path) logging))))] (unit.coverage [/.do! /.success] (try.else false verdict))))))) diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 4374f1d76e..aa1f893801 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -13,9 +13,9 @@ [concurrency ["[0]" async (.only Async) (.use "[1]#[0]" monad)]]] [data - ["[0]" binary (.use "[1]#[0]" equivalence) + ["[0]" binary (.only) ["[0]" \\injection]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] [encoding ["[0]" utf8]]] @@ -143,15 +143,15 @@ (of ///hash.md5_format projection actual_md5))) .let [succeeded! - (and (text#= //install.success locally_installed!) - (text#= /.success deployed!)) + (and (text.= //install.success locally_installed!) + (text.= /.success deployed!)) deployed_library! - (binary#= expected_library + (binary.= expected_library actual_library) deployed_pom! - (binary#= (|> expected_pom (of xml.format injection) (of utf8.format injection)) + (binary.= (|> expected_pom (of xml.format injection) (of utf8.format injection)) actual_pom) deployed_sha1! diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index cf8d787701..abff4ff743 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -13,7 +13,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + [text [encoding ["[0]" utf8]]] [collection diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index df62274c05..90ac7ed520 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -13,7 +13,7 @@ ["[0]" async (.only Async)]]] [data ["[0]" binary] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" set (.only Set)]]] @@ -83,7 +83,7 @@ library_path (%.message artifact_path ///artifact/extension.lux_library) pom_path (%.message artifact_path ///artifact/extension.pom)] verdict (do [! ///action.monad] - [succeeded! (of ! each (text#= /.success) + [succeeded! (of ! each (text.= /.success) (..execute! program fs sample)) library_exists! (|> library_path (%.message home /) @@ -104,6 +104,6 @@ logging (..execute! program fs (has ///.#identity {.#None} sample))] (unit.coverage [/.failure] (|> logging - (try#each (text#= /.failure)) + (try#each (text.= /.failure)) (try.else false))))) )))) diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index 176958c15f..d7da721e63 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -11,8 +11,8 @@ [concurrency ["[0]" async]]] [data - ["[0]" binary (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" binary] + ["[0]" text (.only) [encoding ["[0]" utf8]]] [format @@ -55,11 +55,11 @@ actual (of fs read ///pom.file) logging! (of ///action.monad each - (text#= /.success) + (text.= /.success) (of console read_line [])) .let [expected_content! - (binary#= expected actual)]] + (binary.= expected actual)]] (in (and logging! expected_content!)))] (unit.coverage [/.do! /.success] diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index 3c503927cb..84a8d448ca 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -12,7 +12,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" dictionary] ["[0]" list]]] @@ -76,10 +76,10 @@ build_end (of console read_line []) test_start (of console read_line []) test_end (of console read_line [])] - (in (and (and (text#= //build.start build_start) - (text#= //build.success build_end)) - (and (text#= /.start test_start) - (text#= /.success test_end)))))] + (in (and (and (text.= //build.start build_start) + (text.= //build.success build_end)) + (and (text.= /.start test_start) + (text.= /.success test_end)))))] (unit.coverage [/.do! /.start /.success] (try.else false verdict))))) @@ -101,7 +101,7 @@ (the (on_destroy state) {try.#Failure "on_destroy"}) (the (on_await state) - {try.#Success [state (if (list.any? (text#= "build") actual_arguments) + {try.#Success [state (if (list.any? (text.= "build") actual_arguments) shell.normal shell.error)]})))}) [])] @@ -112,10 +112,10 @@ build_end (of console read_line []) test_start (of console read_line []) test_end (of console read_line [])] - (in (and (and (text#= //build.start build_start) - (text#= //build.success build_end)) - (and (text#= /.start test_start) - (text#= /.failure test_end)))))] + (in (and (and (text.= //build.start build_start) + (text.= //build.success build_end)) + (and (text.= /.start test_start) + (text.= /.failure test_end)))))] (unit.coverage [/.failure] (try.else false verdict))))) )))) diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index 331cda9d1d..5ed1e9f364 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -13,7 +13,7 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random]] @@ -76,7 +76,7 @@ verdict (do (try.with async.monad) [_ (/.do! console profile) logging (of console read_line [])] - (in (text#= (version.injection lux_version.latest) + (in (text.= (version.injection lux_version.latest) logging)))] (unit.coverage [/.do!] (try.else false verdict))))))) diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index 353ea71e08..3b76be5695 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -16,7 +16,7 @@ ["[0]" async]]] [data ["[0]" product] - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence)] + ["[0]" binary (.only Binary)] ["[0]" text (.only) ["%" \\injection]] [collection @@ -49,7 +49,7 @@ ["[0]" profile] ["[0]" metadata] ["[0]" package (.only Package)] - ["[0]" artifact (.only Artifact) (.use "[1]#[0]" equivalence) + ["[0]" artifact (.only Artifact) ["[1]/[0]" type] ["[1]/[0]" extension]] ["[0]" repository (.only) @@ -103,7 +103,7 @@ product.left) correct_artifact! - (artifact#= expected_artifact actual_artifact) + (artifact.= expected_artifact actual_artifact) expected_number_of_uploads! (n.= (n.* expected_deployments 8) @@ -112,7 +112,7 @@ correct_library_upload! (and (|> cache (dictionary.value library_url) - (maybe#each (binary#= expected_library)) + (maybe#each (binary.= expected_library)) (maybe.else false)) (dictionary.key? cache (%.message library_url artifact/extension.sha1)) (dictionary.key? cache (%.message library_url artifact/extension.md5))) @@ -120,7 +120,7 @@ correct_pom_upload! (and (|> cache (dictionary.value pom_url) - (maybe#each (binary#= expected_pom)) + (maybe#each (binary.= expected_pom)) (maybe.else false)) (dictionary.key? cache (%.message pom_url artifact/extension.sha1)) (dictionary.key? cache (%.message pom_url artifact/extension.md5))) diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 59a97a2c90..ec24c91b0e 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -48,7 +48,7 @@ ["[1]" profile] ["[1][0]" package (.only Package)] ["[1][0]" hash] - ["[1][0]" dependency (.only Dependency) (.use "[1]#[0]" equivalence) + ["[1][0]" dependency (.only Dependency) ["[1]/[0]" status]] ["[1][0]" pom] ["[1][0]" artifact (.only Artifact) @@ -427,10 +427,10 @@ /.empty)] (unit.coverage [/.all] (and (dictionary.key? resolution depender) - (list.any? (///dependency#= depender) successes) + (list.any? (///dependency.= depender) successes) (dictionary.key? resolution dependee) - (list.any? (///dependency#= dependee) successes) + (list.any? (///dependency.= dependee) successes) (list.empty? failures) (not (dictionary.key? resolution ignored)))))) diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux index 1a026acbf9..30440fefc9 100644 --- a/stdlib/source/test/aedifex/input.lux +++ b/stdlib/source/test/aedifex/input.lux @@ -19,6 +19,8 @@ ["[0]" set (.only Set)]]] [math ["[0]" random]] + [meta + ["[0]" code]] [world ["[0]" file]] [test @@ -63,7 +65,7 @@ [.let [profile (|> expected (//project.project //.default) //injection.project - %.code + code.as_text (of utf8.format injection))] _ (of fs write //project.file profile) actual (is (Async (Try Profile)) diff --git a/stdlib/source/test/aedifex/metadata.lux b/stdlib/source/test/aedifex/metadata.lux index e02e19dfb3..825c4b256b 100644 --- a/stdlib/source/test/aedifex/metadata.lux +++ b/stdlib/source/test/aedifex/metadata.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random]] [test @@ -28,26 +28,26 @@ [sample $artifact.random] (all _.and (_.coverage [/.remote_artifact_uri /.remote_project_uri] - (not (text#= (/.remote_artifact_uri sample) + (not (text.= (/.remote_artifact_uri sample) (/.remote_project_uri sample)))) (_.coverage [/.local_uri] (let [remote_artifact_uri (/.remote_artifact_uri sample) remote_project_uri (/.remote_project_uri sample)] - (and (not (text#= remote_artifact_uri (/.local_uri remote_artifact_uri))) - (not (text#= remote_project_uri (/.local_uri remote_project_uri)))))) + (and (not (text.= remote_artifact_uri (/.local_uri remote_artifact_uri))) + (not (text.= remote_project_uri (/.local_uri remote_project_uri)))))) (_.coverage [/.remote_uri] (let [remote_artifact_uri (/.remote_artifact_uri sample) remote_project_uri (/.remote_project_uri sample)] - (and (text#= remote_artifact_uri (/.remote_uri remote_artifact_uri)) - (text#= remote_project_uri (/.remote_uri remote_project_uri)) + (and (text.= remote_artifact_uri (/.remote_uri remote_artifact_uri)) + (text.= remote_project_uri (/.remote_uri remote_project_uri)) (|> remote_artifact_uri /.local_uri /.remote_uri - (text#= remote_artifact_uri)) + (text.= remote_artifact_uri)) (|> remote_project_uri /.local_uri /.remote_uri - (text#= remote_project_uri))))) + (text.= remote_project_uri))))) )) /artifact.test diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index 2748b835d7..e1638af10b 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -14,7 +14,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [format ["[0]" xml ["<[1]>" \\projection]]] @@ -99,7 +99,7 @@ (try#each (of /.equivalence = expected)) (try.else false)))) (_.coverage [/.uri] - (text#= (//.remote_project_uri artifact) + (text.= (//.remote_project_uri artifact) (/.uri artifact))) (do random.monad [home (random.lower_cased 5) diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index 8a5ca3b5db..2bdac921cb 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -14,7 +14,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [format ["[0]" xml ["<[1]>" \\projection]]] @@ -111,7 +111,7 @@ (try#each (of /.equivalence = expected)) (try.else false))) (_.coverage [/.uri] - (text#= (//.remote_artifact_uri artifact) + (text.= (//.remote_artifact_uri artifact) (/.uri artifact))) (do random.monad [home (random.lower_cased 5) diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index 988fc909a9..24f18bca20 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -34,7 +34,7 @@ ["[0]" / (.only) ["/[1]" // ["[1]" profile] - ["[1][0]" hash (.use "[1]#[0]" equivalence)] + ["[1][0]" hash] ["[1][0]" pom] [dependency ["[1][0]" status]] @@ -84,8 +84,8 @@ (and (same? expected_library actual_library) (when library_status {//status.#Verified actual_sha1 expected_md5} - (and (//hash#= expected_sha1 actual_sha1) - (//hash#= expected_md5 expected_md5)) + (and (//hash.= expected_sha1 actual_sha1) + (//hash.= expected_md5 expected_md5)) _ false))) @@ -99,8 +99,8 @@ (try.else false)) (when pom_status {//status.#Verified actual_sha1 expected_md5} - (and (//hash#= expected_sha1 actual_sha1) - (//hash#= expected_md5 expected_md5)) + (and (//hash.= expected_sha1 actual_sha1) + (//hash.= expected_md5 expected_md5)) _ false)))))) diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux index cc7a262330..0e309ebb28 100644 --- a/stdlib/source/test/aedifex/pom.lux +++ b/stdlib/source/test/aedifex/pom.lux @@ -11,7 +11,7 @@ ["[0]" exception] ["<>" projection]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [format ["[0]" xml (.only) ["<[1]>" \\projection]]]] @@ -32,7 +32,7 @@ (all _.and (_.coverage [/.file] (|> /.file - (text#= "") + (text.= "") not)) (do random.monad [expected @profile.random] diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index a96461c1a0..8b657f5fd0 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -14,7 +14,7 @@ [control ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" set (.only Set)] ["[0]" dictionary (.only Dictionary)]]] @@ -170,7 +170,7 @@ (monoidT.spec /.equivalence /.monoid ..random)) (_.coverage [/.default] - (text#= "" /.default)) + (text.= "" /.default)) (_.coverage [/.default_lux] (|> (of /.monoid identity) (its /.#lux) diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux index 2f60f91abe..74a0da55e0 100644 --- a/stdlib/source/test/aedifex/project.lux +++ b/stdlib/source/test/aedifex/project.lux @@ -15,7 +15,7 @@ ["[0]" exception]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -53,20 +53,20 @@ (_.coverage [/.file] (|> /.file - (text#= "") + (text.= "") not)) (do random.monad [[super_name super_profile] ..profile - [dummy_name dummy_profile] (random.only (|>> product.left (text#= super_name) not) + [dummy_name dummy_profile] (random.only (|>> product.left (text.= super_name) not) ..profile) [sub_name sub_profile] (random.only (function (_ [name profile]) - (and (not (text#= super_name name)) - (not (text#= dummy_name name)))) + (and (not (text.= super_name name)) + (not (text.= dummy_name name)))) ..profile) fake_name (random.only (function (_ name) - (and (not (text#= super_name name)) - (not (text#= dummy_name name)) - (not (text#= sub_name name)))) + (and (not (text.= super_name name)) + (not (text.= dummy_name name)) + (not (text.= sub_name name)))) (random.alphabetic 1)) .let [project (all (of /.monoid composite) (/.project super_name super_profile) diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux index d1e535d65c..3ca42e3344 100644 --- a/stdlib/source/test/aedifex/repository/local.lux +++ b/stdlib/source/test/aedifex/repository/local.lux @@ -11,7 +11,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" binary (.use "[1]#[0]" equivalence)] + ["[0]" binary] [text [encoding ["[0]" utf8]]]] @@ -52,6 +52,6 @@ {try.#Success _} false {try.#Failure _} true) (|> actual - (try#each (binary#= expected)) + (try#each (binary.= expected)) (try.else false)))))) )))) diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux index aba208b7eb..1bbe221147 100644 --- a/stdlib/source/test/aedifex/repository/remote.lux +++ b/stdlib/source/test/aedifex/repository/remote.lux @@ -13,8 +13,8 @@ ["[0]" exception] ["[0]" function]] [data - ["[0]" binary (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" binary] + ["[0]" text (.only) ["%" \\injection] [encoding ["[0]" utf8]]] @@ -66,7 +66,7 @@ [{@http.#Put} {.#Some input}] (if (|> headers (dictionary.value "Authorization") - (maybe#each (text#= (//identity.basic_auth user password))) + (maybe#each (text.= (//identity.basic_auth user password))) (maybe.else false)) [http/status.created [@http.#headers (http.headers (list)) @@ -109,7 +109,7 @@ io.value (try#each (of utf8.format projection)) try#conjoint - (try#each (text#= (%.message address uri))) + (try#each (text.= (%.message address uri))) (try.else false)) (|> (of repo upload uri content) io.value diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux index 4bfec05830..115f1eb616 100644 --- a/stdlib/source/test/aedifex/runtime.lux +++ b/stdlib/source/test/aedifex/runtime.lux @@ -11,7 +11,7 @@ [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)] ["[0]" set]]] @@ -64,11 +64,11 @@ )) (_.coverage [/.for] (let [runtime' (/.for runtime path)] - (and (text#= (its /.#program runtime) + (and (text.= (its /.#program runtime) (its /.#program runtime')) (|> runtime' (its /.#parameters) list.last - (maybe#each (text#= path)) + (maybe#each (text.= path)) (maybe.else false))))) ))))) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 0898090c1a..916eab0d4e 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -14,11 +14,11 @@ ["[0]" atom (.only Atom)]]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection - ["[0]" set (.only Set) (.use "[1]#[0]" equivalence)] + ["[0]" set (.only Set)] ["[0]" list (.use "[1]#[0]" functor) ["[0]" property]]]] ["[0]" math @@ -33,8 +33,8 @@ ["[0]" meta (.use "[1]#[0]" monad) ["[0]" module] ["[0]" static] - ["[0]" location (.use "[1]#[0]" equivalence)] - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" location] + ["[0]" code (.only) ["<[1]>" \\projection]] ["[0]" macro (.only) ["^" pattern] @@ -112,8 +112,8 @@ (not (/.and /.true /.false)) (/.and /.true /.true))) (_.coverage [/.not] - (and (bit#= /.true (/.not /.false)) - (bit#= /.false (/.not /.true)))) + (and (bit.= /.true (/.not /.false)) + (bit.= /.false (/.not /.true)))) (_.coverage [/.cond] (and (n.= expected (/.cond /.true @@ -235,8 +235,8 @@ (all _.and (let [[module short] (/.symbol .example)] (_.coverage [/.symbol /.prelude] - (and (text#= /.prelude module) - (text#= short "example")))) + (and (text.= /.prelude module) + (text.= short "example")))) (let [[module short] (/.symbol ..example)] (_.coverage [/.module_separator] (and (text.contains? /.module_separator module) @@ -277,24 +277,24 @@ (do random.monad [example_nat random.nat] (_.coverage [/.' /.quote] - (and (code#= (code.nat 0) (/.' 0)) - (code#= (code.int -1) (/.' -1)) - (code#= (code.rev .2) (/.' .2)) - (code#= (code.dec +3.4) (/.' +3.4)) - (code#= (code.text "5") (/.' "5")) - (code#= (code.symbol ["" "example_symbol"]) + (and (code.= (code.nat 0) (/.' 0)) + (code.= (code.int -1) (/.' -1)) + (code.= (code.rev .2) (/.' .2)) + (code.= (code.dec +3.4) (/.' +3.4)) + (code.= (code.text "5") (/.' "5")) + (code.= (code.symbol ["" "example_symbol"]) (/.' example_symbol)) - (code#= (code.symbol [/.prelude "example_symbol"]) + (code.= (code.symbol [/.prelude "example_symbol"]) (/.' .example_symbol)) - (code#= (code.symbol [..current_module "example_symbol"]) + (code.= (code.symbol [..current_module "example_symbol"]) (/.' ..example_symbol)) - (code#= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) + (code.= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) (/.' (6 +7 .8))) - (code#= (code.variant (list (code.dec +9.0) + (code.= (code.variant (list (code.dec +9.0) (code.text "9") (code.symbol ["" "i8"]))) (/.' {+9.0 "9" i8})) - (code#= (code.tuple (list (code.dec +9.0) + (code.= (code.tuple (list (code.dec +9.0) (code.text "9") (code.symbol ["" "i8"]))) (/.' [+9.0 "9" i8])) @@ -305,24 +305,24 @@ (do random.monad [example_nat random.nat] (_.coverage [/.` /.complete_quote] - (and (code#= (code.nat 0) (/.` 0)) - (code#= (code.int -1) (/.` -1)) - (code#= (code.rev .2) (/.` .2)) - (code#= (code.dec +3.4) (/.` +3.4)) - (code#= (code.text "5") (/.` "5")) - (code#= (code.symbol [..current_module "example_symbol"]) + (and (code.= (code.nat 0) (/.` 0)) + (code.= (code.int -1) (/.` -1)) + (code.= (code.rev .2) (/.` .2)) + (code.= (code.dec +3.4) (/.` +3.4)) + (code.= (code.text "5") (/.` "5")) + (code.= (code.symbol [..current_module "example_symbol"]) (/.` example_symbol)) - (code#= (code.symbol [/.prelude "example_symbol"]) + (code.= (code.symbol [/.prelude "example_symbol"]) (/.` .example_symbol)) - (code#= (code.symbol [..current_module "example_symbol"]) + (code.= (code.symbol [..current_module "example_symbol"]) (/.` ..example_symbol)) - (code#= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) + (code.= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) (/.` (6 +7 .8))) - (code#= (code.variant (list (code.dec +9.0) + (code.= (code.variant (list (code.dec +9.0) (code.text "9") (code.symbol [..current_module "i8"]))) (/.` {+9.0 "9" i8})) - (code#= (code.tuple (list (code.dec +9.0) + (code.= (code.tuple (list (code.dec +9.0) (code.text "9") (code.symbol [..current_module "i8"]))) (/.` [+9.0 "9" i8])) @@ -333,24 +333,24 @@ (do random.monad [example_nat random.nat] (_.coverage [/.`' /.incomplete_quote] - (and (code#= (code.nat 0) (/.`' 0)) - (code#= (code.int -1) (/.`' -1)) - (code#= (code.rev .2) (/.`' .2)) - (code#= (code.dec +3.4) (/.`' +3.4)) - (code#= (code.text "5") (/.`' "5")) - (code#= (code.symbol ["" "example_symbol"]) + (and (code.= (code.nat 0) (/.`' 0)) + (code.= (code.int -1) (/.`' -1)) + (code.= (code.rev .2) (/.`' .2)) + (code.= (code.dec +3.4) (/.`' +3.4)) + (code.= (code.text "5") (/.`' "5")) + (code.= (code.symbol ["" "example_symbol"]) (/.`' example_symbol)) - (code#= (code.symbol [/.prelude "example_symbol"]) + (code.= (code.symbol [/.prelude "example_symbol"]) (/.`' .example_symbol)) - (code#= (code.symbol [..current_module "example_symbol"]) + (code.= (code.symbol [..current_module "example_symbol"]) (/.`' ..example_symbol)) - (code#= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) + (code.= (code.form (list (code.nat 6) (code.int +7) (code.rev .8))) (/.`' (6 +7 .8))) - (code#= (code.variant (list (code.dec +9.0) + (code.= (code.variant (list (code.dec +9.0) (code.text "9") (code.symbol ["" "i8"]))) (/.`' {+9.0 "9" i8})) - (code#= (code.tuple (list (code.dec +9.0) + (code.= (code.tuple (list (code.dec +9.0) (code.text "9") (code.symbol ["" "i8"]))) (/.`' [+9.0 "9" i8])) @@ -375,7 +375,7 @@ /.#meta /.#datum] (|> example (its /.#meta) - (location#= location.dummy))) + (location.= location.dummy))) (_.for [/.UnQuote] (all _.and (_.coverage [/.unquote_macro] @@ -394,11 +394,11 @@ true)) (_.coverage [/., /.but] (expansion.let [ (code.nat example_nat)] - (and (not (code#= + (and (not (code.= (/.' (/., )))) - (code#= + (code.= (/.` (/., ))) - (code#= + (code.= (/.`' (/., )))))) (_.coverage [/.,* /.also] (expansion.let [ (code.bit example_bit) @@ -406,11 +406,11 @@ (code.int example_int) (code.tuple (list )) [(/.,* (list ))]] - (and (not (code#= + (and (not (code.= (/.' ))) - (code#= + (code.= (/.` )) - (code#= + (code.= (/.`' ))))) (_.coverage [/.,' /.verbatim] (expansion.let [ (code.bit example_bit) @@ -418,11 +418,11 @@ (code.int example_int) (/.' [(list )]) [(/.,' (list ))]] - (and (not (code#= + (and (not (code.= (/.' ))) - (code#= + (code.= (/.` )) - (code#= + (code.= (/.`' ))))) )) ))) @@ -698,7 +698,7 @@ (_.coverage [/.char] (|> (`` (/.char (,, (/.static static_char)))) text.of_char - (text#= static_char))) + (text.= static_char))) ))) (every Small @@ -811,9 +811,9 @@ left mid right)] - (and (text#= + (and (text.= ) - (not (code#= (' ) + (not (code.= (' ) (' )))))))) (the for_expansion @@ -1103,8 +1103,8 @@ (_.coverage [/.public /.private] (and /.public (not /.private))) (_.coverage [/.global /.local] - (and (bit#= /.public /.global) - (bit#= /.private /.local))) + (and (bit.= /.public /.global) + (bit.= /.private /.local))) )) (the for_complex @@ -1188,7 +1188,7 @@ correct_locals! (and (n.= 4 (its .#counter locals/2)) - (set#= expected_locals/2 + (set.= expected_locals/2 actual_locals/2)) captured/2 (its .#captured scope/2) diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux index 2579b3bf67..7c249a8651 100644 --- a/stdlib/source/test/lux/abstract/equivalence.lux +++ b/stdlib/source/test/lux/abstract/equivalence.lux @@ -13,7 +13,7 @@ ["[0]" maybe]] [data ["[0]" any] - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text] [collection ["[0]" list]]] @@ -41,7 +41,7 @@ (/#= left left) symmetry! - (bit#= (/#= left right) + (bit.= (/#= left right) (/#= right left))] (and reflexivity! symmetry! @@ -124,11 +124,11 @@ .let [equivalence (is (/.Equivalence (/.Equivalence Nat)) (implementation (the (= left right) - (and (bit#= (of left = leftN leftN) + (and (bit.= (of left = leftN leftN) (of right = leftN leftN)) - (bit#= (of left = rightN rightN) + (bit.= (of left = rightN rightN) (of right = rightN rightN)) - (bit#= (of left = leftN rightN) + (bit.= (of left = leftN rightN) (of right = leftN rightN))))))]] (<| (_.covering /._) (all _.and diff --git a/stdlib/source/test/lux/abstract/format.lux b/stdlib/source/test/lux/abstract/format.lux index 00f3c162ad..1cdb8a9bd1 100644 --- a/stdlib/source/test/lux/abstract/format.lux +++ b/stdlib/source/test/lux/abstract/format.lux @@ -9,7 +9,7 @@ [control ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [format ["[0]" json (.only JSON)]]] [math @@ -45,7 +45,7 @@ (_.coverage [/.composite] (when (|> expected (of ..format injection) (of ..format projection)) {try.#Success actual} - (bit#= expected actual) + (bit.= expected actual) {try.#Failure error} false))))) diff --git a/stdlib/source/test/lux/abstract/hash.lux b/stdlib/source/test/lux/abstract/hash.lux index 57b2285223..779b47ce8d 100644 --- a/stdlib/source/test/lux/abstract/hash.lux +++ b/stdlib/source/test/lux/abstract/hash.lux @@ -12,7 +12,7 @@ ["[0]" contravariant ["[1]T" \\test]]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -48,11 +48,11 @@ .let [hash (is (Equivalence (/.Hash Nat)) (implementation (the (= (open "left#[0]") (open "right#[0]")) - (and (bit#= (left#= (left#hash leftN) (left#hash leftN)) + (and (bit.= (left#= (left#hash leftN) (left#hash leftN)) (right#= (right#hash leftN) (right#hash leftN))) - (bit#= (left#= (left#hash rightN) (left#hash rightN)) + (bit.= (left#= (left#hash rightN) (left#hash rightN)) (right#= (right#hash rightN) (right#hash rightN))) - (bit#= (left#= (left#hash leftN) (left#hash rightN)) + (bit.= (left#= (left#hash leftN) (left#hash rightN)) (right#= (right#hash leftN) (right#hash rightN)))))))]] (<| (_.covering /._) (all _.and diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux index fbcd809812..49c20cb65c 100644 --- a/stdlib/source/test/lux/abstract/interval.lux +++ b/stdlib/source/test/lux/abstract/interval.lux @@ -25,7 +25,7 @@ [test ["_" property (.only Test)]]]] [\\library - ["[0]" / (.only Interval) (.use "[1]#[0]" equivalence)]] + ["[0]" / (.only Interval)]] [// ["[0]T" enum]]) @@ -125,7 +125,7 @@ right_outer ..outer] (all _.and (_.test "The union of an interval to itself yields the same interval." - (/#= some_interval (/.union some_interval some_interval))) + (/.= some_interval (/.union some_interval some_interval))) (_.test "The union of 2 inner intervals is another inner interval." (/.inner? (/.union left_inner right_inner))) (_.test "The union of 2 outer intervals yields an inner interval when their complements don't overlap, and an outer when they do." @@ -146,7 +146,7 @@ right_outer ..outer] (all _.and (_.test "The intersection of an interval to itself yields the same interval." - (/#= some_interval (/.intersection some_interval some_interval))) + (/.= some_interval (/.intersection some_interval some_interval))) (_.test "The intersection of 2 inner intervals yields an inner interval when they overlap, and an outer when they don't." (if (/.overlaps? left_inner right_inner) (/.inner? (/.intersection left_inner right_inner)) @@ -161,7 +161,7 @@ [some_interval ..interval] (all _.and (_.test "The complement of a complement is the same as the original." - (/#= some_interval (|> some_interval /.complement /.complement))) + (/.= some_interval (|> some_interval /.complement /.complement))) (_.test "The complement of an interval does not overlap it." (not (/.overlaps? some_interval (/.complement some_interval)))) ))) diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux index 429cbf9165..41278d53a5 100644 --- a/stdlib/source/test/lux/abstract/monad.lux +++ b/stdlib/source/test/lux/abstract/monad.lux @@ -15,7 +15,7 @@ [data [collection ["[0]" list (.use "[1]#[0]" functor mix)]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random] @@ -123,7 +123,7 @@ (atom.update! (text.suffix before) output))] (atom.read! output))) io.value - (text#= (%.message before after)))) + (text.= (%.message before after)))) (/free.test ..spec) /indexed.test diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux index de67c6993d..74b9b3035e 100644 --- a/stdlib/source/test/lux/abstract/order.lux +++ b/stdlib/source/test/lux/abstract/order.lux @@ -12,7 +12,7 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -33,11 +33,11 @@ .let [equivalence (is (Equivalence (/.Order Nat)) (implementation (the (= leftO rightO) - (and (bit#= (of leftO < left left) + (and (bit.= (of leftO < left left) (of rightO < left left)) - (bit#= (of leftO < right right) + (bit.= (of leftO < right right) (of rightO < right right)) - (bit#= (of leftO < left right) + (bit.= (of leftO < left right) (of rightO < left right))))))]]) (all _.and (_.for [/.functor] @@ -46,17 +46,17 @@ (n.< (/.max n.order left right) (/.min n.order left right))) (_.coverage [/.Comparison /.>] - (not (bit#= (n.< left right) + (not (bit.= (n.< left right) (/.> n.order left right)))) (_.coverage [/.<=] (and (/.<= n.order left left) (/.<= n.order right right) - (bit#= (of n.order < left right) + (bit.= (of n.order < left right) (/.<= n.order left right)))) (_.coverage [/.>=] (and (/.>= n.order left left) (/.>= n.order right right) - (bit#= (/.> n.order left right) + (bit.= (/.> n.order left right) (/.>= n.order left right)))) ))) @@ -81,7 +81,7 @@ (not (/#< subject parameter))) (and (/#< subject parameter) (not (/#< parameter subject))))] - (bit#= equal! (not ordered!)))] + (bit.= equal! (not ordered!)))] subject (random.only (|>> (/#= parameter) not) random) diff --git a/stdlib/source/test/lux/control/aspect.lux b/stdlib/source/test/lux/control/aspect.lux index b193d87b7a..92d3c98117 100644 --- a/stdlib/source/test/lux/control/aspect.lux +++ b/stdlib/source/test/lux/control/aspect.lux @@ -10,14 +10,14 @@ [function ["?" predicate]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] [number ["n" nat]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] ["[0]" static] ["[0]" code]] [test @@ -51,14 +51,14 @@ /.Aspect (list [(all ?.or (/.when_global (|>> (its /.#name) - (symbol#= (symbol ..global)))) + (symbol.= (symbol ..global)))) (/.when_local ?.all)) (symbol ..double)])) (the before_aspect /.Aspect (list [(/.when_global (|>> (its /.#name) - (symbol#= (symbol ..triple)))) + (symbol.= (symbol ..triple)))) (symbol ..pre_double)])) (the this_module @@ -120,12 +120,12 @@ (triple local))))) (_.coverage [/.when_module] (and (n.= (triple (double local)) - (/.with (list [(?.and (/.when_module (text#= this_module)) + (/.with (list [(?.and (/.when_module (text.= this_module)) (/.when_local ?.all)) (symbol ..double)]) (triple local))) (n.= (triple local) - (/.with (list [(?.and (/.when_module (text#= another_module)) + (/.with (list [(?.and (/.when_module (text.= another_module)) (/.when_local ?.all)) (symbol ..double)]) (triple local))))) diff --git a/stdlib/source/test/lux/control/concatenative.lux b/stdlib/source/test/lux/control/concatenative.lux index bd7951ecb7..58c30be7ef 100644 --- a/stdlib/source/test/lux/control/concatenative.lux +++ b/stdlib/source/test/lux/control/concatenative.lux @@ -8,7 +8,7 @@ [monad (.only do)]] [data ["[0]" sum] - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random] [number @@ -116,7 +116,7 @@ ')) (,, (template.with [ ] [(_.coverage [] - (bit#= ( parameter subject) + (bit.= ( parameter subject) (/.value (|>> (/.push subject) (/.push parameter) ))))] diff --git a/stdlib/source/test/lux/control/concurrency/incremental.lux b/stdlib/source/test/lux/control/concurrency/incremental.lux index 5cc372daca..6d9cec5259 100644 --- a/stdlib/source/test/lux/control/concurrency/incremental.lux +++ b/stdlib/source/test/lux/control/concurrency/incremental.lux @@ -9,20 +9,13 @@ ["[0]" functor ["[1]T" \\test (.only Injection Comparison)]]] [control - ["[0]" io] - ["[0]" try] - ["[0]" exception]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" io]] [math ["[0]" random]] [test - ["_" property (.only Test)] - ["[0]" unit]]]] + ["_" property (.only Test)]]]] [\\library - ["[0]" / (.only) - [// - ["[0]" async]]]]) + ["[0]" /]]) (the injection (Injection /.Computation) diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux index a6e90460bc..1d0b109ae3 100644 --- a/stdlib/source/test/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux @@ -16,7 +16,7 @@ ["[0]" async (.only Async)] ["[0]" atom (.only Atom)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -128,9 +128,9 @@ _ processB .let [outcome (io.value (atom.read! resource))]] (unit.coverage [/.mutex /.synchronize!] - (or (text#= (%.message expected_As expected_Bs) + (or (text.= (%.message expected_As expected_Bs) outcome) - (text#= (%.message expected_Bs expected_As) + (text.= (%.message expected_Bs expected_As) outcome)))))) ))) diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux index 48ab3e3a37..2c03f26a14 100644 --- a/stdlib/source/test/lux/control/exception.lux +++ b/stdlib/source/test/lux/control/exception.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random] @@ -53,7 +53,7 @@ false {try.#Failure message} - (text#= message (/.error ..an_exception [])))) + (text.= message (/.error ..an_exception [])))) (_.coverage [/.is?] (/.is? ..an_exception (/.error ..an_exception []))) @@ -64,7 +64,7 @@ {try.#Failure message} (and (not assertion_succeeded?) - (text#= message (/.error ..an_exception []))))) + (text.= message (/.error ..an_exception []))))) (_.coverage [/.when] (and (n.= expected (|> (/.except ..an_exception []) @@ -99,7 +99,7 @@ {try.#Failure _} false) (when (/.with ..an_exception [] {try.#Failure ""}) {try.#Success _} false - {try.#Failure message} (text#= message (/.error ..an_exception []))) + {try.#Failure message} (text.= message (/.error ..an_exception []))) (when (/.with ..an_exception [] (is (Try Nat) (/.except ..another_exception []))) diff --git a/stdlib/source/test/lux/control/function/mutual.lux b/stdlib/source/test/lux/control/function/mutual.lux index c90c6a0225..571f3bf988 100644 --- a/stdlib/source/test/lux/control/function/mutual.lux +++ b/stdlib/source/test/lux/control/function/mutual.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -34,8 +34,8 @@ (when number 0 false _ (even? (-- number)))] - (and (bit#= expected (even? sample)) - (bit#= (not expected) (odd? sample))))))) + (and (bit.= expected (even? sample)) + (bit.= (not expected) (odd? sample))))))) (/.the [(even? number) @@ -56,8 +56,8 @@ [sample (of ! each (n.% 10) random.nat) .let [expected (n.even? sample)]] (<| (_.coverage [/.the]) - (and (bit#= expected (..even? sample)) - (bit#= (not expected) (..odd? sample)))))) + (and (bit.= expected (..even? sample)) + (bit.= (not expected) (..odd? sample)))))) (the .public test Test diff --git a/stdlib/source/test/lux/control/function/polymorphism/type.lux b/stdlib/source/test/lux/control/function/polymorphism/type.lux index 923ae16431..93dc19f959 100644 --- a/stdlib/source/test/lux/control/function/polymorphism/type.lux +++ b/stdlib/source/test/lux/control/function/polymorphism/type.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random]] @@ -37,8 +37,8 @@ nat random.nat]) (all _.and (_.coverage [/.the /.method] - (and (text#= (%.bit bit) + (and (text.= (%.bit bit) (injection bit)) - (text#= (%.nat nat) + (text.= (%.nat nat) (injection nat)))) ))) diff --git a/stdlib/source/test/lux/control/function/predicate.lux b/stdlib/source/test/lux/control/function/predicate.lux index a8ba201fa8..7ac680b005 100644 --- a/stdlib/source/test/lux/control/function/predicate.lux +++ b/stdlib/source/test/lux/control/function/predicate.lux @@ -15,7 +15,7 @@ [control ["[0]" function]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math @@ -42,7 +42,7 @@ .let [equivalence (is (Equivalence (/.Predicate Nat)) (implementation (the (= left right) - (bit#= (left sample) + (bit.= (left sample) (right sample)))))]]) (_.for [/.Predicate]) (all _.and @@ -59,26 +59,26 @@ (monoidT.spec equivalence /.intersection generator)))) (_.coverage [/.none] - (bit#= false (/.none sample))) + (bit.= false (/.none sample))) (_.coverage [/.all] - (bit#= true (/.all sample))) + (bit.= true (/.all sample))) (_.coverage [/.or] - (bit#= (/.all sample) + (bit.= (/.all sample) ((/.or /.none /.all) sample))) (_.coverage [/.and] - (bit#= (/.none sample) + (bit.= (/.none sample) ((/.and /.none /.all) sample))) (_.coverage [/.complement] - (and (bit#= (not (/.none sample)) + (and (bit.= (not (/.none sample)) ((/.complement /.none) sample)) - (bit#= (not (/.all sample)) + (bit.= (not (/.all sample)) ((/.complement /.all) sample)))) (_.coverage [/.not] (alias? /.complement /.not)) (_.coverage [/.difference] (let [/2? (multiple? 2) /3? (multiple? 3)] - (bit#= (and (/2? sample) + (bit.= (and (/2? sample) (not (/3? sample))) ((/.difference /3? /2?) sample)))) (_.coverage [/.rec] @@ -93,6 +93,6 @@ {.#Item head tail} (or (even? head) (again tail)))))))] - (bit#= (list.any? even? samples) + (bit.= (list.any? even? samples) (any_even? samples)))) ))) diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux index 1f91751773..3f6e6ec157 100644 --- a/stdlib/source/test/lux/control/pipe.lux +++ b/stdlib/source/test/lux/control/pipe.lux @@ -10,7 +10,7 @@ [control ["[0]" pure]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random] @@ -40,7 +40,7 @@ (|> sample (/.let x [(n.+ x x)])))) (_.coverage [/.cond] - (text#= (cond (n.= 0 sample) "zero" + (text.= (cond (n.= 0 sample) "zero" (n.even? sample) "even" "odd") (|> sample @@ -48,7 +48,7 @@ [n.even?] [(/.new "even" [])] [(/.new "odd" [])])))) (_.coverage [/.if] - (text#= (if (n.even? sample) + (text.= (if (n.even? sample) "even" "odd") (|> sample @@ -79,9 +79,9 @@ [%.nat]))] (and (n.= (++ sample) left) (n.= (-- sample) middle) - (text#= (%.nat sample) right)))) + (text.= (%.nat sample) right)))) (_.coverage [/.when] - (text#= (when (n.% 10 sample) + (text.= (when (n.% 10 sample) 0 "zero" 1 "one" 2 "two" diff --git a/stdlib/source/test/lux/control/projection.lux b/stdlib/source/test/lux/control/projection.lux index c4f74891a0..256d68d33c 100644 --- a/stdlib/source/test/lux/control/projection.lux +++ b/stdlib/source/test/lux/control/projection.lux @@ -15,7 +15,7 @@ [control ["[0]" try (.only Try)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -37,7 +37,7 @@ (for_any (_ a) (-> Text (Try a) Bit)) (when input {try.#Failure actual} - (text#= expected actual) + (text.= expected actual) _ false)) diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux index ca95e171d3..b8388beadf 100644 --- a/stdlib/source/test/lux/control/security/policy.lux +++ b/stdlib/source/test/lux/control/security/policy.lux @@ -13,7 +13,7 @@ ["[0]" apply ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random] [number @@ -65,7 +65,7 @@ (the equivalence (implementation (the (= expected actual) - (text#= (%#can_downgrade expected) + (text.= (%#can_downgrade expected) (%#can_downgrade actual))))) (the hash (|>> %#can_downgrade diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux index bc0fcb74b9..6aa9836103 100644 --- a/stdlib/source/test/lux/control/try.lux +++ b/stdlib/source/test/lux/control/try.lux @@ -14,10 +14,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [control - ["[0]" pipe] + ["|" pipe] ["[0]" io]] - [data - ["[0]" text (.use "[1]#[0]" equivalence)]] [math ["[0]" random (.only Random)] [number @@ -111,7 +109,7 @@ b (in alternative)] (in (n.+ a b))) io.value - (pipe.when + (|.when {/.#Success it} (n.= (n.+ expected alternative) it) diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux index d0eba74b06..58f6d20580 100644 --- a/stdlib/source/test/lux/control/writer.lux +++ b/stdlib/source/test/lux/control/writer.lux @@ -16,7 +16,7 @@ [control ["[0]" io]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random] [number @@ -56,7 +56,7 @@ (monadT.spec (..injection text.monoid) ..comparison (/.monad text.monoid))) (_.coverage [/.write] - (text#= trace + (text.= trace (its /.#trace (/.write trace)))) (_.coverage [/.with /.lifted] (let [lifted (/.lifted text.monoid io.monad) diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 961c91b4ff..ee5145d916 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -24,7 +24,7 @@ [data ["[0]" sum] ["[0]" bit] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [encoding ["[0]" utf8]]] [collection @@ -55,7 +55,7 @@ [test ["_" property (.only Test)]]]] [\\library - ["[0]" / (.only) (.use "[1]#[0]" equivalence) + ["[0]" / (.only) ["!" \\unsafe] ["[0]" \\injection] ["[0]" \\projection]]]) @@ -78,7 +78,7 @@ (of utf8.format projection) (pipe.when {try.#Success converted} - (text#= value converted) + (text.= value converted) {try.#Failure error} false))) @@ -97,7 +97,7 @@ (implementation (the (= [expected_module expected_line expected_column] [sample_module sample_line sample_column]) - (and (text#= expected_module sample_module) + (and (text.= expected_module sample_module) (n.= expected_line sample_line) (n.= expected_column sample_column))))) @@ -416,7 +416,7 @@ (Equivalence \\injection.Specification) (implementation (the (= expected actual) - (/#= (\\injection.instance expected) + (/.= (\\injection.instance expected) (\\injection.instance actual))))) (the random_specification diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index 1f4facdb77..3dc8a852be 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -21,7 +21,7 @@ ["[0]" try]] [data ["[0]" bit] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)] ["[0]" set]]] @@ -87,7 +87,7 @@ (/.item 0)) (/.one choose evens)] [{try.#Success expected} {try.#Success actual}] - (text#= expected actual) + (text.= expected actual) [{try.#Failure _} {try.#Failure _}] true @@ -284,7 +284,7 @@ (_.coverage [!.one] (|> evens (!.one choose) - (maybe#each (text#= (|> evens + (maybe#each (text.= (|> evens (!.each (of n.decimal injection)) (!.item 0)))) (maybe.else false)))) diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index d52354db90..336dcafad6 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -14,7 +14,7 @@ ["[0]" try (.use "[1]#[0]" functor)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" set] ["[0]" list (.use "[1]#[0]" functor)]]] @@ -75,7 +75,7 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (n.= 0 (/.size sample)) + (bit.= (n.= 0 (/.size sample)) (/.empty? sample))) (_.coverage [/.empty] (/.empty? (/.empty n.order))) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index 43687dd842..26796b20fc 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -31,7 +31,7 @@ [data ["[0]" bit] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" set]]] [math @@ -405,7 +405,7 @@ /.head) (/.one choice sample)] [{try.#Success expected} {try.#Success actual}] - (text#= expected actual) + (text.= expected actual) [{try.#Failure _} {try.#Failure _}] true diff --git a/stdlib/source/test/lux/data/collection/list/property.lux b/stdlib/source/test/lux/data/collection/list/property.lux index 1beb7fe10c..6b342fff14 100644 --- a/stdlib/source/test/lux/data/collection/list/property.lux +++ b/stdlib/source/test/lux/data/collection/list/property.lux @@ -13,7 +13,7 @@ [control ["[0]" maybe (.use "[1]#[0]" monad)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text] [collection ["[0]" set] @@ -62,7 +62,7 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (n.= 0 (/.size sample)) + (bit.= (n.= 0 (/.size sample)) (/.empty? sample))) (_.coverage [/.empty] (/.empty? /.empty)) diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux index 2193b68691..cffedee418 100644 --- a/stdlib/source/test/lux/data/collection/queue.lux +++ b/stdlib/source/test/lux/data/collection/queue.lux @@ -13,7 +13,7 @@ [control ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" set] ["[0]" list (.use "[1]#[0]" monoid)]]] @@ -54,13 +54,13 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (n.= 0 size) (/.empty? sample))) + (bit.= (n.= 0 size) (/.empty? sample))) (_.coverage [/.empty] (let [empty_is_empty! (/.empty? /.empty) all_empty_queues_look_the_same! - (bit#= (/.empty? sample) + (bit.= (/.empty? sample) (of (/.equivalence n.equivalence) = sample /.empty))] diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux index e0af22dfad..414600050d 100644 --- a/stdlib/source/test/lux/data/collection/queue/priority.lux +++ b/stdlib/source/test/lux/data/collection/queue/priority.lux @@ -9,7 +9,7 @@ [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -47,7 +47,7 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (n.= 0 (/.size sample)) + (bit.= (n.= 0 (/.size sample)) (/.empty? sample))) (_.coverage [/.empty] (/.empty? /.empty)) diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index 72ce09e73b..da3ed197dd 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -24,8 +24,8 @@ [function ["[0]" predicate]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" mix)] ["[0]" set]]] @@ -68,7 +68,7 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (/.empty? sample) (n.= 0 (/.size sample)))) + (bit.= (/.empty? sample) (n.= 0 (/.size sample)))) (_.coverage [/.empty] (/.empty? /.empty)) (_.coverage [/.list /.of_list] @@ -237,7 +237,7 @@ (/.item 0)) (/.one choice sample)] [{try.#Success expected} {try.#Success actual}] - (text#= expected actual) + (text.= expected actual) [{try.#Failure _} {try.#Failure _}] true diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index c5bba160f3..040a063808 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -14,7 +14,7 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math @@ -24,7 +24,7 @@ [test ["_" property (.only Test)]]]] [\\library - ["[0]" / (.use "[1]#[0]" equivalence)]]) + ["[0]" /]]) (the gen_nat (Random Nat) @@ -71,10 +71,10 @@ (_.coverage [/.size] (n.= sizeL (/.size setL))) (_.coverage [/.empty?] - (bit#= (/.empty? setL) + (bit.= (/.empty? setL) (n.= 0 (/.size setL)))) (_.coverage [/.list /.of_list] - (|> setL /.list (/.of_list n.hash) (/#= setL))) + (|> setL /.list (/.of_list n.hash) (/.= setL))) (_.coverage [/.member?] (and (list.every? (/.member? setL) (/.list setL)) (not (/.member? setL non_memberL)))) @@ -95,12 +95,12 @@ (|> setL (/.has non_memberL) (/.lacks non_memberL) - (/#= setL)) + (/.= setL)) idempotency! (|> setL (/.lacks non_memberL) - (/#= setL))] + (/.= setL))] (and symmetry! idempotency!))) (_.coverage [/.union /.sub?] @@ -113,7 +113,7 @@ union_with_empty_set! (|> setL (/.union (/.empty n.hash)) - (/#= setL))] + (/.= setL))] (and sets_are_subs_of_their_unions! union_with_empty_set!))) (_.coverage [/.intersection /.super?] diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index bfa9b55fbf..8843e92015 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -15,7 +15,7 @@ [function ["[0]" predicate]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" set] ["[0]" list (.use "[1]#[0]" mix)]]] @@ -142,7 +142,7 @@ (n.= (list.size (/.list sample)) (/.size sample))) (_.coverage [/.empty?] - (bit#= (/.empty? sample) + (bit.= (/.empty? sample) (n.= 0 (/.size sample)))) (_.coverage [/.empty] (/.empty? (/.empty n.hash))) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 0ac637539b..8b0c1cf1a2 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -12,7 +12,7 @@ [control ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math @@ -70,7 +70,7 @@ (_.coverage [/.size] (n.= sizeL (/.size setL))) (_.coverage [/.empty?] - (bit#= (n.= 0 (/.size setL)) + (bit.= (n.= 0 (/.size setL)) (/.empty? setL))) (_.coverage [/.empty] (/.empty? (/.empty n.order))) @@ -129,7 +129,7 @@ (/.super? empty setL) symmetry! - (bit#= (/.super? setL setR) + (bit.= (/.super? setL setR) (/.sub? setR setL))] (and self! empty! diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux index 0106fd9783..2050931fe5 100644 --- a/stdlib/source/test/lux/data/collection/stack.lux +++ b/stdlib/source/test/lux/data/collection/stack.lux @@ -14,7 +14,7 @@ ["[0]" maybe] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random] [number @@ -45,7 +45,7 @@ (_.coverage [/.size] (n.= size (/.size sample))) (_.coverage [/.empty?] - (bit#= (n.= 0 (/.size sample)) + (bit.= (n.= 0 (/.size sample)) (/.empty? sample))) (_.coverage [/.empty] (/.empty? /.empty)) diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index 60a4f5c9cf..153483c8ab 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -9,7 +9,7 @@ [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence monoid)] + ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" mix)]]] [math @@ -38,7 +38,7 @@ (_.for [/.Tree]) (do [! random.monad] [tag_left (random.alpha_numeric 1) - tag_right (random.only (|>> (text#= tag_left) not) + tag_right (random.only (|>> (text.= tag_left) not) (random.alpha_numeric 1)) expected_left random.nat expected_right random.nat] @@ -47,9 +47,9 @@ (exec (/.builder text.monoid) true)) (_.coverage [/.tag] - (and (text#= tag_left + (and (text.= tag_left (/.tag (of ..builder leaf tag_left expected_left))) - (text#= (text#composite tag_left tag_right) + (text.= (text#composite tag_left tag_right) (/.tag (of ..builder branch (of ..builder leaf tag_left expected_left) (of ..builder leaf tag_right expected_right)))))) diff --git a/stdlib/source/test/lux/data/color/hsb.lux b/stdlib/source/test/lux/data/color/hsb.lux index f959a88c12..81c4b90ec9 100644 --- a/stdlib/source/test/lux/data/color/hsb.lux +++ b/stdlib/source/test/lux/data/color/hsb.lux @@ -9,8 +9,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -91,7 +91,7 @@ /.rgb (of rgb.equivalence = expected_rgb))) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) )) ))) diff --git a/stdlib/source/test/lux/data/color/hsl.lux b/stdlib/source/test/lux/data/color/hsl.lux index aaf3c1d453..8bdee3b57e 100644 --- a/stdlib/source/test/lux/data/color/hsl.lux +++ b/stdlib/source/test/lux/data/color/hsl.lux @@ -9,8 +9,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -137,7 +137,7 @@ d.abs (d.<= ..rgb_error_margin))))) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) ))) ))) diff --git a/stdlib/source/test/lux/data/color/rgb.lux b/stdlib/source/test/lux/data/color/rgb.lux index a220c0feac..bb21541127 100644 --- a/stdlib/source/test/lux/data/color/rgb.lux +++ b/stdlib/source/test/lux/data/color/rgb.lux @@ -16,8 +16,8 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" functor)] [number @@ -131,10 +131,9 @@ (n.= expected_blue (/.blue it))))) (_.coverage [/.complement] - (let [~expected (/.complement expected) - (open "/#[0]") /.equivalence] - (and (not (/#= expected ~expected)) - (/#= expected (/.complement ~expected))))) + (let [~expected (/.complement expected)] + (and (not (/.= expected ~expected)) + (/.= expected (/.complement ~expected))))) (_.coverage [/.black /.white] (and (of /.equivalence = /.white (/.complement /.black)) (of /.equivalence = /.black (/.complement /.white)))) @@ -150,7 +149,7 @@ (d.<= (distance/3 /.white colorful) (distance/3 /.white (/.brighter ratio colorful))))) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) )) ))) diff --git a/stdlib/source/test/lux/data/color/scheme.lux b/stdlib/source/test/lux/data/color/scheme.lux index 9c6bf77607..d4c97c4a34 100644 --- a/stdlib/source/test/lux/data/color/scheme.lux +++ b/stdlib/source/test/lux/data/color/scheme.lux @@ -24,7 +24,7 @@ [\\library ["[0]" / (.only) [// - ["[0]" rgb (.use "[1]#[0]" equivalence)] + ["[0]" rgb] ["[0]" hsl] ["[0]" hsb]]]]) @@ -47,9 +47,9 @@ [(_.coverage [] (let [expected (hsb.rgb (hsb.hsb expected_hue expected_saturation +0.5)) [c0 c1 c2] ( expected)] - (and (rgb#= expected c0) - (not (rgb#= expected c1)) - (not (rgb#= expected c2)))))] + (and (rgb.= expected c0) + (not (rgb.= expected c1)) + (not (rgb.= expected c2)))))] [/.triad] [/.clash] @@ -58,10 +58,10 @@ [(_.coverage [] (let [expected (hsb.rgb (hsb.hsb expected_hue expected_saturation +0.5)) [c0 c1 c2 c3] ( expected)] - (and (rgb#= expected c0) - (not (rgb#= expected c1)) - (not (rgb#= expected c2)) - (not (rgb#= expected c3)))))] + (and (rgb.= expected c0) + (not (rgb.= expected c1)) + (not (rgb.= expected c2)) + (not (rgb.= expected c3)))))] [/.square] [/.tetradic])) @@ -74,7 +74,7 @@ expected_brightness)) palette ( spread variations expected)] (and (n.= variations (list.size palette)) - (not (list.any? (rgb#= expected) palette)))))] + (not (list.any? (rgb.= expected) palette)))))] [+1.0 /.analogous] [+0.5 /.monochromatic] )) diff --git a/stdlib/source/test/lux/data/color/terminal.lux b/stdlib/source/test/lux/data/color/terminal.lux index e5b65c9537..1e606455ff 100644 --- a/stdlib/source/test/lux/data/color/terminal.lux +++ b/stdlib/source/test/lux/data/color/terminal.lux @@ -9,7 +9,7 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list]]] [math @@ -87,7 +87,7 @@ (let [it (/.with command expected_text)] (and (text.contains? expected_text it) - (not (text#= expected_text it))))) + (not (text.= expected_text it))))) (_.coverage [/.foreground /.background] (not (of /.equivalence = (/.foreground color) diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 5558b2601f..90d3746317 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -57,7 +57,7 @@ ["[0]" \\polytypic] ["[0]" \\projection] [\\library - ["[0]" / (.only JSON) (.use "[1]#[0]" equivalence)]]) + ["[0]" / (.only JSON)]]) (the !expect (template.macro (_ ) @@ -279,7 +279,7 @@ (syntax.macro (_ []) (do meta.monad [value (macro.symbol "string")] - (in (list (code.text (%.code value))))))) + (in (list (code.text (code.as_text value))))))) (the (digits/4 it) (-> Nat Text) @@ -438,7 +438,7 @@ (|> expected /.as_text (of /.format projection) - (try#each (/#= expected)) + (try#each (/.= expected)) (try.else false)))) (do random.monad [keys (random.set text.hash 3 (random.alphabetic 1)) @@ -459,7 +459,7 @@ (_.coverage [/.field] (list.every? (function (_ [key expected]) (|> (/.field key object) - (try#each (/#= expected)) + (try#each (/.= expected)) (try.else false))) expected)) )) @@ -475,7 +475,7 @@ .let [can_find_known_key! (|> object (/.field key) - (try#each (/#= {/.#Number expected})) + (try#each (/.= {/.#Number expected})) (try.else false)) cannot_find_unknown_key! @@ -518,15 +518,15 @@ (string) (string)] (_.coverage [/.json] - (and (/#= {/.#Null} (/.json ())) + (and (/.= {/.#Null} (/.json ())) (,, (template.with [ ] - [(/#= { } (/.json ))] + [(/.= { } (/.json ))] [/.#Boolean ] [/.#Number ] [/.#String ] )) - (/#= {/.#Array } (/.json [() ])) + (/.= {/.#Array } (/.json [() ])) (let [object (/.json { () @@ -542,12 +542,12 @@ value4 (/.field object) value5 (/.field object) value6 (/.field value5)] - (in (and (/#= {/.#Null} value0) - (/#= {/.#Boolean } value1) - (/#= {/.#Number } value2) - (/#= {/.#String } value3) - (/#= {/.#Array } value4) - (/#= {/.#Number } value6)))))) + (in (and (/.= {/.#Null} value0) + (/.= {/.#Boolean } value1) + (/.= {/.#Number } value2) + (/.= {/.#String } value3) + (/.= {/.#Array } value4) + (/.= {/.#Number } value6)))))) ))) ..\\polytypic diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index f61be6dc22..0a62582a11 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -13,10 +13,10 @@ ["[0]" exception]] [data ["[0]" product] - ["[0]" binary (.use "[1]#[0]" equivalence monoid) + ["[0]" binary (.use "[1]#[0]" monoid) ["" \\projection] ["[0]" \\injection]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [encoding ["[0]" utf8]] ["[0]" unicode @@ -54,13 +54,13 @@ (_.coverage [/.path /.from_path] (when (/.path expected) {try.#Success actual} - (text#= expected + (text.= expected (/.from_path actual)) {try.#Failure error} false)) (_.coverage [/.no_path] - (text#= "" (/.from_path /.no_path))) + (text.= "" (/.from_path /.no_path))) (_.coverage [/.path_size /.path_is_too_long] (when (/.path invalid) {try.#Success _} @@ -89,7 +89,7 @@ (_.coverage [/.name /.from_name] (when (/.name expected) {try.#Success actual} - (text#= expected + (text.= expected (/.from_name actual)) {try.#Failure error} @@ -182,7 +182,7 @@ (.value /.projection))] (in (when (sequence.list tar) (list { actual_path}) - (text#= (/.from_path expected_path) + (text.= (/.from_path expected_path) (/.from_path actual_path)) _ @@ -213,11 +213,11 @@ (list { [actual_path actual_moment actual_mode actual_ownership actual_content]}) (let [seconds (is (-> Instant Int) (|>> instant.relative (duration.ticks duration.second)))] - (and (text#= (/.from_path expected_path) + (and (text.= (/.from_path expected_path) (/.from_path actual_path)) (i.= (seconds expected_moment) (seconds actual_moment)) - (binary#= (/.data expected_content) + (binary.= (/.data expected_content) (/.data actual_content)))) _ @@ -359,9 +359,9 @@ (.value /.projection))] (in (when (sequence.list tar) (list {/.#Normal [_ _ _ actual_ownership _]}) - (and (text#= (/.from_name expected) + (and (text.= (/.from_name expected) (/.from_name (its [/.#user /.#name] actual_ownership))) - (text#= (/.from_name /.anonymous) + (text.= (/.from_name /.anonymous) (/.from_name (its [/.#group /.#name] actual_ownership)))) _ @@ -383,11 +383,11 @@ (.value /.projection))] (in (when (sequence.list tar) (list {/.#Normal [_ _ _ actual_ownership _]}) - (and (text#= (/.from_name /.anonymous) + (and (text.= (/.from_name /.anonymous) (/.from_name (its [/.#user /.#name] actual_ownership))) (n.= (/.from_small /.no_id) (/.from_small (its [/.#user /.#id] actual_ownership))) - (text#= (/.from_name /.anonymous) + (text.= (/.from_name /.anonymous) (/.from_name (its [/.#group /.#name] actual_ownership))) (n.= (/.from_small /.no_id) (/.from_small (its [/.#group /.#id] actual_ownership)))) diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index ce65b8a8b7..be73950194 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -16,7 +16,7 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" dictionary] @@ -26,8 +26,8 @@ [number ["n" nat]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" symbol] + ["[0]" type] [macro ["^" pattern] ["[0]" template] @@ -36,7 +36,7 @@ ["_" property (.only Test)]]]] ["[0]" \\projection] [\\library - ["[0]" / (.use "[1]#[0]" equivalence)]]) + ["[0]" /]]) (the !expect (template.macro (_ ) @@ -78,7 +78,7 @@ (_.coverage [\\projection.value \\projection.text] (|> (\\projection.value \\projection.text (list {/.#Text expected})) (!expect (^.multi {try.#Success actual} - (text#= expected actual)))))) + (text.= expected actual)))))) (!failure \\projection.unconsumed_inputs [[(<>#in expected) {/.#Text expected}]]) @@ -86,7 +86,7 @@ [expected (of ! each (|>> {/.#Text}) (random.alphabetic 1))] (_.coverage [\\projection.any] (|> (\\projection.value \\projection.any (list expected)) - (try#each (/#= expected)) + (try#each (/.= expected)) (try.else false)))) (do [! random.monad] [expected ..random_tag] @@ -94,7 +94,7 @@ (|> (\\projection.value (do <>.monad [actual \\projection.tag _ \\projection.any] - (in (symbol#= expected actual))) + (in (symbol.= expected actual))) (list {/.#Node expected (dictionary.empty symbol.hash) (list)})) (!expect {try.#Success .true})))) (do [! random.monad] @@ -164,7 +164,7 @@ {/.#Node tag (dictionary.empty symbol.hash) children}))] parent ..random_tag right ..random_tag - wrong (random.only (|>> (symbol#= right) not) + wrong (random.only (|>> (symbol.= right) not) ..random_tag) .let [projection (<| (\\projection.node parent) (do <>.monad @@ -245,7 +245,7 @@ (`` (all _.and (,, (template.with [ ] [(_.coverage [ ] - (and (text#= name ( ["" name])) + (and (text.= name ( ["" name])) (let [symbol ( symbol)] (and (text.starts_with? namespace symbol) (text.ends_with? name symbol)))))] diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index 68e14237f8..3bcf0e6140 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -42,14 +42,10 @@ ["[0]" nat] ["[0]" int] ["[0]" rev] - ["[0]" dec] - ["[0]" frac]] + ["[0]" dec]] [arithmetic ["[0]" modular]]] [meta - ["[0]" location] - ["[0]" symbol] - ["[0]" type] ["[0]" code (.only) ["<[1]>" \\projection]] [macro @@ -73,7 +69,7 @@ ["[1][0]" unicode ["[1]" set]]] [\\library - ["[0]" / (.use "[1]#[0]" equivalence)]] + ["[0]" /]] ["[0]" \\projection] ["[0]" \\injection]) @@ -83,7 +79,7 @@ (Equivalence (/.Injection of)))) (implementation (the (= expected actual) - (/#= (expected example) (actual example))))) + (/.= (expected example) (actual example))))) (the random_contravariant (Random (for_some (_ of) @@ -104,7 +100,7 @@ [(do random.monad [sample ] (_.coverage [] - (/#= (of injection sample) + (/.= (of injection sample) ( sample))))] [\\injection.bit bit.format random.bit] @@ -112,8 +108,6 @@ [\\injection.int int.decimal random.int] [\\injection.rev rev.decimal random.rev] [\\injection.dec dec.decimal random.dec] - [\\injection.frac frac.format random.frac] - [\\injection.symbol symbol.absolute ($//symbol.random 5 5)] [\\injection.int_2 int.binary random.int] [\\injection.int_8 int.octal random.int] @@ -139,7 +133,7 @@ ++)] expected_size (of ! each (nat.% limit) random.nat)] (_.coverage [ \\injection.padded] - (/#= (of (nat.padded expected_size ) injection sample) + (/.= (of (nat.padded expected_size ) injection sample) (\\injection.padded expected_size sample))))] [\\injection.nat_2 nat.binary random.nat] @@ -183,29 +177,22 @@ mid (random.unicode 5) right (random.unicode 5)] (_.coverage [\\injection.message] - (/#= (\\injection.message left mid right) + (/.= (\\injection.message left mid right) (.text_composite# left mid right)))) ..format (,, (template.with [ ] [(do random.monad [sample ] (_.coverage [] - (/#= ( sample) + (/.= ( sample) ( sample))))] [\\injection.text /.injection (random.unicode 5)] - [\\injection.code code.absolute $//code.random] - [\\injection.type type.absolute_injection ($//type.random 0)] - [\\injection.location location.injection - (all random.and - (random.unicode 5) - random.nat - random.nat)] )) (do random.monad [members (random.list 5 random.nat)] (_.coverage [\\injection.list] - (/#= (\\injection.list \\injection.nat members) + (/.= (\\injection.list \\injection.nat members) (|> members (list#each \\injection.nat) (/.interposed " ") @@ -228,7 +215,7 @@ sample (of ! each (modular.modular modulus) random.int)] (_.coverage [\\injection.mod] - (/#= (of (modular.format modulus) injection sample) + (/.= (of (modular.format modulus) injection sample) (\\injection.mod sample)))) )))) @@ -265,7 +252,7 @@ (-> Text (\\projection.Projection Text) Bit) (|> expected (\\projection.value projection) - (of try.functor each (/#= expected)) + (of try.functor each (/.= expected)) (try.else false))) (the (should_pass! expected projection) @@ -346,12 +333,12 @@ (in /.carriage_return) (in /.form_feed)) invalid (|> (random.unicode 1) (random.only (function (_ char) - (not (or (/#= /.tab char) - (/#= /.vertical_tab char) - (/#= /.space char) - (/#= /.new_line char) - (/#= /.carriage_return char) - (/#= /.form_feed char))))))] + (not (or (/.= /.tab char) + (/.= /.vertical_tab char) + (/.= /.space char) + (/.= /.new_line char) + (/.= /.carriage_return char) + (/.= /.form_feed char))))))] (_.coverage [\\projection.space] (and (..should_pass expected \\projection.space) (..should_fail invalid \\projection.space)))) @@ -513,7 +500,7 @@ [.let [size 10] expected (random.unicode size) dummy (|> (random.unicode size) - (random.only (|>> (/#= expected) not)))] + (random.only (|>> (/.= expected) not)))] (_.coverage [\\projection.this \\projection.cannot_match] (and (|> (\\projection.value (\\projection.this expected) expected) @@ -571,13 +558,13 @@ _ \\projection.any post \\projection.remaining _ \\projection.any] - (in (and (/#= input pre) - (/#= right post))))) + (in (and (/.= input pre) + (/.= right post))))) (!expect {try.#Success .true})))) (do [! random.monad] [left (random.unicode 1) right (random.unicode 1) - expected (random.only (|>> (/#= right) not) + expected (random.only (|>> (/.= right) not) (random.unicode 1))] (_.coverage [\\projection.enclosed] (|> (\\injection.message left expected right) @@ -598,7 +585,7 @@ (|> (list (code.text expected)) (.value (\\projection.then \\projection.octal .text)) (!expect (^.multi {try.#Success actual} - (/#= expected actual)))))) + (/.= expected actual)))))) (do [! random.monad] [invalid (random.upper_cased 1) expected (random.only (|>> (unicode/block.within? unicode/block.upper_case) @@ -906,9 +893,9 @@ (|> (/.split_at sizeL sample) (pipe.when {.#Right [_l _r]} - (and (/#= sampleL _l) - (/#= sampleR _r) - (/#= sample (/.together (list _l _r)))) + (and (/.= sampleL _l) + (/.= sampleR _r) + (/.= sample (/.together (list _l _r)))) _ false))) @@ -919,10 +906,10 @@ (/.clip_since 0 sample)] (pipe.when [{.#Right _l} {.#Right _r} {.#Right _r'} {.#Right _f}] - (and (/#= sampleL _l) - (/#= sampleR _r) - (/#= _r _r') - (/#= sample _f)) + (and (/.= sampleL _l) + (/.= sampleR _r) + (/.= _r _r') + (/.= sample _f)) _ false))) @@ -944,7 +931,7 @@ sample2 (/.together (list.interposed sep2 parts)) (open "/#[0]") /.equivalence]] (_.coverage [/.replaced] - (/#= sample2 + (/.= sample2 (/.replaced sep1 sep2 sample1)))) /char.test diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux index 116b174f9f..a3d3b33234 100644 --- a/stdlib/source/test/lux/data/text/buffer.lux +++ b/stdlib/source/test/lux/data/text/buffer.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] @@ -39,7 +39,7 @@ (n.= (text.size left) (/.size (/.then left /.empty)))) (_.coverage [/.text] - (text#= (%.message left mid right) + (text.= (%.message left mid right) (|> /.empty (/.then left) (/.then mid) diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux index 88880dc1d2..6ee49d5dd6 100644 --- a/stdlib/source/test/lux/data/text/encoding.lux +++ b/stdlib/source/test/lux/data/text/encoding.lux @@ -10,7 +10,7 @@ ["[0]" maybe] ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" mix)] ["[0]" set]]] diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux index a70d1da36f..e7948dc8a0 100644 --- a/stdlib/source/test/lux/data/text/escape.lux +++ b/stdlib/source/test/lux/data/text/escape.lux @@ -11,8 +11,8 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) [char (.only Char)] ["%" \\injection]] [collection @@ -104,7 +104,7 @@ [/.\n] [/.\v] [/.\f] [/.\r] [/.\''] [/.\\]))) (/.escapable? ascii) - (bit#= (/.escapable? ascii) + (bit.= (/.escapable? ascii) (or (n.< (debug.private /.ascii_bottom) ascii) (n.> (debug.private /.ascii_top) ascii))))))) (do random.monad @@ -117,12 +117,12 @@ (let [escaped (/.escaped expected)] (when (/.un_escaped escaped) {try.#Success un_escaped} - (and (not (text#= escaped expected)) - (text#= un_escaped expected)) + (and (not (text.= escaped expected)) + (text.= un_escaped expected)) {try.#Failure error} false)) - (text#= expected (/.escaped expected)))))) + (text.= expected (/.escaped expected)))))) (do [! random.monad] [dummy (|> (random.char unicode.character) (of ! each text.of_char))] @@ -164,5 +164,5 @@ (!invalid code))))) (_.coverage [/.literal] (expansion.let [ (..static_sample)] - (text#= (`` (/.literal (,, (..static_escaped ))))))) + (text.= (`` (/.literal (,, (..static_escaped ))))))) ))) diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux index fce85d2d71..e075fc1050 100644 --- a/stdlib/source/test/lux/data/text/regex.lux +++ b/stdlib/source/test/lux/data/text/regex.lux @@ -10,7 +10,7 @@ ["[0]" pipe] ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] ["<[1]>" \\projection (.only Projection)]]] [math @@ -33,7 +33,7 @@ (.value regex) (pipe.when {try.#Success parsed} - (text#= parsed input) + (text.= parsed input) _ false))) @@ -44,7 +44,7 @@ (.value regex) (pipe.when {try.#Success parsed} - (text#= test parsed) + (text.= test parsed) _ false))) @@ -318,9 +318,9 @@ (when (%.message sample1 "-" sample2 "-" sample3) (/.pattern "(.{3})-(.{3})-(.{4})" [_ match1 match2 match3]) - (and (text#= sample1 match1) - (text#= sample2 match2) - (text#= sample3 match3)) + (and (text.= sample1 match1) + (text.= sample2 match2) + (text.= sample3 match3)) _ false))) diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux index 87fe7d04c5..b955e94d43 100644 --- a/stdlib/source/test/lux/data/text/unicode/set.lux +++ b/stdlib/source/test/lux/data/text/unicode/set.lux @@ -10,9 +10,7 @@ ["[1]T" \\test]]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - [collection - ["[0]" set (.use "[1]#[0]" equivalence)]]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -69,7 +67,7 @@ (block.end right)) (/.end (/.set [left (list right)])))) (_.coverage [/.member?] - (bit#= (block.within? block inside) + (bit.= (block.within? block inside) (/.member? (/.set [block (list)]) inside))) (_.coverage [/.composite] (let [composed (/.composite (/.set [left (list)]) diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 2a6bddcc54..6df1009320 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -14,15 +14,17 @@ [concurrency ["[0]" atom]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] [math ["[0]" random (.only Random)] [number - [frac (.only Frac)]]] + ["[0]" frac (.only Frac)]]] [meta + ["[0]" location] + ["[0]" symbol] ["[0]" type] ["[0]" code (.only) ["<[1]>" \\projection]] @@ -55,7 +57,7 @@ sample_rev random.rev] (in (`` (and (,, (template.with [ ] [(|> (/.representation ) - (try#each (text#= ( ))) + (try#each (text.= ( ))) (try.else false))] [Bit %.bit sample_bit] @@ -75,7 +77,7 @@ (in (`` (and (when (/.representation (type [Bit Int Dec]) [sample_bit sample_int sample_dec]) {try.#Success actual} - (text#= (%.message "[" (%.bit sample_bit) + (text.= (%.message "[" (%.bit sample_bit) " " (%.int sample_int) " " (%.dec sample_dec) "]") @@ -88,7 +90,7 @@ ... [(|> (/.representation (type (Or Bit Int Dec)) ... (is (Or Bit Int Dec) ... ( ))) - ... (try#each (text#= (%.message "(" (%.nat ) + ... (try#each (text.= (%.message "(" (%.nat ) ... " " (%.bit ) ... " " ( ) ")"))) ... (try.else false))] @@ -109,14 +111,14 @@ sample_code $//code.random] (in (`` (and (,, (template.with [ ] [(|> (/.representation ) - (try#each (text#= ( ))) + (try#each (text.= ( ))) (try.else false))] - [Frac %.frac sample_frac] - [Symbol %.symbol sample_symbol] - [Location %.location sample_location] - [Code %.code sample_code] - [Type %.type sample_type])) + [Frac frac.as_text sample_frac] + [Symbol symbol.as_text sample_symbol] + [Location location.as_text sample_location] + [Code code.as_text sample_code] + [Type type.as_text sample_type])) ))))) (the representation @@ -137,14 +139,14 @@ can_represent_complex_types! (|> (/.representation .Any sample_dec) - (try#each (text#= "[]")) + (try#each (text.= "[]")) (try.else false)) (|> (/.representation (type (List Nat)) (is (List Nat) (list sample_nat))) - (try#each (text#= (%.list %.nat (list sample_nat)))) + (try#each (text.= (%.list %.nat (list sample_nat)))) (try.else false)) (,, (template.with [] [(|> (/.representation (type (Maybe Nat)) (is (Maybe Nat) )) - (try#each (text#= (%.maybe %.nat ))) + (try#each (text.= (%.maybe %.nat ))) (try.else false))] [{.#Some sample_nat}] @@ -169,14 +171,14 @@ sample_text (random.upper_cased 10)] (_.coverage [/.inspection] (`` (and (,, (template.with [ ] - [(text#= ( ) (/.inspection ))] + [(text.= ( ) (/.inspection ))] [%.bit sample_bit] [%.int sample_int] [%.dec sample_dec] [%.text sample_text] )) - (text#= (|> (list sample_bit sample_int sample_dec sample_text) + (text.= (|> (list sample_bit sample_int sample_dec sample_text) (is (List Any)) (list#each /.inspection) (text.interposed " ") @@ -274,7 +276,7 @@ (_.coverage [/.hole /.type_hole] (let [error (is My_Text (..macro_error (/.hole)))] (and (exception.is? /.type_hole error) - (text.contains? (%.type My_Text) error)))) + (text.contains? (type.as_text My_Text) error)))) (do random.monad [foo (random.upper_cased 10) bar random.nat @@ -298,6 +300,6 @@ (_.coverage [/.log!] (let [[actual_message _] (with_out (/.log! expected_message))] - (text#= (%.message expected_message text.\n) + (text.= (%.message expected_message text.\n) actual_message))) )))) diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux index 565aa34df8..314ed9eb32 100644 --- a/stdlib/source/test/lux/documentation.lux +++ b/stdlib/source/test/lux/documentation.lux @@ -8,7 +8,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [format ["md" markdown]]] diff --git a/stdlib/source/test/lux/documentation/remember.lux b/stdlib/source/test/lux/documentation/remember.lux index da5577008f..3a31c4e538 100644 --- a/stdlib/source/test/lux/documentation/remember.lux +++ b/stdlib/source/test/lux/documentation/remember.lux @@ -67,7 +67,7 @@ true {.#Some focus} - (text.contains? (%.code focus) failure)))) + (text.contains? (code.as_text focus) failure)))) (the test_macro (syntax.macro (_ [macro .symbol diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index 91df927763..04de8f3b1e 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -9,8 +9,8 @@ [control ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)] [number @@ -119,24 +119,24 @@ (and (or /.on_nashorn? /.on_node_js? /.on_browser?) - (bit#= /.on_nashorn? + (bit.= /.on_nashorn? (not (or /.on_node_js? /.on_browser?))) - (bit#= /.on_node_js? + (bit.= /.on_node_js? (not (or /.on_nashorn? /.on_browser?))) - (bit#= /.on_browser? + (bit.= /.on_browser? (not (or /.on_nashorn? /.on_node_js?))))) (_.coverage [/.type_of] - (and (text#= "boolean" (/.type_of boolean)) - (text#= "number" (/.type_of number)) - (text#= "string" (/.type_of string)) - (text#= "function" (/.type_of function)) - (text#= "object" (/.type_of object)))) + (and (text.= "boolean" (/.type_of boolean)) + (text.= "number" (/.type_of number)) + (text.= "string" (/.type_of string)) + (text.= "function" (/.type_of function)) + (text.= "object" (/.type_of object)))) (_.coverage [/.import] (let [encoding "utf8"] - (text#= string + (text.= string (cond /.on_nashorn? (let [binary (|> string (as java/lang/String) diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index e49782f861..99745df02e 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -13,8 +13,8 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" array (.only Array)]]] [math @@ -22,11 +22,11 @@ [number (.only hex) ["[0]" i64] ["n" nat] - ["i" int (.use "[1]#[0]" equivalence)] - ["d" dec (.use "[1]#[0]" equivalence)]]] + ["i" int] + ["d" dec]]] ["[0]" meta (.only) ["[0]" static] - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" type] ["[0]" code (.only) ["<[1]>" \\projection]] [macro @@ -36,7 +36,7 @@ [compiler [target ["[0]" jvm - ["[1]" type (.use "[1]#[0]" equivalence)]]]]] + ["[1]" type]]]]] [test ["_" property (.only Test)]]]] [\\library @@ -66,14 +66,14 @@ (<=> (as ( left)) (as ( right))))] - [boolean#= /.Boolean <| Bit bit#=] - [byte#= /.Byte /.byte_to_long Int i#=] - [short#= /.Short /.short_to_long Int i#=] - [integer#= /.Integer /.int_to_long Int i#=] - [long#= /.Long <| Int i#=] - [float#= /.Float /.float_to_double Dec d#=] - [double#= /.Double <| Dec d#=] - [character#= /.Character /.char_to_long Int i#=] + [boolean#= /.Boolean <| Bit bit.=] + [byte#= /.Byte /.byte_to_long Int i.=] + [short#= /.Short /.short_to_long Int i.=] + [integer#= /.Integer /.int_to_long Int i.=] + [long#= /.Long <| Int i.=] + [float#= /.Float /.float_to_double Dec d.=] + [double#= /.Double <| Dec d.=] + [character#= /.Character /.char_to_long Int i.=] ) (the macro_error @@ -179,7 +179,7 @@ (_.coverage [/.synchronized] (/.synchronized sample true)) (_.coverage [/.class_for] - (text#= "java.lang.Class" (/.of_string (java/lang/Class::getName [] (/.class_for java/lang/Class))))) + (text.= "java.lang.Class" (/.of_string (java/lang/Class::getName [] (/.class_for java/lang/Class))))) (_.coverage [/.null /.null?] (and (/.null? (/.null)) (not (/.null? sample)))) @@ -225,28 +225,28 @@ ( )))] [/.Boolean /.boolean boolean boolean#= - bit/0 /.as_boolean /.of_boolean bit#=] + bit/0 /.as_boolean /.of_boolean bit.=] [/.Byte /.byte byte byte#= - (/.of_byte byte) /.as_byte /.of_byte i#=] + (/.of_byte byte) /.as_byte /.of_byte i.=] [/.Short /.short short short#= - (/.of_short short) /.as_short /.of_short i#=] + (/.of_short short) /.as_short /.of_short i.=] [/.Integer /.int integer integer#= - (/.of_int integer) /.as_int /.of_int i#=] + (/.of_int integer) /.as_int /.of_int i.=] [/.Long /.long long long#= - (/.of_long long) /.as_long /.of_long i#=] + (/.of_long long) /.as_long /.of_long i.=] [/.Float /.float float float#= - (/.of_float float) /.as_float /.of_float d#=] + (/.of_float float) /.as_float /.of_float d.=] [/.Double /.double double double#= - (/.of_double double) /.as_double /.of_double d#=] + (/.of_double double) /.as_double /.of_double d.=] [/.Character /.char character character#= - (/.of_char character) /.as_char /.of_char i#=] + (/.of_char character) /.as_char /.of_char i.=] )) (_.coverage [/.as_string /.of_string] (let [it (/.of_string string)] (|> it /.as_string /.of_string - (text#= it)))) + (text.= it)))) (_.coverage [/.cannot_cast_to_non_object] (text.contains? (its exception.#label /.cannot_cast_to_non_object) (macro_error (/.is boolean (is /.Boolean boolean))))) @@ -255,22 +255,22 @@ (/.is java/lang/Object) (same? (as java/lang/Object string)))) (_.coverage [/.type] - (and (and (type#= /.Boolean (/.type java/lang/Boolean)) - (type#= /.Boolean (/.type boolean))) - (and (type#= /.Byte (/.type java/lang/Byte)) - (type#= /.Byte (/.type byte))) - (and (type#= /.Short (/.type java/lang/Short)) - (type#= /.Short (/.type short))) - (and (type#= /.Integer (/.type java/lang/Integer)) - (type#= /.Integer (/.type int))) - (and (type#= /.Long (/.type java/lang/Long)) - (type#= /.Long (/.type long))) - (and (type#= /.Float (/.type java/lang/Float)) - (type#= /.Float (/.type float))) - (and (type#= /.Double (/.type java/lang/Double)) - (type#= /.Double (/.type double))) - (and (type#= /.Character (/.type java/lang/Character)) - (type#= /.Character (/.type char))))) + (and (and (type.= /.Boolean (/.type java/lang/Boolean)) + (type.= /.Boolean (/.type boolean))) + (and (type.= /.Byte (/.type java/lang/Byte)) + (type.= /.Byte (/.type byte))) + (and (type.= /.Short (/.type java/lang/Short)) + (type.= /.Short (/.type short))) + (and (type.= /.Integer (/.type java/lang/Integer)) + (type.= /.Integer (/.type int))) + (and (type.= /.Long (/.type java/lang/Long)) + (type.= /.Long (/.type long))) + (and (type.= /.Float (/.type java/lang/Float)) + (type.= /.Float (/.type float))) + (and (type.= /.Double (/.type java/lang/Double)) + (type.= /.Double (/.type double))) + (and (type.= /.Character (/.type java/lang/Character)) + (type.= /.Character (/.type char))))) )))) (/.interface test/TestInterface0 @@ -715,11 +715,11 @@ (let [type_variable ((debug.private /.type_variable) (list (jvm.var var/0) (jvm.var var/1)))] (and (|> (list (code.local var/0)) (.value type_variable) - (try#each (|>> (jvm#= (jvm.var var/0)))) + (try#each (|>> (jvm.= (jvm.var var/0)))) (try.else false)) (|> (list (code.local var/1)) (.value type_variable) - (try#each (|>> (jvm#= (jvm.var var/1)))) + (try#each (|>> (jvm.= (jvm.var var/1)))) (try.else false)) (|> (list (code.local var/2)) (.value type_variable) diff --git a/stdlib/source/test/lux/ffi.php.lux b/stdlib/source/test/lux/ffi.php.lux index adfe862dcc..6f320dd506 100644 --- a/stdlib/source/test/lux/ffi.php.lux +++ b/stdlib/source/test/lux/ffi.php.lux @@ -6,10 +6,6 @@ [lux (.except) [abstract [monad (.only do)]] - [control - ["[0]" try]] - [data - ["[0]" text (.use "[1]#[0]" equivalence)]] [math ["[0]" random (.only Random)] [number diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index ba3199f7f3..170c3ac81c 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -8,8 +8,6 @@ [monad (.only do)]] [control ["[0]" io]] - [data - ["[0]" text (.use "[1]#[0]" equivalence)]] [math ["[0]" random]] [meta diff --git a/stdlib/source/test/lux/ffi.scm.lux b/stdlib/source/test/lux/ffi.scm.lux index adfe862dcc..96eb5ccb57 100644 --- a/stdlib/source/test/lux/ffi.scm.lux +++ b/stdlib/source/test/lux/ffi.scm.lux @@ -6,14 +6,8 @@ [lux (.except) [abstract [monad (.only do)]] - [control - ["[0]" try]] - [data - ["[0]" text (.use "[1]#[0]" equivalence)]] [math - ["[0]" random (.only Random)] - [number - ["[0]" nat]]] + ["[0]" random (.only Random)]] [test ["_" property (.only Test)]]]] [\\library diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index e4a152a0bf..7d40d753e4 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -8,15 +8,15 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number (.only hex) ["[0]" i64] - ["[0]" int (.use "[1]#[0]" equivalence)] - ["[0]" dec (.use "[1]#[0]" equivalence)]]] + ["[0]" int] + ["[0]" dec]]] ["[0]" meta (.only) ["[0]" static] ["[0]" code] @@ -147,14 +147,14 @@ ))] (all _.and (_.coverage [/.export] - (and (bit#= (//.of_boolean ..expected_boolean) (//.of_boolean (Primitives::actual_boolean))) - (int#= (//.of_byte ..expected_byte) (//.of_byte (Primitives::actual_byte))) - (int#= (//.of_short ..expected_short) (//.of_short (Primitives::actual_short))) - (int#= (//.of_int ..expected_int) (//.of_int (Primitives::actual_int))) - (int#= (//.of_long ..expected_long) (//.of_long (Primitives::actual_long))) - (int#= (//.of_char ..expected_char) (//.of_char (Primitives::actual_char))) - (dec#= (//.of_float ..expected_float) (//.of_float (Primitives::actual_float))) - (dec#= (//.of_double ..expected_double) (//.of_double (Primitives::actual_double))) + (and (bit.= (//.of_boolean ..expected_boolean) (//.of_boolean (Primitives::actual_boolean))) + (int.= (//.of_byte ..expected_byte) (//.of_byte (Primitives::actual_byte))) + (int.= (//.of_short ..expected_short) (//.of_short (Primitives::actual_short))) + (int.= (//.of_int ..expected_int) (//.of_int (Primitives::actual_int))) + (int.= (//.of_long ..expected_long) (//.of_long (Primitives::actual_long))) + (int.= (//.of_char ..expected_char) (//.of_char (Primitives::actual_char))) + (dec.= (//.of_float ..expected_float) (//.of_float (Primitives::actual_float))) + (dec.= (//.of_double ..expected_double) (//.of_double (Primitives::actual_double))) (,, (template.with [<=> <+> ] [(expansion.let [ (template.symbol ["left_" ]) @@ -164,28 +164,28 @@ (<=> (<+> ( ) ( )) ( ( [ ]))))] - [bit#= and boolean] - [int#= int.+ byte] - [int#= int.+ short] - [int#= int.+ int] - [int#= int.+ long] - [int#= int.+ char] - [dec#= dec.+ float] - [dec#= dec.+ double] + [bit.= and boolean] + [int.= int.+ byte] + [int.= int.+ short] + [int.= int.+ int] + [int.= int.+ long] + [int.= int.+ char] + [dec.= dec.+ float] + [dec.= dec.+ double] )) - (text#= (//.of_string ..expected_string) (//.of_string (Objects::actual_string))) + (text.= (//.of_string ..expected_string) (//.of_string (Objects::actual_string))) - (text#= (%.message (//.of_string left_string) (//.of_string right_string)) + (text.= (%.message (//.of_string left_string) (//.of_string right_string)) (//.of_string (Objects::string_method [left_string right_string]))) - (text#= (//.of_string left_string) + (text.= (//.of_string left_string) (//.of_string (Objects::left [left_string right_string]))) - (text#= (//.of_string right_string) + (text.= (//.of_string right_string) (//.of_string (Objects::right [left_string right_string]))) - (int#= (//.of_long left_long) + (int.= (//.of_long left_long) (//.of_long (Objects::left [left_long right_long]))) - (int#= (//.of_long right_long) + (int.= (//.of_long right_long) (//.of_long (Objects::right [left_long right_long]))) )) )))))) diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux index 0d84b9a88c..aa130a477f 100644 --- a/stdlib/source/test/lux/math.lux +++ b/stdlib/source/test/lux/math.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -115,7 +115,7 @@ [(_.coverage [] (expansion.let [ (template.spliced ')] (`` (and (,, (template.with [ ] - [(bit#= ( ) + [(bit.= ( ) ( ))] ))))))] diff --git a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux index 44acd5b3a2..4342b7f543 100644 --- a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux +++ b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux @@ -14,7 +14,7 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]]] [math @@ -86,10 +86,10 @@ (/.of_rev @ (/.sub_units @ expected))))) (_.coverage [/.>] - (bit#= (/.> @ parameter subject) + (bit.= (/.> @ parameter subject) (/.< @ subject parameter))) (_.coverage [/.<= /.>=] - (bit#= (/.<= @ parameter subject) + (bit.= (/.<= @ parameter subject) (/.>= @ subject parameter))) (_.coverage [/.-] diff --git a/stdlib/source/test/lux/math/arithmetic/infix.lux b/stdlib/source/test/lux/math/arithmetic/infix.lux index acffbb372d..627e66d1c6 100644 --- a/stdlib/source/test/lux/math/arithmetic/infix.lux +++ b/stdlib/source/test/lux/math/arithmetic/infix.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random] [number @@ -51,7 +51,7 @@ (/.infix [(n.* parameter subject) n.gcd extra])) non_numeric! - (bit#= (and (n.< parameter subject) (n.< extra parameter)) + (bit.= (and (n.< parameter subject) (n.< extra parameter)) (/.infix [[subject n.< parameter] and [parameter n.< extra]]))] (and constant_values! unary_functions! diff --git a/stdlib/source/test/lux/math/arithmetic/modular.lux b/stdlib/source/test/lux/math/arithmetic/modular.lux index 192b5d8ad8..bb0e4e3239 100644 --- a/stdlib/source/test/lux/math/arithmetic/modular.lux +++ b/stdlib/source/test/lux/math/arithmetic/modular.lux @@ -21,13 +21,13 @@ ["[0]" predicate]]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number ["i" int]]] [meta - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" type] [macro ["[0]" template]]] [test @@ -85,18 +85,18 @@ {try.#Success _} false)) (_.coverage [/.modulus] - (and (type#= (type_of (/.modulus subject)) + (and (type.= (type_of (/.modulus subject)) (type_of (/.modulus subject))) - (not (type#= (type_of (/.modulus subject)) + (not (type.= (type_of (/.modulus subject)) (type_of (/.modulus param)))))) (_.coverage [/.modular /.value] (/.= subject (/.modular (/.modulus subject) (/.value subject)))) (_.coverage [/.>] - (bit#= (/.> another subject) + (bit.= (/.> another subject) (/.< subject another))) (_.coverage [/.<= /.>=] - (bit#= (/.<= another subject) + (bit.= (/.<= another subject) (/.>= subject another))) (_.coverage [/.-] (let [zero (/.modular (/.modulus subject) +0)] diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux index 18db4a16c3..eb417bee57 100644 --- a/stdlib/source/test/lux/math/logic/fuzzy.lux +++ b/stdlib/source/test/lux/math/logic/fuzzy.lux @@ -11,7 +11,7 @@ ["[0]" contravariant ["[1]T" \\test]]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list] ["[0]" set]]] @@ -207,12 +207,12 @@ (r.= //.false (/.membership reference top))) inside_range! - (bit#= (r.> //.false (/.membership reference sample)) + (bit.= (r.> //.false (/.membership reference sample)) (and (r.> bottom sample) (r.< top sample))) outside_range! - (bit#= (r.= //.false (/.membership reference sample)) + (bit.= (r.= //.false (/.membership reference sample)) (or (r.<= bottom sample) (r.>= top sample)))] (and irrelevant_order! @@ -269,18 +269,18 @@ (r.= //.false (/.membership reference top))) inside_range! - (bit#= (r.> //.false (/.membership reference sample)) + (bit.= (r.> //.false (/.membership reference sample)) (and (r.> bottom sample) (r.< top sample))) outside_range! - (bit#= (r.= //.false (/.membership reference sample)) + (bit.= (r.= //.false (/.membership reference sample)) (or (r.<= bottom sample) (r.>= top sample))) inside_inner_range! - (bit#= (r.= //.true (/.membership reference sample)) + (bit.= (r.= //.true (/.membership reference sample)) (and (r.<= middle_top sample) (r.>= middle_bottom sample)))] (and irrelevant_order! @@ -300,11 +300,11 @@ sample random.nat] (all _.and (_.coverage [/.of_predicate] - (bit#= (r.= //.true (/.membership (/.of_predicate under?) sample)) + (bit.= (r.= //.true (/.membership (/.of_predicate under?) sample)) (under? sample))) (_.coverage [/.of_set] (and (r.= //.true (/.membership (/.of_set set) threshold)) - (bit#= (r.= //.true (/.membership (/.of_set set) sample)) + (bit.= (r.= //.true (/.membership (/.of_set set) sample)) (set.member? set sample)))) ))) @@ -329,10 +329,10 @@ sample random.rev] (all _.and (_.coverage [/.predicate] - (bit#= (not ((/.predicate threshold set) sample)) + (bit.= (not ((/.predicate threshold set) sample)) (r.< threshold (/.membership set sample)))) (_.coverage [/.cut] - (bit#= (r.= //.false (/.membership (/.cut threshold set) sample)) + (bit.= (r.= //.false (/.membership (/.cut threshold set) sample)) (r.< threshold (/.membership set sample)))) ))) diff --git a/stdlib/source/test/lux/math/number/dec.lux b/stdlib/source/test/lux/math/number/dec.lux index 37d064840a..326caf296c 100644 --- a/stdlib/source/test/lux/math/number/dec.lux +++ b/stdlib/source/test/lux/math/number/dec.lux @@ -18,7 +18,7 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] ["[0]" arithmetic @@ -51,7 +51,7 @@ (_.coverage [/.positive_infinity] (/.< /.positive_infinity sample)) (_.coverage [/.smallest] - (bit#= (/.positive? sample) + (bit.= (/.positive? sample) (/.>= /.smallest sample))) (_.coverage [/.negative_infinity] (/.> /.negative_infinity sample)) @@ -68,13 +68,13 @@ shift (of ! each /.abs ..random)] (all _.and (_.coverage [/.negative?] - (bit#= (/.negative? sample) + (bit.= (/.negative? sample) (/.< +0.0 sample))) (_.coverage [/.positive?] - (bit#= (/.positive? sample) + (bit.= (/.positive? sample) (/.> +0.0 sample))) (_.coverage [/.zero?] - (bit#= (/.zero? sample) + (bit.= (/.zero? sample) (/.= +0.0 sample))) (_.coverage [/.approximately?] (and (/.approximately? /.smallest sample sample) @@ -224,10 +224,10 @@ right random.safe_dec] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) (do random.monad @@ -242,7 +242,7 @@ (and (/.= +1.0 (/./ sample sample)) (/.= sample (/./ +1.0 sample)))) (_.coverage [/.abs] - (bit#= (/.> sample (/.abs sample)) + (bit.= (/.> sample (/.abs sample)) (/.negative? sample))) (_.coverage [/.signum] (/.= (/.abs sample) diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index b8378bde63..1e13774d0e 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -18,7 +18,7 @@ ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] ["[0]" arithmetic @@ -31,7 +31,7 @@ [\\library ["[0]" / (.only) [// - ["n" nat (.use "[1]#[0]" equivalence)]]]]) + ["n" nat]]]]) (the part (Random Nat) @@ -83,35 +83,33 @@ (arithmeticT.spec /.equivalence /.arithmetic ..random)) (do random.monad - [.let [(open "/#[0]") /.equivalence] - denom/0 ..part + [denom/0 ..part denom/1 ..part] (_.coverage [/.frac] - (/#= (/.frac 0 denom/0) + (/.= (/.frac 0 denom/0) (/.frac 0 denom/1)))) (do [! random.monad] - [.let [(open "/#[0]") /.equivalence] - before_normal (random.and ..part ..part)] + [before_normal (random.and ..part ..part)] (_.coverage [/.normal] (or (normal? before_normal) (let [it (/.normal before_normal)] (and (normal? it) - (/#= before_normal it)))))) + (/.= before_normal it)))))) (do random.monad [numerator ..part - denominator (random.only (|>> (n#= 1) not) + denominator (random.only (|>> (n.= 1) not) ..part)] (_.coverage [/.nat] (let [only_numerator! (|> (/.frac numerator) /.nat - (maybe#each (n#= numerator)) + (maybe#each (n.= numerator)) (maybe.else false)) denominator_1! (|> (/.frac numerator 1) /.nat - (maybe#each (n#= numerator)) + (maybe#each (n.= numerator)) (maybe.else false)) with_denominator! @@ -155,10 +153,10 @@ right ..random] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) )))) diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux index f6ee3d51ab..6b4f1b8519 100644 --- a/stdlib/source/test/lux/math/number/i64.lux +++ b/stdlib/source/test/lux/math/number/i64.lux @@ -15,13 +15,13 @@ [control ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)]] [test ["_" property (.only Test)]]]] [\\library - ["[0]" / (.use "[1]#[0]" equivalence) + ["[0]" / (.only) [// (.only hex) ["n" nat] ["i" int]]]]) @@ -34,20 +34,20 @@ (all _.and (_.coverage [/.one? /.one] (if (/.one? idx pattern) - (/#= pattern (/.one idx pattern)) - (not (/#= pattern (/.one idx pattern))))) + (/.= pattern (/.one idx pattern)) + (not (/.= pattern (/.one idx pattern))))) (_.coverage [/.zero? /.zero] (if (/.zero? idx pattern) - (/#= pattern (/.zero idx pattern)) - (not (/#= pattern (/.zero idx pattern))))) + (/.= pattern (/.zero idx pattern)) + (not (/.= pattern (/.zero idx pattern))))) (_.coverage [/.flipped] - (/#= (/.flipped idx pattern) + (/.= (/.flipped idx pattern) (if (/.one? idx pattern) (/.zero idx pattern) (/.one idx pattern)))) (_.coverage [/.bit] - (bit#= (/.zero? idx pattern) - (/#= /.false (/.and (/.bit idx) pattern)))) + (bit.= (/.zero? idx pattern) + (/.= /.false (/.and (/.bit idx) pattern)))) ))) (the shift @@ -59,16 +59,16 @@ [idx (of ! each (|>> (n.% (-- /.width)) ++) random.nat)] (_.coverage [/.left_shifted /.right_shifted] (let [nullity! - (and (/#= pattern (/.left_shifted 0 pattern)) - (/#= pattern (/.right_shifted 0 pattern))) + (and (/.= pattern (/.left_shifted 0 pattern)) + (/.= pattern (/.right_shifted 0 pattern))) idempotency! - (and (/#= pattern (/.left_shifted /.width pattern)) - (/#= pattern (/.right_shifted /.width pattern))) + (and (/.= pattern (/.left_shifted /.width pattern)) + (/.= pattern (/.right_shifted /.width pattern))) movement! (let [shift (n.- idx /.width)] - (/#= (/.and (/.mask idx) pattern) + (/.= (/.and (/.mask idx) pattern) (|> pattern (/.left_shifted shift) (/.right_shifted shift))))] @@ -86,20 +86,20 @@ signed random.int] (all _.and (_.coverage [/.sign] - (bit#= (/#= (.i64 0) (/.and /.sign signed)) + (bit.= (/.= (.i64 0) (/.and /.sign signed)) (i.positive? signed))) (_.coverage [/.mask] (let [mask (/.mask idx) - idempotency! (/#= (/.and mask pattern) + idempotency! (/.= (/.and mask pattern) (/.and mask (/.and mask pattern))) limit (++ (.nat mask)) limit! (if (n.< limit pattern) - (/#= pattern (/.and mask pattern)) + (/.= pattern (/.and mask pattern)) (n.< limit (/.and mask pattern))) - empty! (/#= /.false (/.mask 0)) - full! (/#= /.true (/.mask /.width))] + empty! (/.= /.false (/.mask 0)) + full! (/.= /.true (/.mask /.width))] (and idempotency! limit! @@ -111,8 +111,8 @@ offset (of ! each (n.% spare) random.nat)] (_.coverage [/.region] (when size - 0 (/#= /.false (/.region offset size)) - _ (/#= (|> pattern + 0 (/.= /.false (/.region offset size)) + _ (/.= (|> pattern ... NNNNYYYYNNNN (/.right_shifted offset) ... ____NNNNYYYY @@ -152,7 +152,7 @@ (equivalenceT.spec (of sub sub_equivalence) (random (of sub narrow))) (_.coverage [/.sub] (let [actual (|> expected .i64 (of sub narrow) (of sub wide))] - (/#= expected actual))) + (/.= expected actual))) )))))) (the signature @@ -187,28 +187,28 @@ (_.coverage [/.false] (n.= 0 (/.ones /.false))) (_.coverage [/.or] - (and (/#= /.true (/.or /.true pattern)) - (/#= pattern (/.or /.false pattern)))) + (and (/.= /.true (/.or /.true pattern)) + (/.= pattern (/.or /.false pattern)))) (_.coverage [/.true] (n.= /.width (/.ones /.true))) (_.coverage [/.and] - (and (/#= pattern (/.and /.true pattern)) - (/#= /.false (/.and /.false pattern)))) + (and (/.= pattern (/.and /.true pattern)) + (/.= /.false (/.and /.false pattern)))) (_.coverage [/.not] - (and (/#= /.false + (and (/.= /.false (/.and pattern (/.not pattern))) - (/#= /.true + (/.= /.true (/.or pattern (/.not pattern))))) (_.coverage [/.xor] - (and (/#= /.true + (and (/.= /.true (/.xor pattern (/.not pattern))) - (/#= /.false + (/.= /.false (/.xor pattern pattern)) - (/#= (/.xor left right) + (/.= (/.xor left right) (/.and (/.or left right) (/.not (/.and left right)))))) (_.coverage [/.ones] @@ -225,51 +225,51 @@ complementarity!))) (_.coverage [/.left_rotated /.right_rotated] (let [false! - (and (/#= /.false (/.left_rotated idx /.false)) - (/#= /.false (/.right_rotated idx /.false))) + (and (/.= /.false (/.left_rotated idx /.false)) + (/.= /.false (/.right_rotated idx /.false))) true! - (and (/#= /.true (/.left_rotated idx /.true)) - (/#= /.true (/.right_rotated idx /.true))) + (and (/.= /.true (/.left_rotated idx /.true)) + (/.= /.true (/.right_rotated idx /.true))) inverse! (and (|> pattern (/.left_rotated idx) (/.right_rotated idx) - (/#= pattern)) + (/.= pattern)) (|> pattern (/.right_rotated idx) (/.left_rotated idx) - (/#= pattern))) + (/.= pattern))) nullity! (and (|> pattern (/.left_rotated 0) - (/#= pattern)) + (/.= pattern)) (|> pattern (/.right_rotated 0) - (/#= pattern))) + (/.= pattern))) futility! (and (|> pattern (/.left_rotated /.width) - (/#= pattern)) + (/.= pattern)) (|> pattern (/.right_rotated /.width) - (/#= pattern)))] + (/.= pattern)))] (and false! true! inverse! nullity! futility!))) (_.coverage [/.reversed] - (and (|> pattern /.reversed /.reversed (/#= pattern)) - (or (|> pattern /.reversed (/#= pattern) not) + (and (|> pattern /.reversed /.reversed (/.= pattern)) + (or (|> pattern /.reversed (/.= pattern) not) (let [high (/.and (hex "FFFFFFFF00000000") pattern) low (/.and (hex "00000000FFFFFFFF") pattern)] - (/#= (/.reversed high) + (/.= (/.reversed high) low))))) (_.coverage [/.decrement /.less /.previous /.before] (and (same? .-- /.decrement) diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux index ed6589233d..2a2781cfc1 100644 --- a/stdlib/source/test/lux/math/number/int.lux +++ b/stdlib/source/test/lux/math/number/int.lux @@ -21,7 +21,7 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] ["[0]" arithmetic @@ -85,16 +85,16 @@ [sample random.int] (all _.and (_.coverage [/.negative?] - (bit#= (/.negative? sample) + (bit.= (/.negative? sample) (/.< +0 sample))) (_.coverage [/.positive?] - (bit#= (/.positive? sample) + (bit.= (/.positive? sample) (/.> +0 sample))) (_.coverage [/.zero?] - (bit#= (/.zero? sample) + (bit.= (/.zero? sample) (/.= +0 sample))) (_.coverage [/.even? /.odd?] - (bit#= (/.even? sample) + (bit.= (/.even? sample) (not (/.odd? sample)))) ))) @@ -132,7 +132,7 @@ (/.= /#bottom (/./ -1 /#bottom)))) (_.coverage [/.abs] - (bit#= (/.> sample (/.abs sample)) + (bit.= (/.> sample (/.abs sample)) (/.negative? sample))) (_.coverage [/.signum] (/.= (/.abs sample) @@ -157,10 +157,10 @@ right random.int] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) (do random.monad @@ -215,7 +215,7 @@ (and same_gcd! bezout_identity!))) (_.coverage [/.co_prime?] - (bit#= (/.= +1 (/.gcd left right)) + (bit.= (/.= +1 (/.gcd left right)) (/.co_prime? left right))) (_.coverage [/.lcm] (let [lcm (/.lcm left right)] diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux index c70db86a9d..8797ac43cd 100644 --- a/stdlib/source/test/lux/math/number/nat.lux +++ b/stdlib/source/test/lux/math/number/nat.lux @@ -21,7 +21,7 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text]] [math ["[0]" random] @@ -93,7 +93,7 @@ [sample random.nat] (all _.and (_.coverage [/.even? /.odd?] - (bit#= (/.even? sample) + (bit.= (/.even? sample) (not (/.odd? sample)))) ))) @@ -117,10 +117,10 @@ right random.nat] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) (do random.monad @@ -148,7 +148,7 @@ (and (/.= 0 (/.% gcd left)) (/.= 0 (/.% gcd right))))) (_.coverage [/.co_prime?] - (bit#= (/.= 1 (/.gcd left right)) + (bit.= (/.= 1 (/.gcd left right)) (/.co_prime? left right))) (_.coverage [/.lcm] (let [lcm (/.lcm left right)] diff --git a/stdlib/source/test/lux/math/number/rat.lux b/stdlib/source/test/lux/math/number/rat.lux index 0bf451e730..2b30f7bfdb 100644 --- a/stdlib/source/test/lux/math/number/rat.lux +++ b/stdlib/source/test/lux/math/number/rat.lux @@ -18,7 +18,7 @@ ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] ["[0]" arithmetic @@ -31,7 +31,7 @@ [\\library ["[0]" / (.only) [// - ["i" int (.use "[1]#[0]" equivalence)]]]]) + ["i" int]]]]) (the part (Random Int) @@ -80,35 +80,33 @@ (arithmeticT.spec /.equivalence /.arithmetic ..random)) (do random.monad - [.let [(open "/#[0]") /.equivalence] - denom/0 ..part + [denom/0 ..part denom/1 ..part] (_.coverage [/.ratio] - (/#= (/.ratio +0 denom/0) + (/.= (/.ratio +0 denom/0) (/.ratio +0 denom/1)))) (do [! random.monad] - [.let [(open "/#[0]") /.equivalence] - before_normal (random.and ..part ..part)] + [before_normal (random.and ..part ..part)] (_.coverage [/.normal] (or (normal? before_normal) (let [it (/.normal before_normal)] (and (normal? it) - (/#= before_normal it)))))) + (/.= before_normal it)))))) (do random.monad [numerator ..part - denominator (random.only (|>> (i#= +1) not) + denominator (random.only (|>> (i.= +1) not) ..part)] (_.coverage [/.int] (let [only_numerator! (|> (/.ratio numerator) /.int - (maybe#each (i#= numerator)) + (maybe#each (i.= numerator)) (maybe.else false)) denominator_1! (|> (/.ratio numerator +1) /.int - (maybe#each (i#= numerator)) + (maybe#each (i.= numerator)) (maybe.else false)) with_denominator! @@ -152,10 +150,10 @@ right ..random] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) )))) diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux index c74656b3bc..d4ca9fa7d8 100644 --- a/stdlib/source/test/lux/math/number/rev.lux +++ b/stdlib/source/test/lux/math/number/rev.lux @@ -21,7 +21,7 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)]] [meta @@ -132,7 +132,7 @@ random.nat)] (all _.and (_.coverage [/./] - (bit#= (/.< divisor/0 divisor/1) + (bit.= (/.< divisor/0 divisor/1) (/.> (/./ divisor/0 dividend) (/./ divisor/1 dividend)))) (_.coverage [/.%] (of i64.equivalence = @@ -172,10 +172,10 @@ right random.rev] (all _.and (_.coverage [/.>] - (bit#= (/.> left right) + (bit.= (/.> left right) (/.< right left))) (_.coverage [/.<= /.>=] - (bit#= (/.<= left right) + (bit.= (/.<= left right) (/.>= right left))) )) (do random.monad diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index e205b6e1de..bab3ca9684 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -14,7 +14,7 @@ [control ["[0]" try (.only Try) (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)] [number @@ -148,7 +148,7 @@ (is (Meta Any)) (/.value expected_lux) (!expect (^.multi {try.#Failure actual_error} - (text#= (location.with location.dummy expected_error) + (text.= (location.with location.dummy expected_error) actual_error))))) (_.coverage [/.assertion] (and (|> (/.assertion expected_error true) @@ -158,7 +158,7 @@ (|> (/.assertion expected_error false) (/.value expected_lux) (!expect (^.multi {try.#Failure actual_error} - (text#= expected_error actual_error)))))) + (text.= expected_error actual_error)))))) (_.coverage [/.either] (and (|> (/.either (of /.monad in expected) (is (Meta Nat) @@ -178,7 +178,7 @@ (/.failure expected_error))) (/.value expected_lux) (!expect (^.multi {try.#Failure actual_error} - (text#= (location.with location.dummy expected_error) + (text.= (location.with location.dummy expected_error) actual_error)))) (|> (/.either (of /.monad in expected) (of /.monad in dummy)) @@ -190,7 +190,7 @@ (and (|> (/.try (/.failure expected_error)) (/.value expected_lux) (!expect (^.multi {try.#Success {try.#Failure actual_error}} - (text#= (location.with location.dummy expected_error) + (text.= (location.with location.dummy expected_error) actual_error)))) (|> (/.try (of /.monad in expected)) (/.value expected_lux) @@ -344,7 +344,7 @@ /.of_try (/.value expected_lux) (!expect (^.multi {try.#Failure actual} - (text#= (location.with expected_location expected_error) + (text.= (location.with expected_location expected_error) actual)))) (|> expected_value {try.#Success} diff --git a/stdlib/source/test/lux/meta/binding.lux b/stdlib/source/test/lux/meta/binding.lux index ec66c24d98..0d1ce70393 100644 --- a/stdlib/source/test/lux/meta/binding.lux +++ b/stdlib/source/test/lux/meta/binding.lux @@ -11,8 +11,8 @@ ["[0]" try (.use "[1]#[0]" functor)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list] ["[0]" set]]] @@ -22,7 +22,7 @@ ["n" nat]]] [meta ["[0]" location] - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] ["[0]" type] [macro ["^" pattern] @@ -31,7 +31,9 @@ ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) - ["/[1]" //]]]) + ["/[1]" //]]] + ["[0]" / + ["[1][0]" local]]) (the !expect (template.macro (_ ) @@ -46,7 +48,7 @@ version (random.upper_cased 1) source_code (random.upper_cased 1) expected_current_module (random.upper_cased 1) - imported_module_name (random.only (|>> (text#= expected_current_module) not) + imported_module_name (random.only (|>> (text.= expected_current_module) not) (random.upper_cased 1)) nominal_type (random.upper_cased 1) expected_seed random.nat @@ -54,8 +56,8 @@ dummy (random.only (|>> (n.= expected) not) random.nat) expected_short (random.upper_cased 1) dummy_module (random.only (function (_ module) - (not (or (text#= expected_current_module module) - (text#= imported_module_name module)))) + (not (or (text.= expected_current_module module) + (text.= imported_module_name module)))) (random.upper_cased 1)) .let [imported_module [.#module_hash 0 .#module_aliases (list) @@ -94,12 +96,12 @@ (and (|> (/.normal ["" expected_short]) (//.value expected_lux) (!expect (^.multi {try.#Success [actual_module actual_short]} - (and (text#= expected_current_module actual_module) + (and (text.= expected_current_module actual_module) (same? expected_short actual_short))))) (|> (/.normal [dummy_module expected_short]) (//.value expected_lux) (!expect (^.multi {try.#Success [actual_module actual_short]} - (and (text#= dummy_module actual_module) + (and (text.= dummy_module actual_module) (same? expected_short actual_short))))))) ))) @@ -114,7 +116,7 @@ Test (do [! random.monad] [expected_current_module (random.upper_cased 1) - expected_macro_module (random.only (|>> (text#= expected_current_module) not) + expected_macro_module (random.only (|>> (text.= expected_current_module) not) (random.upper_cased 1)) expected_short (random.upper_cased 1) expected_type (of ! each (function (_ name) @@ -233,7 +235,7 @@ (do [! random.monad] [expected_exported? random.bit expected_current_module (random.upper_cased 1) - expected_macro_module (random.only (|>> (text#= expected_current_module) not) + expected_macro_module (random.only (|>> (text.= expected_current_module) not) (random.upper_cased 1)) expected_short (random.upper_cased 1) expected_type (of ! each (function (_ name) @@ -341,11 +343,11 @@ (expected_lux true {.#Some .Macro})] (and (|> (/.de_aliased [expected_macro_module expected_short]) (//.value expected_lux) - (try#each (symbol#= [expected_macro_module expected_short])) + (try#each (symbol.= [expected_macro_module expected_short])) (try.else false)) (|> (/.de_aliased [expected_current_module expected_short]) (//.value expected_lux) - (try#each (symbol#= [expected_macro_module expected_short])) + (try#each (symbol.= [expected_macro_module expected_short])) (try.else false))))) (_.coverage [/.definition] (let [[current_globals macro_globals expected_lux] @@ -355,7 +357,7 @@ (|> (/.definition [expected_macro_module expected_short]) (//.value expected_lux) (!expect (^.multi {try.#Success [actual_exported? {.#Definition [actual_type actual_value]}]} - (and (bit#= expected_exported? actual_exported?) + (and (bit.= expected_exported? actual_exported?) (same? expected_type actual_type) (same? (as Any expected_value) actual_value))))) @@ -403,135 +405,6 @@ alias!))) ))) -(the locals_related - Test - (do [! random.monad] - [current_module (random.upper_cased 1) - [name_0 name_1 name_2 name_3 name_4] (|> (random.upper_cased 1) - (random.set text.hash 5) - (of ! each set.list) - (random.one (function (_ values) - (when values - (list name_0 name_1 name_2 name_3 name_4) - {.#Some [name_0 name_1 name_2 name_3 name_4]} - - _ - {.#None})))) - .let [type_0 {.#Nominal name_0 (list)} - type_1 {.#Nominal name_1 (list)} - type_2 {.#Nominal name_2 (list)} - type_3 {.#Nominal name_3 (list)} - type_4 {.#Nominal name_4 (list)} - - globals (is (List [Text [Bit .Global]]) - (list [name_4 - [false {.#Definition [type_4 []]}]])) - - scopes (list [.#scope_name (list) - .#inner_scopes 0 - .#locals [.#counter 1 - .#mappings (list [name_3 [type_3 3]])] - .#captured [.#counter 0 - .#mappings (list)]] - [.#scope_name (list) - .#inner_scopes 0 - .#locals [.#counter 2 - .#mappings (list [name_1 [type_1 1]] - [name_2 [type_2 2]])] - .#captured [.#counter 0 - .#mappings (list)]] - [.#scope_name (list) - .#inner_scopes 0 - .#locals [.#counter 1 - .#mappings (list [name_0 [type_0 0]])] - .#captured [.#counter 0 - .#mappings (list)]])] - .let [expected_lux - (is Lux - [.#info [.#target "" - .#version "" - .#mode {.#Build} - .#configuration (list)] - .#source [location.dummy 0 ""] - .#location location.dummy - .#current_module {.#Some current_module} - .#modules (list [current_module - [.#module_hash 0 - .#module_aliases (list) - .#definitions globals - .#imports (list) - .#module_state {.#Active}]]) - .#scopes scopes - .#type_context [.#ex_counter 0 - .#var_counter 0 - .#var_bindings (list)] - .#expected {.#None} - .#seed 0 - .#scope_type_vars (list) - .#extensions [] - .#eval (as (-> Type Code (Meta Any)) []) - .#host []])]] - (all _.and - (_.coverage [.Scope - .#scope_name .#inner_scopes .#locals .#captured - - /.locals] - (let [equivalence (is (Equivalence (List (List [Text Type]))) - (list.equivalence - (list.equivalence - (product.equivalence - text.equivalence - type.equivalence))))] - (|> /.locals - (//.value expected_lux) - (try#each (of equivalence = (list (list [name_3 type_3]) - (list [name_1 type_1] - [name_2 type_2])))) - (try.else false)))) - (_.coverage [/.var_type] - (and (|> (/.var_type name_0) - (//.value expected_lux) - (try#each (of type.equivalence = type_0)) - (try.else false)) - (|> (/.var_type name_1) - (//.value expected_lux) - (try#each (of type.equivalence = type_1)) - (try.else false)) - (|> (/.var_type name_2) - (//.value expected_lux) - (try#each (of type.equivalence = type_2)) - (try.else false)) - (|> (/.var_type name_3) - (//.value expected_lux) - (try#each (of type.equivalence = type_3)) - (try.else false)))) - (_.coverage [/.type] - (and (|> (/.type ["" name_0]) - (//.value expected_lux) - (try#each (of type.equivalence = type_0)) - (try.else false)) - (|> (/.type ["" name_1]) - (//.value expected_lux) - (try#each (of type.equivalence = type_1)) - (try.else false)) - (|> (/.type ["" name_2]) - (//.value expected_lux) - (try#each (of type.equivalence = type_2)) - (try.else false)) - (|> (/.type ["" name_3]) - (//.value expected_lux) - (try#each (of type.equivalence = type_3)) - (try.else false)) - (|> (/.type [current_module name_4]) - (//.value expected_lux) - (try#each (of type.equivalence = type_4)) - (try.else false)) - (|> (/.type ["" name_4]) - (//.value expected_lux) - (try#each (of type.equivalence = type_4)) - (try.else false)))) - ))) - (the .public test Test (<| (_.covering /._) @@ -539,5 +412,6 @@ ..module_related ..definition_related ..search_related - ..locals_related + + /local.test ))) diff --git a/stdlib/source/test/lux/meta/binding/local.lux b/stdlib/source/test/lux/meta/binding/local.lux new file mode 100644 index 0000000000..e93b076d2b --- /dev/null +++ b/stdlib/source/test/lux/meta/binding/local.lux @@ -0,0 +1,132 @@ +... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + +(.require + [library + [lux (.except) + [abstract + [equivalence (.only Equivalence)] + [monad (.only do)]] + [control + ["[0]" try (.use "[1]#[0]" functor)]] + [data + ["[0]" product] + ["[0]" text] + [collection + ["[0]" list] + ["[0]" set]]] + [math + ["[0]" random (.only Random)]] + [meta + ["[0]" location] + ["[0]" type]] + [test + ["_" property (.only Test)]]]] + [\\library + ["[0]" / (.only) + ["//[1]" ///]]]) + +(the .public test + Test + (<| (_.covering /._) + (do [! random.monad] + [current_module (random.upper_cased 1) + [name_0 name_1 name_2 name_3 name_4] (|> (random.upper_cased 1) + (random.set text.hash 5) + (of ! each set.list) + (random.one (function (_ values) + (when values + (list name_0 name_1 name_2 name_3 name_4) + {.#Some [name_0 name_1 name_2 name_3 name_4]} + + _ + {.#None})))) + .let [type_0 {.#Nominal name_0 (list)} + type_1 {.#Nominal name_1 (list)} + type_2 {.#Nominal name_2 (list)} + type_3 {.#Nominal name_3 (list)} + type_4 {.#Nominal name_4 (list)} + + globals (is (List [Text [Bit .Global]]) + (list [name_4 + [false {.#Definition [type_4 []]}]])) + + scopes (list [.#scope_name (list) + .#inner_scopes 0 + .#locals [.#counter 1 + .#mappings (list [name_3 [type_3 3]])] + .#captured [.#counter 0 + .#mappings (list)]] + [.#scope_name (list) + .#inner_scopes 0 + .#locals [.#counter 2 + .#mappings (list [name_1 [type_1 1]] + [name_2 [type_2 2]])] + .#captured [.#counter 0 + .#mappings (list)]] + [.#scope_name (list) + .#inner_scopes 0 + .#locals [.#counter 1 + .#mappings (list [name_0 [type_0 0]])] + .#captured [.#counter 0 + .#mappings (list)]])] + .let [expected_lux + (is Lux + [.#info [.#target "" + .#version "" + .#mode {.#Build} + .#configuration (list)] + .#source [location.dummy 0 ""] + .#location location.dummy + .#current_module {.#Some current_module} + .#modules (list [current_module + [.#module_hash 0 + .#module_aliases (list) + .#definitions globals + .#imports (list) + .#module_state {.#Active}]]) + .#scopes scopes + .#type_context [.#ex_counter 0 + .#var_counter 0 + .#var_bindings (list)] + .#expected {.#None} + .#seed 0 + .#scope_type_vars (list) + .#extensions [] + .#eval (as (-> Type Code (Meta Any)) []) + .#host []])]] + (all _.and + (_.coverage [.Scope + .#scope_name .#inner_scopes .#locals .#captured + + /.all] + (let [equivalence (is (Equivalence (List (List [Text Type]))) + (list.equivalence + (list.equivalence + (product.equivalence + text.equivalence + type.equivalence))))] + (|> /.all + (///.value expected_lux) + (try#each (of equivalence = (list (list [name_3 type_3]) + (list [name_1 type_1] + [name_2 type_2])))) + (try.else false)))) + (_.coverage [/.type] + (and (|> (/.type name_0) + (///.value expected_lux) + (try#each (of type.equivalence = type_0)) + (try.else false)) + (|> (/.type name_1) + (///.value expected_lux) + (try#each (of type.equivalence = type_1)) + (try.else false)) + (|> (/.type name_2) + (///.value expected_lux) + (try#each (of type.equivalence = type_2)) + (try.else false)) + (|> (/.type name_3) + (///.value expected_lux) + (try#each (of type.equivalence = type_3)) + (try.else false)))) + )))) diff --git a/stdlib/source/test/lux/meta/compiler/arity.lux b/stdlib/source/test/lux/meta/compiler/arity.lux index 3388e7d133..338bfc1101 100644 --- a/stdlib/source/test/lux/meta/compiler/arity.lux +++ b/stdlib/source/test/lux/meta/compiler/arity.lux @@ -7,7 +7,7 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -25,9 +25,9 @@ [arity (of ! each (n.% 3) random.nat)] (all _.and (_.coverage [/.nullary?] - (bit#= (n.= 0 arity) (/.nullary? arity))) + (bit.= (n.= 0 arity) (/.nullary? arity))) (_.coverage [/.unary?] - (bit#= (n.= 1 arity) (/.unary? arity))) + (bit.= (n.= 1 arity) (/.unary? arity))) (_.coverage [/.multiary?] - (bit#= (n.>= 2 arity) (/.multiary? arity))) + (bit.= (n.>= 2 arity) (/.multiary? arity))) )))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux.lux index d751c176f0..f51404113f 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux.lux @@ -13,7 +13,7 @@ ["[0]" sum] ["[0]" product] ["[0]" bit] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] ["[0]" binary ["![1]" \\injection] ["?[1]" \\projection]] @@ -136,7 +136,7 @@ (let [it (key.signature /.key)] (and (let [[expected_module _] (symbol /._) [actual_module actual_short] (its signature.#name it)] - (and (text#= expected_module actual_module))) + (and (text.= expected_module actual_module))) (same? version.latest (its signature.#version it))))) /phase.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 c1e38519b1..ff31a983f0 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux @@ -16,8 +16,8 @@ ["[0]" function] ["[0]" maybe]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text (.only)] [collection ["[0]" list]]] [math @@ -29,7 +29,7 @@ ["r" rev]]] [meta ["[0]" static] - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] [macro ["[0]" template] ["[0]" expansion]] @@ -62,9 +62,9 @@ [/// [meta ["[1][0]" symbol] - ["[0]" location + ["[0]" location (.only) ["[2][1]" /] - ["[1]" \\library (.use "[1]#[0]" equivalence)]]]]]]) + ["[1]" \\library]]]]]]) (the !expect (template.macro (_ ) @@ -117,15 +117,15 @@ (\\projection.value ( expected)) (!expect {try.#Success _}))))] - [\\projection.bit \\projection.this_bit random.bit /.bit bit#=] + [\\projection.bit \\projection.this_bit random.bit /.bit bit.=] [\\projection.nat \\projection.this_nat random.nat /.nat n.=] [\\projection.int \\projection.this_int random.int /.int i.=] [\\projection.dec \\projection.this_dec random.safe_dec /.dec d.=] [\\projection.rev \\projection.this_rev random.rev /.rev r.=] - [\\projection.text \\projection.this_text (random.unicode 10) /.text text#=] + [\\projection.text \\projection.this_text (random.unicode 10) /.text text.=] [\\projection.local \\projection.this_local random.nat /.local n.=] [\\projection.foreign \\projection.this_foreign random.nat /.foreign n.=] - [\\projection.constant \\projection.this_constant ..constant /.constant symbol#=] + [\\projection.constant \\projection.this_constant ..constant /.constant symbol.=] )) (do [! random.monad] [expected random.bit] @@ -134,7 +134,7 @@ (\\projection.value (\\projection.tuple \\projection.bit)) (pipe.when {try.#Success actual} - (bit#= expected actual) + (bit.= expected actual) {try.#Failure _} false)))) @@ -411,7 +411,7 @@ (pipe.when {try.#Failure actual_error} (and (text.contains? expected_error actual_error) - (text.contains? (location.injection location/0) actual_error)) + (text.contains? (location.as_text location/0) actual_error)) _ false))) @@ -421,7 +421,7 @@ (pipe.when {try.#Failure actual_error} (and (text.contains? (exception.error []) actual_error) - (text.contains? (location.injection location/0) actual_error)) + (text.contains? (location.as_text location/0) actual_error)) _ false))) @@ -433,7 +433,7 @@ {try.#Failure actual_error} (and (text.contains? expected_error actual_error) (text.contains? (exception.error []) actual_error) - (text.contains? (location.injection location/0) actual_error)) + (text.contains? (location.as_text location/0) actual_error)) _ false))) @@ -443,7 +443,7 @@ (pipe.when {try.#Failure actual_error} (and (text.contains? (exception.error []) actual_error) - (text.contains? (location.injection location/0) actual_error)) + (text.contains? (location.as_text location/0) actual_error)) _ false)) @@ -477,7 +477,7 @@ (all _.and (_.coverage [/.info] (let [it (/.info version host configuration)] - (and (text#= (version.injection version) + (and (text.= (version.injection version) (its .#version it)) (same? host (its .#target it)) @@ -604,8 +604,8 @@ (_.for [/.State] ..test|state) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) /complex.test /inference.test 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 4daf38d481..a44aecc78b 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 @@ -11,8 +11,8 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] @@ -77,6 +77,6 @@ [left random right random] (_.coverage [/.injection] - (bit#= (of (/.equivalence n.equivalence) = left right) - (text#= (/.injection %.nat left) (/.injection %.nat right))))) + (bit.= (of (/.equivalence n.equivalence) = left right) + (text.= (/.injection %.nat left) (/.injection %.nat right))))) )))) 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 0dbd2450d2..4fe595d753 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 @@ -16,8 +16,8 @@ ["[0]" predicate]]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" set] @@ -162,11 +162,11 @@ (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.exhaustive?] - (bit#= (/#= {/.#Exhaustive} left) + (bit.= (/#= {/.#Exhaustive} left) (/.exhaustive? left))) (_.coverage [/.injection] - (bit#= (/#= left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (/#= left right) + (text.= (/.injection left) (/.injection right)))) )))) (the test|coverage diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux index 14b9d2501c..33eb9ab358 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux @@ -12,7 +12,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" monad)]]] @@ -28,7 +28,7 @@ ["$[1]" \\test]] ["[0]" configuration ["$[1]" \\test]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check (.only Check)]]] [test ["_" property (.only Test)]]]] @@ -119,7 +119,7 @@ (//module.with 0 (product.left name)) (/phase#each product.right) (/phase.value state) - (try#each (|>> product.left (type#= expected))) + (try#each (|>> product.left (type.= expected))) (try.else false)) (|> (/.general archive.empty ..analysis (type.function (list.repeated arity .Nat) expected) @@ -129,7 +129,7 @@ (/phase#each product.right) (/phase.value state) (try#each (function (_ [actual analysis/*]) - (and (type#= expected actual) + (and (type.= expected actual) (of (list.equivalence //.equivalence) = (list#each (|>> //.nat) nats) analysis/*)))) @@ -141,7 +141,7 @@ (//module.with 0 (product.left name)) (/phase#each product.right) (/phase.value state) - (try#each (|>> product.left (type#= expected))) + (try#each (|>> product.left (type.= expected))) (try.else false)) (|> (/.general archive.empty ..analysis (type {.#Named name (-> type/0 expected)}) @@ -150,7 +150,7 @@ (//module.with 0 (product.left name)) (/phase#each product.right) (/phase.value state) - (try#each (|>> product.left (type#= expected))) + (try#each (|>> product.left (type.= expected))) (try.else false)) (|> (/.general archive.empty ..analysis (type (for_any (_ a) (-> a a))) @@ -161,7 +161,7 @@ (/phase#each (|>> product.left (check.clean (list)) //type.check)) /phase#conjoint (/phase.value state) - (try#each (type#= type/0)) + (try#each (type.= type/0)) (try.else false)) (|> (/.general archive.empty ..analysis (type ((for_any (_ a) (-> a a)) type/0)) @@ -170,7 +170,7 @@ (//module.with 0 (product.left name)) (/phase#each product.right) (/phase.value state) - (try#each (|>> product.left (type#= type/0))) + (try#each (|>> product.left (type.= type/0))) (try.else false)) (|> (do /phase.monad [[@var varT] (//type.check check.var) @@ -182,7 +182,7 @@ (/phase#each (|>> product.left (check.clean (list)) //type.check)) /phase#conjoint (/phase.value state) - (try#each (type#= expected)) + (try#each (type.= expected)) (try.else false)) (|> (/.general archive.empty ..analysis (type (for_some (_ a) (-> a a))) @@ -276,7 +276,7 @@ only_bottom_conforms_to_tags_outside_of_range! (`` (and (,, (template.with [ ] - [(bit#= (variant? variantT arity arbitrary_right? ))] + [(bit.= (variant? variantT arity arbitrary_right? ))] [#0 term/0] [#1 (` (.error# ""))])))) @@ -299,7 +299,7 @@ existential_types_affect_dependent_cases! (`` (and (,, (template.with [ ] - [(bit#= (variant?' (type (for_some (_ a) (Maybe a))) {.#None} 0 #1 ))] + [(bit.= (variant?' (type (for_some (_ a) (Maybe a))) {.#None} 0 #1 ))] [#0 term/0] [#1 (` (.error# ""))]))))] 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 df948fd4c6..3bc5e52fda 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 @@ -12,8 +12,8 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" monad)]]] [math @@ -21,7 +21,7 @@ [number ["n" nat]]] ["[0]" meta (.only) - ["[0]" code (.use "[1]#[0]" equivalence)] + ["[0]" code] ["[0]" macro] ["[0]" configuration ["$[1]" \\test]]] @@ -98,7 +98,7 @@ (_.coverage [/.single_expansion] (|> (/.single_expansion ..expander name singular poly) (meta.value lux) - (try#each (code#= (|> poly (list.item choice) maybe.trusted))) + (try#each (code.= (|> poly (list.item choice) maybe.trusted))) (try.else false))) (_.coverage [/.must_have_single_expansion] (|> (/.single_expansion ..expander name multiple (list mono)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux index 067dbde659..abdb5811f8 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux @@ -11,8 +11,8 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list] ["[0]" set]]] @@ -108,7 +108,7 @@ (import.current? expected_import)))] (in ?)) (/phase.value state) - (try#each (bit#= )) + (try#each (bit.= )) (try.else false))] [false] @@ -210,7 +210,7 @@ arity (of ! each (|>> (n.% 10) ++) random.nat) labels|head (random.lower_cased 1) labels|tail (|> (random.lower_cased 1) - (random.only (|>> (text#= labels|head) not)) + (random.only (|>> (text.= labels|head) not)) (random.set text.hash (-- arity)) (of ! each set.list)) index (of ! each (n.% arity) random.nat) 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 731548d6f2..968f7b8728 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 @@ -9,8 +9,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [test @@ -54,8 +54,8 @@ (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) (_.coverage [/.unit] (when (/.unit) (/.unit) 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 e3b6658383..817dace2b7 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 @@ -9,8 +9,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -44,6 +44,6 @@ [left ..random right ..random] (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right))))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right))))) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux index 7e58ebf82d..e5319db53b 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux @@ -16,7 +16,7 @@ [meta ["[0]" configuration ["$[1]" \\test]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check]]] [test ["_" property (.only Test)]]]] @@ -52,7 +52,7 @@ .let [state [/extension.#bundle /extension.empty /extension.#state lux]] expected ..nominal - dummy (random.only (|>> (type#= expected) not) + dummy (random.only (|>> (type.= expected) not) ..nominal) module (random.lower_cased 1)] (all _.and @@ -87,7 +87,7 @@ (/module.with 0 module) (/phase#each product.right) (/phase.value state) - (try#each (|>> product.left (type#= expected))) + (try#each (|>> product.left (type.= expected))) (try.else false))) (_.coverage [/.check] (|> (do /phase.monad 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 2ec4e011bb..9ef9b696d3 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux @@ -14,7 +14,7 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random] @@ -148,7 +148,7 @@ [state/hex /.state] (in (|> state (of n.hex injection) - (text#= state/hex))))) + (text.= state/hex))))) (/.value' state) (pipe.when {try.#Success [state' verdict]} (and verdict @@ -212,7 +212,7 @@ (|> (phase archive.empty expected) (/.value' [state/0 state/1]) (pipe.when {try.#Success [[state/0' state/1'] actual]} - (and (text#= (%.dec (i.dec expected)) actual) + (and (text.= (%.dec (i.dec expected)) actual) (same? state/0 state/0') (same? state/1 state/1')) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux index 6d6311b5ed..a14cb983a7 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux @@ -22,7 +22,7 @@ ["[0]" code] ["[0]" macro (.only) ["[0]" template]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check]]] [test ["_" property (.only Test)]]]] @@ -68,7 +68,7 @@ [[:it: it] (|> (' []) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Any :it:) + (in (and (type.= .Any :it:) (when it (//.unit) true @@ -91,7 +91,7 @@ (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :it:) + (in (and (type.= :it:) (when it ( it) (same? it) @@ -245,7 +245,7 @@ [:it: it] (|> (code.variant (list (code.local @any) (` []))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :variant: + (in (and (type.= :variant: :it:) (when it (//.variant [0 .false (//.unit)]) @@ -264,7 +264,7 @@ [:it: it] (|> (code.variant (list (code.local ) ( ))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :variant: + (in (and (type.= :variant: :it:) (when it (//.variant [ ( actual)]) @@ -295,7 +295,7 @@ [:it: it] (|> (code.variant (list (code.local @left))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :either: + (in (and (type.= :either: :it:) (when it (//.variant [0 .false (//.unit)]) @@ -325,7 +325,7 @@ (code.text text/0))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :either: + (in (and (type.= :either: :it:) (when it (//.variant [0 #1 (//.tuple (list (//.unit) @@ -367,7 +367,7 @@ (code.text text/0))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= (type [.Any .Bit .Nat .Int .Rev .Dec .Text]) + (in (and (type.= (type [.Any .Bit .Nat .Int .Rev .Dec .Text]) :it:) (when it (//.tuple (list (//.unit) @@ -410,7 +410,7 @@ (code.local @any) (` []))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= :record: + (in (and (type.= :record: :it:) (when it (//.tuple (list (//.unit) @@ -445,7 +445,7 @@ [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= (for_any (_ a) (-> a .Nat)) + (in (and (type.= (for_any (_ a) (-> a .Nat)) :it:) (when it {//.#Function (list) (//.nat nat/?)} @@ -466,7 +466,7 @@ (, (code.nat nat/0))))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= (for_any (_ a) (-> a (for_any (_ b) (-> b .Nat)))) + (in (and (type.= (for_any (_ a) (-> a (for_any (_ b) (-> b .Nat)))) :it:) (when it {//.#Function (list) {//.#Function (list) (//.nat nat/?)}} @@ -487,7 +487,7 @@ (, $parameter/1)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= (for_any (_ a) (-> a (for_any (_ b) (-> b b)))) + (in (and (type.= (for_any (_ a) (-> a (for_any (_ b) (-> b b)))) :it:) (when it {//.#Function (list) {//.#Function (list) (//.local 1)}} @@ -515,7 +515,7 @@ _ false) ... TODO: Un-comment - ... (type#= (for_any (_ a) (-> a (for_any (_ b) (-> b a)))) + ... (type.= (for_any (_ a) (-> a (for_any (_ b) (-> b a)))) ... :it:) ))) //scope.with @@ -576,7 +576,7 @@ (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Bit :it:) + (in (and (type.= .Bit :it:) (when it {//.#Apply (//.nat nat/?) {//.#Function (list) (//.bit bit/?)}} @@ -597,7 +597,7 @@ (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Nat :it:) + (in (and (type.= .Nat :it:) (when it {//.#Apply (//.nat nat/?) {//.#Function (list) (//.local 1)}} @@ -646,7 +646,7 @@ [[:it: it] (|> (` (.text_composite# (, (code.text text/0)) (, (code.text text/0)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Text :it:) + (in (and (type.= .Text :it:) (when it {//.#Extension (symbol .text_composite#) (list (//.text left) (//.text right))} (and (same? text/0 left) @@ -679,7 +679,7 @@ [[:it: it] (|> (` ({(, $parameter/0) (, (code.dec dec/0))} (, ( )))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When ( input/?) [[//.#when (//pattern.bind 0) @@ -704,7 +704,7 @@ (, ( )))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When ( input/?) [[//.#when ( pattern/?) @@ -741,7 +741,7 @@ (, (code.bit bit/0)))) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When (//.bit bit/?) [[//.#when (//pattern.bit .false) @@ -772,7 +772,7 @@ {(, (code.local )) (, ( ))})) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When (//.variant [ ( analysis/?)]) [[//.#when (//pattern.variant [ ( pattern/?)]) @@ -811,7 +811,7 @@ (, (code.nat nat/0))])) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When (//.tuple (list (//.bit bit/?) (//.nat nat/?))) [[//.#when (//pattern.tuple (list (//pattern.bit .false) (//pattern.bind 0))) @@ -854,7 +854,7 @@ (, (code.local @text)) (, (code.text text/0))])) (/.phase ..expander archive.empty) //type.inferring)] - (in (and (type#= .Dec :it:) + (in (and (type.= .Dec :it:) (when it {//.#When (//.tuple (list (//.unit) (//.bit bit/?) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux index c6b965b726..23624a5af4 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux @@ -13,7 +13,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" monad monoid)] @@ -31,7 +31,7 @@ ["$[1]" \\test]] ["[0]" configuration ["$[1]" \\test]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check]]] [test ["_" property (.only Test)]]]] @@ -156,7 +156,7 @@ (in (when analysis (//analysis.variant [lefts' right?' analysis]) (and (n.= lefts lefts') - (bit#= right? right?') + (bit.= right? right?') (..analysed? code analysis)) _ @@ -175,7 +175,7 @@ (in (when analysis (//analysis.variant [lefts' right?' it]) (and (n.= lefts lefts') - (bit#= right? right?') + (bit.= right? right?') (..analysed? tagC it)) _ @@ -248,7 +248,7 @@ (in (when analysis (//analysis.variant [lefts' right?' analysis]) (and (n.= lefts lefts') - (bit#= right? right?') + (bit.= right? right?') (..analysed? tagC analysis)) _ @@ -266,9 +266,9 @@ (in (when analysis (//analysis.variant [lefts' right?' analysis]) (and (n.= lefts lefts') - (bit#= right? right?') + (bit.= right? right?') (..analysed? tagC analysis) - (type#= variantT actualT)) + (type.= variantT actualT)) _ false))) @@ -360,7 +360,7 @@ (list.every? (function (_ [expected actual]) (..analysed? expected actual)) (list.zipped_2 expected actual)) - (type#= productT :inferred:)) + (type.= productT :inferred:)) _ false))) @@ -378,7 +378,7 @@ :inferred: (//type.check (check.clean (list @var) :inferred:))] (in (when analysis (//analysis.tuple (list analysis/0 analysis/1 (//analysis.tuple (list analysis/2 analysis/3 analysis/4)))) - (and (type#= (Tuple type/0 type/1 type/2 type/2 type/2) + (and (type.= (Tuple type/0 type/1 type/2 type/2 type/2) :inferred:) (..analysed? term/0 analysis/0) (..analysed? term/1 analysis/1) @@ -518,7 +518,7 @@ {try.#Success {.#Some [actual_arity actual_tuple actual_type]}} (and (n.= arity actual_arity) (of code.equivalence = (code.tuple tuple) (code.tuple actual_tuple)) - (type#= :record: actual_type)) + (type.= :record: actual_type)) _ false)))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux index c8e90d91d1..51bb62a5d8 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux @@ -25,7 +25,7 @@ ["[0]" macro] ["[0]" symbol ["$[1]" \\test]] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["$[1]" \\test] ["[0]" check]]] [test @@ -113,7 +113,7 @@ ... //type.inferring)] ... (in (when analysis ... {//analysis.#Function [actual_env actual_body]} - ... (type#= :expected: :actual:) + ... (type.= :expected: :actual:) ... _ ... false))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux index a5f4d536cc..814564bf84 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux @@ -16,7 +16,7 @@ [math ["[0]" random]] [meta - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["$[1]" \\test]]] [test ["_" property (.only Test)]]]] @@ -60,7 +60,7 @@ (try#each (|>> product.right (pipe.when [actual_type (//analysis.local 0)] - (type#= expected_type actual_type) + (type.= expected_type actual_type) _ false))) @@ -79,7 +79,7 @@ product.right (pipe.when [actual_type (//analysis.foreign 0)] - (type#= expected_type actual_type) + (type.= expected_type actual_type) _ false))) @@ -95,7 +95,7 @@ (try#each (|>> product.right (pipe.when [actual_type (//analysis.constant [actual_module actual_name])] - (and (type#= expected_type actual_type) + (and (type.= expected_type actual_type) (same? expected_module actual_module) (same? expected_name actual_name)) @@ -115,7 +115,7 @@ (try#each (|>> product.right (pipe.when [actual_type (//analysis.constant [actual_module actual_name])] - (and (type#= expected_type actual_type) + (and (type.= expected_type actual_type) (same? import actual_module) (same? expected_name actual_name)) @@ -136,7 +136,7 @@ (try#each (|>> product.right (pipe.when [actual_type (//analysis.constant [actual_module actual_name])] - (and (type#= expected_type actual_type) + (and (type.= expected_type actual_type) (same? import actual_module) (same? expected_name actual_name)) @@ -157,7 +157,7 @@ (try#each (|>> product.right (pipe.when [actual_type (//analysis.constant [actual_module actual_name])] - (and (type#= .Type actual_type) + (and (type.= .Type actual_type) (same? expected_module actual_module) (same? expected_name actual_name)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux index d94ecbf8c3..8a1080c770 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux @@ -14,7 +14,7 @@ [math ["[0]" random]] [meta - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" type] ["[0]" configuration ["$[1]" \\test]] [macro @@ -66,7 +66,7 @@ /extension.#state state]) (pipe.when {try.#Success [inferred analysis]} - (and (type#= type inferred) + (and (type.= type inferred) (? analysis)) _ diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux index 2dc2595ebb..2a2f6b8d22 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux @@ -18,7 +18,7 @@ [meta ["[0]" code] ["[0]" macro] - ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" type (.only) ["[0]" check]]] [test ["_" property (.only Test)]]]] @@ -78,14 +78,14 @@ (and (|> :input: /.tuple (check.value check.fresh_context) - (try#each (|>> product.right (type#= :expected:))) + (try#each (|>> product.right (type.= :expected:))) (try.else false)) (|> (do check.monad [[@var :var:] check.var _ (check.check :var: :input:)] (/.tuple :var:)) (check.value check.fresh_context) - (try#each (|>> product.right (type#= :expected:))) + (try#each (|>> product.right (type.= :expected:))) (try.else false)))))] (and (tuple? input/0 (type.anonymous input/0)) @@ -104,7 +104,7 @@ _ (check.bind (for_any (_ a b c) (Tuple a b c)) @var)] (/.tuple (type (:var: input/0 input/1 input/2)))) (check.value check.fresh_context) - (try#each (|>> product.right (type#= (Tuple input/0 input/1 input/2)))) + (try#each (|>> product.right (type.= (Tuple input/0 input/1 input/2)))) (try.else false)) (|> (do check.monad [[@0 :0:] check.existential @@ -188,7 +188,7 @@ [(` #1) body/0]) archive.empty) //type.inferring)] - (in (type#= output/0 :actual:))) + (in (type.= output/0 :actual:))) //scope.with (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) @@ -307,9 +307,9 @@ (let [state [//extension.#bundle (//extension/analysis.bundle ..eval) //extension.#state lux] - tag/0 (%.code $binding/0) - tag/1 (%.code $binding/1) - tag/2 (%.code $binding/2) + tag/0 (code.as_text $binding/0) + tag/1 (code.as_text $binding/1) + tag/2 (code.as_text $binding/2) tags/* (list tag/0 tag/1 tag/2) :variant: {.#Named [module/0 name/0] (type.variant (list input/0 input/1 input/2))} @@ -378,9 +378,9 @@ (let [state [//extension.#bundle (//extension/analysis.bundle ..eval) //extension.#state lux] - slot/0 (%.code $binding/0) - slot/1 (%.code $binding/1) - slot/2 (%.code $binding/2) + slot/0 (code.as_text $binding/0) + slot/1 (code.as_text $binding/1) + slot/2 (code.as_text $binding/2) slots/* (list slot/0 slot/1 slot/2) :record: {.#Named [module/0 name/0] (type.tuple (list input/0 input/1 input/2))} @@ -569,9 +569,9 @@ (invalid? (list [(` {[] (, $binding/0) (, $binding/1) (, $binding/2)}) body/0]))))) (_.coverage [/.sum_has_no_case] - (let [tag/0 (%.code $binding/0) - tag/1 (%.code $binding/1) - tag/2 (%.code $binding/2) + (let [tag/0 (code.as_text $binding/0) + tag/1 (code.as_text $binding/1) + tag/2 (code.as_text $binding/2) tags/* (list tag/0 tag/1 tag/2) :variant: {.#Named [module/0 name/0] (type.variant (list input/0 input/1 input/2))} @@ -596,9 +596,9 @@ (//phase.value state) (exception.otherwise (text.contains? (its exception.#label /.sum_has_no_case)))))) (_.coverage [/.mismatch] - (let [slot/0 (%.code $binding/0) - slot/1 (%.code $binding/1) - slot/2 (%.code $binding/2) + (let [slot/0 (code.as_text $binding/0) + slot/1 (code.as_text $binding/1) + slot/2 (code.as_text $binding/2) slots/* (list slot/0 slot/1 slot/2) :record: {.#Named [module/0 name/0] (type.tuple (list input/0 input/1 input/2))} 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 7264d650a3..43ade9d95c 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 @@ -15,8 +15,8 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" dictionary] @@ -52,7 +52,7 @@ (_.coverage [/.read] (|> (is (/.Operation Int Nat Nat Text) (/.read %.int)) - (of phase.functor each (text#= (%.int state))) + (of phase.functor each (text.= (%.int state))) (phase.value [/.#bundle /.empty /.#state state]) (try.else false))) @@ -61,7 +61,7 @@ (do phase.monad [_ (/.update ++)] (/.read %.int))) - (of phase.functor each (text#= (%.int (++ state)))) + (of phase.functor each (text.= (%.int (++ state)))) (phase.value [/.#bundle /.empty /.#state state]) (try.else false))) @@ -71,7 +71,7 @@ [|state'| (/.temporary ++ (/.read %.int)) |state| (/.read %.int)] (in (%.message |state'| " " |state|)))) - (of phase.functor each (text#= (%.message (%.int (++ state)) " " (%.int state)))) + (of phase.functor each (text.= (%.message (%.int (++ state)) " " (%.int state)))) (phase.value [/.#bundle /.empty /.#state state]) (try.else false))) @@ -84,7 +84,7 @@ (/.read %.int)) |state'| (/.read %.int)] (in (%.message |state'| " " |state|)))) - (of phase.functor each (text#= (%.message (%.int (i.+ +2 state)) + (of phase.functor each (text.= (%.message (%.int (i.+ +2 state)) " " (%.int (i.+ +1 state))))) (phase.value [/.#bundle /.empty /.#state state]) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index f53d7076fd..f44bf08370 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -18,7 +18,7 @@ [meta ["[0]" code] ["[0]" symbol] - ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" type] [macro ["[0]" template]]] [test @@ -64,7 +64,7 @@ (do r.monad [[primT primC] ..primitive [antiT antiC] (|> ..primitive - (r.only (|>> product.left (type#= primT) not)))] + (r.only (|>> product.left (type.= primT) not)))] (all _.and (_.test "Can test for reference equality." (check_success+ (` .is?#) (list primC primC) Bit)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/primitive.lux index 029e65dcc6..f2482e0f29 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/primitive.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/primitive.lux @@ -80,12 +80,12 @@ (the .public test Test - (<| (_.context (%.symbol (symbol ////synthesis.#Primitive))) + (<| (_.context (symbol.as_text (symbol ////synthesis.#Primitive))) (`` (all _.and (,, (template.with [ ] [(do r.monad [expected ] - (_.test (%.symbol (symbol )) + (_.test (symbol.as_text (symbol )) (|> {////analysis.#Primitive { expected}} (//.phase archive.empty) (phase.value [///bundle.empty ////synthesis.init]) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux index ac2e4c9164..2f740bf84d 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux @@ -13,7 +13,7 @@ ["[0]" pipe] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" product] [number ["n" nat]] @@ -57,7 +57,7 @@ {try.#Success (////synthesis.variant [leftsS right?S valueS])} (let [tagS (if right?S (++ leftsS) leftsS)] (and (n.= tagA tagS) - (|> tagS (n.= (-- size)) (bit#= right?S)) + (|> tagS (n.= (-- size)) (bit.= right?S)) (//primitive.corresponds? memberA valueS))) _ @@ -83,7 +83,7 @@ (the .public test Test - (<| (_.context (%.symbol (symbol ////synthesis.#Structure))) + (<| (_.context (symbol.as_text (symbol ////synthesis.#Structure))) (all _.and ..variant ..tuple diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/complex.lux index 0211d095b3..5dced2ef5d 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/complex.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/complex.lux @@ -10,12 +10,12 @@ ["[0]" io] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)]]] + ["[0]" i64]]] [meta ["[0]" location] [macro @@ -106,9 +106,9 @@ false))))) (try.else false))] - [0 #0 synthesis.bit expected_bit bit#=] - [1 #0 synthesis.i64 expected_i64 i64#=] - [1 #1 synthesis.text expected_text text#=] + [0 #0 synthesis.bit expected_bit bit.=] + [1 #0 synthesis.i64 expected_i64 i64.=] + [1 #1 synthesis.text expected_text text.=] ))))) (_.coverage [/.tuple] (|> (do try.monad @@ -125,9 +125,9 @@ (in (when (of host evaluate [{.#None} it]) {try.#Success actual} (let [[actual_bit actual_i64 actual_text] (as Tuple/3 actual)] - (and (bit#= expected_bit actual_bit) - (i64#= expected_i64 actual_i64) - (text#= expected_text actual_text))) + (and (bit.= expected_bit actual_bit) + (i64.= expected_i64 actual_i64) + (text.= expected_text actual_text))) {try.#Failure error} false))))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux index 64dc901228..00a0af4f8d 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux @@ -11,16 +11,14 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" function]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] [collection ["[0]" list]]] [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["n" nat] + ["[0]" i64]]] [meta - ["[0]" location] [compiler [meta ["[0]" archive]]]] @@ -89,7 +87,7 @@ (of host evaluate) (try#each (|>> (as (-> [] I64)) (function.on []) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))) (_.coverage [/.apply] @@ -110,7 +108,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false)) @@ -147,7 +145,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))] (and exact_arity! diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/count.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/count.lux index 2093d4e76e..bc815ee9a2 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/count.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/count.lux @@ -11,13 +11,13 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" function]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math ["[0]" random (.only Random)] [number - ["n" nat (.use "[1]#[0]" equivalence)]]] + ["n" nat]]] [meta ["[0]" location] [compiler @@ -82,7 +82,7 @@ (value.boxed type.long)) [{.#None}] (of host evaluate) - (try#each (|>> (as Nat) (n#= 0))) + (try#each (|>> (as Nat) (n.= 0))) (try.else false)))) (_.coverage [/.value] (let [fresh_abstraction! @@ -104,7 +104,7 @@ (value.boxed type.long)) [{.#None}] (of host evaluate) - (try#each (|>> (as Nat) (n#= 0))) + (try#each (|>> (as Nat) (n.= 0))) (try.else false)))))) (try.else false)) @@ -130,7 +130,7 @@ (value.boxed type.long)) [{.#None}] (of host evaluate) - (try#each (|>> (as Nat) (n#= partial_application))) + (try#each (|>> (as Nat) (n.= partial_application))) (try.else false)))))) (try.else false))] (and fresh_abstraction! diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/foreign.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/foreign.lux index 9424f3d14a..d2961cece4 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/foreign.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/foreign.lux @@ -8,24 +8,13 @@ [monad (.only do)]] [control ["[0]" io] - ["[0]" try (.use "[1]#[0]" functor)] - ["[0]" function]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - [collection - ["[0]" list]]] + ["[0]" try (.use "[1]#[0]" functor)]] [math ["[0]" random (.only Random)] [number - ["n" nat (.use "[1]#[0]" equivalence)] - ["[0]" i64 (.use "[1]#[0]" equivalence)]]] + ["[0]" i64]]] [meta - ["[0]" location] [compiler - [target - [jvm - ["!" bytecode] - ["[0]" type]]] [meta ["[0]" archive]]]] [test @@ -58,7 +47,7 @@ [module (random.lower_cased 1) expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/partial.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/partial.lux index 21af5f29fc..3c2f750205 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/partial.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/variable/partial.lux @@ -8,24 +8,13 @@ [monad (.only do)]] [control ["[0]" io] - ["[0]" try (.use "[1]#[0]" functor)] - ["[0]" function]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - [collection - ["[0]" list]]] + ["[0]" try (.use "[1]#[0]" functor)]] [math ["[0]" random (.only Random)] [number - ["n" nat (.use "[1]#[0]" equivalence)] - ["[0]" i64 (.use "[1]#[0]" equivalence)]]] + ["[0]" i64]]] [meta - ["[0]" location] [compiler - [target - [jvm - ["!" bytecode] - ["[0]" type]]] [meta ["[0]" archive]]]] [test @@ -58,7 +47,7 @@ [module (random.lower_cased 1) expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) random.i64) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender (function (_ _) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/apply.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/apply.lux index ce11a25948..5fafe45c3c 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/apply.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/apply.lux @@ -12,7 +12,7 @@ [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)]]] + ["[0]" i64]]] [meta [compiler [meta @@ -41,7 +41,7 @@ [module (random.lower_cased 1) dummy_i64 random.i64 - expected_i64 (random.only (|>> (i64#= dummy_i64) not) + expected_i64 (random.only (|>> (i64.= dummy_i64) not) random.i64) .let [extender (is extension.Extender @@ -69,7 +69,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux index f568323950..f6519362d1 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/implementation.lux @@ -13,8 +13,8 @@ [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["n" nat] + ["[0]" i64]]] [meta [compiler [target @@ -103,7 +103,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false) ))))) (try.else false))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/reset.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/reset.lux index b91f8b2de2..e49bea6388 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/reset.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/method/reset.lux @@ -13,8 +13,8 @@ [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["n" nat] + ["[0]" i64]]] [meta [compiler [target @@ -60,7 +60,7 @@ [module (random.lower_cased 1) dummy_i64 random.i64 - expected_i64 (random.only (|>> (i64#= dummy_i64) not) + expected_i64 (random.only (|>> (i64.= dummy_i64) not) random.i64) .let [extender (is extension.Extender @@ -101,7 +101,7 @@ [{.#None}] (of host evaluate) (try#each (function (_ it) - (i64#= dummy_i64 + (i64.= dummy_i64 ((as (-> I64 I64) it) expected_i64)))) @@ -115,7 +115,7 @@ [{.#None}] (of host evaluate) (try#each (function (_ it) - (i64#= expected_i64 + (i64.= expected_i64 ((as (-> I64 I64 I64) it) expected_i64 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 index 2701fbc183..41f2b858f2 100644 --- 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 @@ -11,7 +11,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)]] [meta @@ -35,7 +35,7 @@ [[class_loader host] /.host] (in (when (of host evaluate [{.#None} (bytecode.string expected)]) {try.#Success actual} - (text#= expected (as Text actual)) + (text.= expected (as Text actual)) {try.#Failure error} false))))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/loop.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/loop.lux index 2f41b2126f..30a413dbe3 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/loop.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/loop.lux @@ -8,19 +8,12 @@ [monad (.only do)]] [control ["[0]" io] - ["[0]" try (.use "[1]#[0]" functor)] - ["[0]" function]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - [collection - ["[0]" list]]] + ["[0]" try (.use "[1]#[0]" functor)]] [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["[0]" i64]]] [meta - ["[0]" location] [compiler [meta ["[0]" archive]]]] @@ -47,7 +40,7 @@ [module (random.lower_cased 1) expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) random.i64) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender (function (_ _) @@ -72,7 +65,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false)) @@ -92,7 +85,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))] (and no_bindings! @@ -121,7 +114,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/primitive.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/primitive.lux index c6c6878f48..922784d5db 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/primitive.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/primitive.lux @@ -10,13 +10,13 @@ ["[0]" io] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)] [number - ["[0]" int (.use "[1]#[0]" equivalence)] - ["[0]" dec (.use "[1]#[0]" equivalence)]]] + ["[0]" int] + ["[0]" dec]]] [meta [macro ["[0]" template]]] @@ -47,9 +47,9 @@ {try.#Failure error} false)))))] - [/.bit expected_bit Bit bit#=] - [/.i64 expected_i64 Int int#=] - [/.f64 expected_f64 Dec dec#=] - [/.text expected_text Text text#=] + [/.bit expected_bit Bit bit.=] + [/.i64 expected_i64 Int int.=] + [/.f64 expected_f64 Dec dec.=] + [/.text expected_text Text text.=] )) )))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/reference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/reference.lux index d2852b8e2b..b5d053d7dc 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/reference.lux @@ -15,8 +15,8 @@ [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["n" nat] + ["[0]" i64]]] [meta ["[0]" location] [compiler @@ -46,7 +46,7 @@ [module (random.lower_cased 1) expected random.i64 - dummy (random.only (|>> (i64#= expected) not) random.i64) + dummy (random.only (|>> (i64.= expected) not) random.i64) .let [extender (is extension.Extender (function (_ _) @@ -80,7 +80,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected))) + (i64.= expected))) (try.else false)))))) (try.else false))) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/type.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/type.lux index e36841f9a1..0827cf8bc4 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/type.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/type.lux @@ -12,7 +12,7 @@ [compiler [target [jvm - ["[0]" type (.only Type) (.use "[1]#[0]" equivalence) + ["[0]" type (.only Type) [category (.only Primitive Array Class)]]]]]] [test ["_" property (.only Test)]]]] @@ -26,9 +26,9 @@ []) (all _.and (_.coverage [/.dec /.text] - (not (type#= /.dec /.text))) + (not (type.= /.dec /.text))) (_.coverage [/.value /.error] - (not (type#= /.value /.error))) + (not (type.= /.value /.error))) (_.coverage [/.lefts] (exec (is (Type Primitive) @@ -40,7 +40,7 @@ /.right?) true)) (_.coverage [/.variant /.tuple] - (type#= /.variant /.tuple)) + (type.= /.variant /.tuple)) (_.coverage [/.stack] (exec (is (Type Array) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux index af5dc7b830..9559ed7f08 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/value.lux @@ -10,13 +10,13 @@ ["[0]" io] ["[0]" try]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text]] [math ["[0]" random (.only Random)] [number - ["[0]" int (.use "[1]#[0]" equivalence)] - ["[0]" dec (.use "[1]#[0]" equivalence)]]] + ["[0]" int] + ["[0]" dec]]] [meta [macro ["[0]" template]] @@ -60,8 +60,8 @@ {try.#Failure error} false))))] - [primitive.bit expected_bit Bit bit#= type.boolean] - [primitive.i64 expected_i64 Int int#= type.long] - [primitive.f64 expected_f64 Dec dec#= type.double] + [primitive.bit expected_bit Bit bit.= type.boolean] + [primitive.i64 expected_i64 Int int.= type.long] + [primitive.f64 expected_f64 Dec dec.= type.double] )))) )))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux index e0ffe8a45a..5ad84c8820 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/when.lux @@ -8,19 +8,16 @@ [monad (.only do)]] [control ["[0]" io] - ["[0]" try (.use "[1]#[0]" functor)] - ["[0]" function]] + ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] [collection ["[0]" list (.use "[1]#[0]" monoid functor)]]] [math ["[0]" random (.only Random)] [number - ["[0]" i64 (.use "[1]#[0]" equivalence)] - ["n" nat]]] + ["n" nat] + ["[0]" i64]]] [meta - ["[0]" location] [compiler [meta ["[0]" archive]]]] @@ -50,7 +47,7 @@ expected_bit random.bit expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender @@ -79,7 +76,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))))) @@ -90,7 +87,7 @@ expected_bit random.bit expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender @@ -115,7 +112,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))))) @@ -149,7 +146,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))) (try.else false))))) @@ -158,7 +155,7 @@ (do [! random.monad] [module (random.lower_cased 1) expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender @@ -212,7 +209,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) right! (<| (phase.value state) (do phase.monad @@ -225,7 +222,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) nested! (<| (phase.value state) (do phase.monad @@ -239,7 +236,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false)))))] (in (and middle! right! @@ -251,7 +248,7 @@ (do [! random.monad] [module (random.lower_cased 1) expected_i64 random.i64 - dummy_i64 (random.only (|>> (i64#= expected_i64) not) + dummy_i64 (random.only (|>> (i64.= expected_i64) not) random.i64) .let [extender (is extension.Extender @@ -284,7 +281,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) pop! (<| (phase.value state) (do phase.monad @@ -299,7 +296,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) bind! (<| (phase.value state) (do phase.monad @@ -314,7 +311,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) bit! (<| (phase.value state) (do phase.monad @@ -329,7 +326,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) i64! (<| (phase.value state) (do phase.monad @@ -343,7 +340,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) f64! (<| (phase.value state) (do phase.monad @@ -357,7 +354,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) text! (<| (phase.value state) (do phase.monad @@ -371,7 +368,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) alt! (<| (phase.value state) (do phase.monad @@ -387,7 +384,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))) .let [access!|member (is (-> Member (List I64) Bit) @@ -408,7 +405,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))))) access!|side (is (-> Side Bit) @@ -429,7 +426,7 @@ [{.#None}] (of host evaluate) (try#each (|>> (as I64) - (i64#= expected_i64))) + (i64.= expected_i64))) (try.else false))))))) access! (and (access!|member [lefts false] (list#composite (list.repeated lefts dummy_i64) (list expected_i64 dummy_i64))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux index c37e47dd47..16231992c1 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux @@ -80,7 +80,7 @@ [sample code^] (all _.and (_.test "Can parse Lux code." - (when (let [source_code (%.code sample)] + (when (let [source_code (code.as_text sample)] (/.parse "" (dictionary.empty text.hash) (text.size source_code) [location.dummy 0 source_code])) {.#Left error} @@ -91,7 +91,7 @@ (do ! [other code^] (_.test "Can parse multiple Lux code nodes." - (let [source_code (%.message (%.code sample) " " (%.code other)) + (let [source_code (%.message (code.as_text sample) " " (code.as_text other)) source_code//size (text.size source_code)] (when (/.parse "" (dictionary.empty text.hash) source_code//size [location.dummy 0 source_code]) @@ -129,7 +129,7 @@ comment comment^] (all _.and (_.test "Can handle comments." - (when (let [source_code (%.message comment (%.code sample)) + (when (let [source_code (%.message comment (code.as_text sample)) source_code//size (text.size source_code)] (/.parse "" (dictionary.empty text.hash) source_code//size [location.dummy 0 source_code])) 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 abd0c8b85b..adc3c27d9c 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 @@ -11,8 +11,8 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)]] [test @@ -41,6 +41,6 @@ (hashT.spec /.hash ..random)) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) )))) 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 6260ecdf33..690b9bdedf 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 @@ -11,8 +11,8 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)]] [test @@ -41,6 +41,6 @@ (hashT.spec /.hash ..random)) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) )))) 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 407d5b1a79..6fe32f9379 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 @@ -11,8 +11,8 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random)] [number @@ -45,6 +45,6 @@ (hashT.spec /.hash ..random)) (_.coverage [/.injection] - (bit#= (text#= (/.injection left) (/.injection right)) + (bit.= (text.= (/.injection left) (/.injection right)) (of /.equivalence = left right))) )))) 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 4e37cf9e0a..012a6201f4 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux @@ -9,7 +9,7 @@ [control ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list] ["[0]" sequence]]] @@ -98,7 +98,7 @@ (_.coverage [/.symbol] (|> (do phase.monad [it (/.symbol expected_prefix)] - (in (and (not (text#= expected_prefix it)) + (in (and (not (text.= expected_prefix it)) (text.starts_with? expected_prefix it)))) (phase.value (/.state ..dummy_host expected_module)) (try.else false))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive.lux b/stdlib/source/test/lux/meta/compiler/meta/archive.lux index ea0e58ed3d..b8967fb289 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive.lux @@ -15,7 +15,7 @@ ["%" \\injection]] [collection ["[0]" list] - ["[0]" set (.use "[1]#[0]" equivalence)] + ["[0]" set] ["[0]" sequence]]] [math ["[0]" random (.only Random)] @@ -186,7 +186,7 @@ (/.export version configuration) (/.import version configuration)) .let [post (/.reserved archive)]] - (in (set#= (set.of_list text.hash pre) + (in (set.= (set.of_list text.hash pre) (set.of_list text.hash post)))) (try.else false))) (_.coverage [/.version_mismatch] @@ -227,7 +227,7 @@ (|> (do try.monad [[@module/0 archive] (/.reserve module/0 /.empty) [@module/1 archive] (/.reserve module/1 archive)] - (in (set#= (set.of_list text.hash (list module/0 module/1)) + (in (set.= (set.of_list text.hash (list module/0 module/1)) (set.of_list text.hash (/.reserved archive))))) (try.else false))) (_.coverage [/.reservations] @@ -235,7 +235,7 @@ [[@module/0 archive] (/.reserve module/0 /.empty) [@module/1 archive] (/.reserve module/1 archive) .let [hash (product.hash text.hash n.hash)]] - (in (set#= (set.of_list hash (list [module/0 @module/0] [module/1 @module/1])) + (in (set.= (set.of_list hash (list [module/0 @module/0] [module/1 @module/1])) (set.of_list hash (/.reservations archive))))) (try.else false))) (_.coverage [/.module_has_already_been_reserved] 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 7149352b8f..d62a2cf79e 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 @@ -11,7 +11,7 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] ["[0]" binary ["[1]" \\injection] ["<[1]>" \\projection]]] @@ -53,7 +53,7 @@ (_.for [/.Module] (_.coverage [/.runtime] - (text#= "" /.runtime))) + (text.= "" /.runtime))) (_.coverage [/.injection /.projection] (|> expected (binary.value /.injection) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/module/document.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/module/document.lux index c01444bb56..4bd62c5178 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/module/document.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/module/document.lux @@ -23,7 +23,7 @@ [\\library ["[0]" / (.only) [/// - ["[1][0]" signature (.use "[1]#[0]" equivalence)] + ["[1][0]" signature] ["[1][0]" key]]]] ["[0]" /// ["[1][0]" signature]]) @@ -34,7 +34,7 @@ (_.for [/.Document]) (do random.monad [signature/0 ///signature.random - signature/1 (random.only (|>> (/signature#= signature/0) not) + signature/1 (random.only (|>> (/signature.= signature/0) not) ///signature.random) .let [key/0 (/key.key signature/0 0) key/1 (/key.key signature/1 0)] @@ -90,7 +90,7 @@ (.value (/.projection key/0 .nat)) (pipe.when {try.#Success it} - (and (/signature#= signature/0 (/.signature it)) + (and (/signature.= signature/0 (/.signature it)) (|> it (/.content key/0) (try#each (nat.= expected)) 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 ec4938f483..f76f324010 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux @@ -11,8 +11,8 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] ["[0]" binary ["[1]F" \\injection] ["<[1]>" \\projection]]] @@ -47,8 +47,8 @@ [left ..random right ..random] (_.coverage [/.description] - (bit#= (of /.equivalence = left right) - (text#= (/.description left) (/.description right))))) + (bit.= (of /.equivalence = left right) + (text.= (/.description left) (/.description right))))) (do random.monad [expected ..random] (_.coverage [/.injection /.projection] 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 50a1c84b91..89a082a816 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux @@ -11,8 +11,8 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" set]]] [math @@ -46,6 +46,6 @@ (_.coverage [/.none] (set.empty? /.none)) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) ))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux index 2829b684b2..7cb694d7b7 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux @@ -11,7 +11,7 @@ [concurrency ["[0]" async]]] [data - ["[0]" binary (.use "[1]#[0]" equivalence)] + ["[0]" binary] [collection ["[0]" sequence]]] [math @@ -84,7 +84,7 @@ [_ enabled? _ cached?] actual) - (try#each (binary#= expected)) + (try#each (binary.= expected)) (try.else false)) post/0)))) )))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux index 5b4f75c157..ccc007952a 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux @@ -11,7 +11,7 @@ [concurrency ["[0]" async (.only Async) (.use "[1]#[0]" monad)]]] [data - ["[0]" binary (.use "[1]#[0]" equivalence) + ["[0]" binary (.only) ["$[1]" \\test]]] [math ["[0]" random (.only Random)] @@ -53,6 +53,6 @@ {try.#Failure _} false) post (when read! - {try.#Success actual} (binary#= expected actual) + {try.#Success actual} (binary.= expected actual) {try.#Failure _} false))))) )))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/dependency/module.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/dependency/module.lux index a2c76c0d80..fa5f8664a3 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cache/dependency/module.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cache/dependency/module.lux @@ -10,7 +10,7 @@ ["[0]" text] [collection ["[0]" dictionary] - ["[0]" set (.use "[1]#[0]" equivalence)]]] + ["[0]" set]]] [math ["[0]" random (.only Random)]] [test @@ -43,7 +43,7 @@ (dictionary.has module/2 /.fresh) /.modules (set.of_list text.hash))] - (set#= expected actual))) + (set.= expected actual))) )) (<| (_.for [/.Dependency /.#module /.#imports]) @@ -55,7 +55,7 @@ [module/2 /.fresh])) /.modules (set.of_list text.hash))] - (set#= expected actual))) + (set.= expected actual))) )) (<| (_.for [/.Order]) (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli.lux b/stdlib/source/test/lux/meta/compiler/meta/cli.lux index 82efc9547d..697ff8a3c6 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cli.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cli.lux @@ -20,7 +20,7 @@ [number ["n" nat]]] [meta - ["[0]" configuration (.use "[1]#[0]" equivalence) + ["[0]" configuration (.only) ["$[1]" \\test]] [macro ["[0]" template]]] @@ -87,7 +87,7 @@ [/.Source /.#sources (list#= sources)] [/.Target /.#target (same? target)] [/.Module /.#module (same? module)] - [configuration.Configuration /.#configuration (configuration#= configuration)] + [configuration.Configuration /.#configuration (configuration.= configuration)] )) ))) (_.coverage [/.Interpretation] @@ -110,7 +110,7 @@ [/.#sources (list#= sources)] [/.#target (same? target)] [/.#module (same? module)] - [/.#configuration (configuration#= configuration)] + [/.#configuration (configuration.= configuration)] ))))) (_.coverage [/.Export] (`` (and (,, (template.with [ ] diff --git a/stdlib/source/test/lux/meta/compiler/meta/export.lux b/stdlib/source/test/lux/meta/compiler/meta/export.lux index 173e6550d5..fd0bcbf25b 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/export.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/export.lux @@ -13,12 +13,12 @@ ["[0]" async]]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [format ["[0]" tar]] - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence) + ["[0]" binary (.only Binary) ["<[1]>" \\projection]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] [encoding ["[0]" utf8]]] @@ -89,14 +89,14 @@ (pipe.when (list {tar.#Normal [actual_path/0 when/0 mode/0 ownership/0 actual_content/0]} {tar.#Normal [actual_path/1 when/1 mode/1 ownership/1 actual_content/1]}) - (expansion.let [ (and (and (text#= file/0' (tar.from_path actual_path/0)) + (expansion.let [ (and (and (text.= file/0' (tar.from_path actual_path/0)) (same? /.mode mode/0) (same? /.ownership ownership/0) - (binary#= content/0 (tar.data actual_content/0))) - (and (text#= file/1' (tar.from_path actual_path/1)) + (binary.= content/0 (tar.data actual_content/0))) + (and (text.= file/1' (tar.from_path actual_path/1)) (same? /.mode mode/1) (same? /.ownership ownership/1) - (binary#= content/1 (tar.data actual_content/1))))] + (binary.= content/1 (tar.data actual_content/1))))] (or (let [[[actual_path/0 actual_content/0] [actual_path/1 actual_content/1]] [[actual_path/1 actual_content/1] [actual_path/0 actual_content/0]]] @@ -112,10 +112,10 @@ (pipe.when (list {tar.#Normal [actual_path/0 _ _ _ actual_content/0]} {tar.#Normal [actual_path/1 _ _ _ actual_content/1]}) - (expansion.let [ (and (and (text#= file/0' (tar.from_path actual_path/0)) - (binary#= content/0 (tar.data actual_content/0))) - (and (text#= file/1' (tar.from_path actual_path/1)) - (binary#= content/1 (tar.data actual_content/1))))] + (expansion.let [ (and (and (text.= file/0' (tar.from_path actual_path/0)) + (binary.= content/0 (tar.data actual_content/0))) + (and (text.= file/1' (tar.from_path actual_path/1)) + (binary.= content/1 (tar.data actual_content/1))))] (or (let [[[actual_path/0 actual_content/0] [actual_path/1 actual_content/1]] [[actual_path/1 actual_content/1] [actual_path/0 actual_content/0]]] diff --git a/stdlib/source/test/lux/meta/compiler/meta/import.lux b/stdlib/source/test/lux/meta/compiler/meta/import.lux index 2e188b43b6..8d256802ae 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/import.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/import.lux @@ -13,14 +13,12 @@ [concurrency ["[0]" async]]] [data - ["[0]" product] - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence) + ["[0]" binary (.only Binary) ["[0]" \\injection] ["<[1]>" \\projection]] [format ["[0]" tar (.only Tar)]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] [encoding ["[0]" utf8]]] @@ -108,11 +106,11 @@ (and (n.= 2 (dictionary.size it)) (|> it (dictionary.value file/0) - (maybe#each (binary#= content/0)) + (maybe#each (binary.= content/0)) (maybe.else false)) (|> it (dictionary.value file/1) - (maybe#each (binary#= content/1)) + (maybe#each (binary.= content/1)) (maybe.else false)))))]] (all _.and (in (do [! async.monad] diff --git a/stdlib/source/test/lux/meta/compiler/reference.lux b/stdlib/source/test/lux/meta/compiler/reference.lux index e0648c5f5e..4397604a95 100644 --- a/stdlib/source/test/lux/meta/compiler/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/reference.lux @@ -11,14 +11,14 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] [number ["n" nat]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol (.only)] [macro ["[0]" template]]] [test @@ -90,17 +90,17 @@ (_.coverage [/.constant] (when (/.constant expected_constant) (/.constant actual_constant) - (symbol#= expected_constant actual_constant) + (symbol.= expected_constant actual_constant) _ false)) (_.coverage [/.injection] - (and (text#= (/.injection (/.local expected_register)) + (and (text.= (/.injection (/.local expected_register)) (variable.injection {variable.#Local expected_register})) - (text#= (/.injection (/.foreign expected_register)) + (text.= (/.injection (/.foreign expected_register)) (variable.injection {variable.#Foreign expected_register})) - (text#= (/.injection (/.constant expected_constant)) - (%.symbol expected_constant)))) + (text.= (/.injection (/.constant expected_constant)) + (symbol.as_text expected_constant)))) /register.test /variable.test diff --git a/stdlib/source/test/lux/meta/compiler/reference/variable.lux b/stdlib/source/test/lux/meta/compiler/reference/variable.lux index 2a517bec45..6d97294694 100644 --- a/stdlib/source/test/lux/meta/compiler/reference/variable.lux +++ b/stdlib/source/test/lux/meta/compiler/reference/variable.lux @@ -11,7 +11,7 @@ ["[0]" hash ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)]] [test @@ -46,6 +46,6 @@ (_.coverage [/.self?] (/.self? (/.self))) (_.coverage [/.injection] - (not (text#= (/.injection {/.#Local register}) + (not (text.= (/.injection {/.#Local register}) (/.injection {/.#Foreign register})))) )))) diff --git a/stdlib/source/test/lux/meta/compiler/target/js.lux b/stdlib/source/test/lux/meta/compiler/target/js.lux index b2a7e215ac..8b9e51c0df 100644 --- a/stdlib/source/test/lux/meta/compiler/target/js.lux +++ b/stdlib/source/test/lux/meta/compiler/target/js.lux @@ -13,8 +13,8 @@ ["[0]" function (.only) ["[0]" predicate]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.only \n) (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only \n) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -88,7 +88,7 @@ {.#Some _} false))) (try.else false))) (_.coverage [/.boolean] - (expression (|>> (as Bit) (bit#= boolean)) + (expression (|>> (as Bit) (bit.= boolean)) (/.boolean boolean))) (_.coverage [/.number] (expression (|>> (as Dec) (d.= number)) @@ -97,7 +97,7 @@ (expression (|>> (as Dec) d.int (i.= int)) (/.int int))) (_.coverage [/.string] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.string string))) ))) @@ -110,14 +110,14 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( left right)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.boolean left) (/.boolean right)))))] [/.or .or] [/.and .and] )) (_.coverage [/.not] - (expression (|>> (as Bit) (bit#= (not left))) + (expression (|>> (as Bit) (bit.= (not left))) (/.not (/.boolean left)))) )))) @@ -143,7 +143,7 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( parameter subject)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.number parameter) (/.number subject)))))] [/.< d.<] @@ -232,7 +232,7 @@ (do [! random.monad] [expected random.safe_dec field (random.upper_cased 5) - dummy (random.only (|>> (text#= field) not) + dummy (random.only (|>> (text.= field) not) (random.upper_cased 5)) size (of ! each (|>> (n.% 10) ++) random.nat) @@ -286,21 +286,21 @@ (expression (|>> (as Bit) not) (/.not_a_number? (/.number then))))) (_.coverage [/.type_of] - (and (expression (|>> (as Text) (text#= "boolean")) + (and (expression (|>> (as Text) (text.= "boolean")) (/.type_of (/.boolean boolean))) - (expression (|>> (as Text) (text#= "number")) + (expression (|>> (as Text) (text.= "number")) (/.type_of (/.number number))) - (expression (|>> (as Text) (text#= "string")) + (expression (|>> (as Text) (text.= "string")) (/.type_of (/.string string))) - (expression (|>> (as Text) (text#= "object")) + (expression (|>> (as Text) (text.= "object")) (/.type_of /.null)) - (expression (|>> (as Text) (text#= "object")) + (expression (|>> (as Text) (text.= "object")) (/.type_of (/.object (list [string (/.number number)])))) - (expression (|>> (as Text) (text#= "object")) + (expression (|>> (as Text) (text.= "object")) (/.type_of (/.array (list (/.boolean boolean) (/.number number) (/.string string))))) - (expression (|>> (as Text) (text#= "undefined")) + (expression (|>> (as Text) (text.= "undefined")) (/.type_of /.undefined)))) (_.coverage [/.comment] (expression (|>> (as Dec) (d.= then)) @@ -330,7 +330,7 @@ number/1 random.safe_dec number/2 random.safe_dec foreign (random.lower_cased 10) - local (random.only (|>> (text#= foreign) not) + local (random.only (|>> (text.= foreign) not) (random.lower_cased 10)) .let [$foreign (/.var foreign) $local (/.var local)]] @@ -713,10 +713,10 @@ number/1 random.safe_dec number/2 random.safe_dec arg/0 (random.lower_cased 10) - arg/1 (random.only (|>> (text#= arg/0) not) + arg/1 (random.only (|>> (text.= arg/0) not) (random.lower_cased 10)) - arg/2 (random.only (predicate.and (|>> (text#= arg/0) not) - (|>> (text#= arg/1) not)) + arg/2 (random.only (predicate.and (|>> (text.= arg/0) not) + (|>> (text.= arg/1) not)) (random.lower_cased 10)) .let [$arg/0 (/.var arg/0) $arg/1 (/.var arg/1) @@ -743,21 +743,21 @@ (let [number/0' (%.dec number/0) number/1' (%.dec number/1) number/2' (%.dec number/2)] - (and (expression (|>> (as Text) (text#= number/0')) + (and (expression (|>> (as Text) (text.= number/0')) (/.apply (/.closure (list) (/.switch (/.number number/0) (list [(list (/.number number/0)) (/.return (/.string number/0'))] [(list (/.number number/1)) (/.return (/.string number/1'))]) {.#None})) (list))) - (expression (|>> (as Text) (text#= number/1')) + (expression (|>> (as Text) (text.= number/1')) (/.apply (/.closure (list) (/.switch (/.number number/1) (list [(list (/.number number/0)) (/.return (/.string number/0'))] [(list (/.number number/1)) (/.return (/.string number/1'))]) {.#Some (/.return (/.string number/2'))})) (list))) - (expression (|>> (as Text) (text#= number/2')) + (expression (|>> (as Text) (text.= number/2')) (/.apply (/.closure (list) (/.switch (/.number number/2) (list [(list (/.number number/0)) (/.return (/.string number/0'))] diff --git a/stdlib/source/test/lux/meta/compiler/target/jvm.lux b/stdlib/source/test/lux/meta/compiler/target/jvm.lux index a2a7a1dd7d..df3ed7ae24 100644 --- a/stdlib/source/test/lux/meta/compiler/target/jvm.lux +++ b/stdlib/source/test/lux/meta/compiler/target/jvm.lux @@ -16,8 +16,8 @@ [concurrency ["[0]" atom]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] ["[0]" binary ["[1]" \\injection]] @@ -767,7 +767,7 @@ (<| (_.lifted "INVOKEVIRTUAL") (do random.monad [expected ..$Double::random]) - (..bytecode (|>> (as Bit) (bit#= (d.not_a_number? (as Dec expected))))) + (..bytecode (|>> (as Bit) (bit.= (d.not_a_number? (as Dec expected))))) (do /.monad [_ (/.double (as Dec expected)) _ ..$Double::wrap @@ -913,7 +913,7 @@ (all _.and (_.context "boolean" (array (/.newarray /instruction.t_boolean) $Boolean::random $Boolean::literal [/.bastore /.baload $Boolean::wrap] - (function (_ expected) (|>> (as Bit) (bit#= (as Bit expected)))))) + (function (_ expected) (|>> (as Bit) (bit.= (as Bit expected)))))) (_.context "byte" (array (/.newarray /instruction.t_byte) $Byte::random $Byte::literal [/.bastore /.baload $Byte::wrap] (function (_ expected) @@ -944,7 +944,7 @@ (|>> (as java/lang/Character) .jvm_object_cast# (.jvm_char_=# (.jvm_object_cast# (as java/lang/Character expected))))))) (_.context "object" (array (/.anewarray ..$String) $String::random $String::literal [/.aastore /.aaload /.nop] - (function (_ expected) (|>> (as Text) (text#= (as Text expected)))))) + (function (_ expected) (|>> (as Text) (text.= (as Text expected)))))) (<| (_.context "multi") (do [! random.monad] [.let [size (is (Random Nat) @@ -1130,7 +1130,7 @@ (<| (_.context "object") (let [test (is (-> java/lang/String Any Bit) (function (_ expected actual) - (|> actual (as Text) (text#= (as Text expected)))))] + (|> actual (as Text) (text.= (as Text expected)))))] (all _.and (_.lifted "ASTORE_0/ALOAD_0" (store_and_load ..$String::random ..$String::literal /.nop [(function.constant /.astore_0) (function.constant /.aload_0)] test)) @@ -1149,7 +1149,7 @@ (do random.monad [expected/1 $String::random .let [object_test (is (-> Any Bit) - (|>> (as Text) (text#= (as Text expected/1))))] + (|>> (as Text) (text.= (as Text expected/1))))] dummy/1 $String::random .let [single (all _.and (<| (_.lifted "DUP & POP") @@ -1240,7 +1240,7 @@ primitive_method_name (random.upper_cased 10) .let [primitive_method_type (/type.method [(list) (list) (its #unboxed primitive) (list)])] object_method_name (|> (random.upper_cased 10) - (random.only (|>> (text#= primitive_method_name) not))) + (random.only (|>> (text.= primitive_method_name) not))) expected (its #random primitive) .let [$Self (/type.class class_name (list))]] (in (when (do try.monad @@ -1289,7 +1289,7 @@ (_.lifted "LRETURN" (primitive_return ..$Long::primitive /.lreturn {.#None} (!::= java/lang/Long "jvm leq" .jvm_long_=#))) (_.lifted "FRETURN" (primitive_return ..$Float::primitive /.freturn {.#None} (!::= java/lang/Float "jvm feq" .jvm_float_=#))) (_.lifted "DRETURN" (primitive_return ..$Double::primitive /.dreturn {.#None} (!::= java/lang/Double "jvm deq" .jvm_double_=#))) - (_.lifted "ARETURN" (primitive_return ..$String::primitive /.areturn {.#None} (function (_ expected actual) (text#= (as Text expected) (as Text actual))))) + (_.lifted "ARETURN" (primitive_return ..$String::primitive /.areturn {.#None} (function (_ expected actual) (text.= (as Text expected) (as Text actual))))) (_.lifted "RETURN" (primitive_return (is (Primitive java/lang/String) [#unboxed /type.void #boxed ..$String @@ -1298,7 +1298,7 @@ #literal (function.constant /.nop)]) /.return {.#Some ..$String::literal} - (function (_ expected actual) (text#= (as Text expected) (as Text actual))))) + (function (_ expected actual) (text.= (as Text expected) (as Text actual))))) ))) (the branching @@ -1499,11 +1499,11 @@ (do random.monad [abstract_class ..class_name interface_class (|> ..class_name - (random.only (|>> (text#= abstract_class) not))) + (random.only (|>> (text.= abstract_class) not))) concrete_class (|> ..class_name (random.only (function (_ class) - (not (or (text#= abstract_class class) - (text#= interface_class class)))))) + (not (or (text.= abstract_class class) + (text.= interface_class class)))))) part0 ..$Long::random part1 ..$Long::random part2 ..$Long::random diff --git a/stdlib/source/test/lux/meta/compiler/target/lua.lux b/stdlib/source/test/lux/meta/compiler/target/lua.lux index 5ba6a50434..1eca7e0091 100644 --- a/stdlib/source/test/lux/meta/compiler/target/lua.lux +++ b/stdlib/source/test/lux/meta/compiler/target/lua.lux @@ -17,8 +17,8 @@ ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try) (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.only \n) (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only \n) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -66,7 +66,7 @@ {.#None} true {.#Some _} false))) (_.coverage [/.boolean] - (expression (|>> (as Bit) (bit#= boolean)) + (expression (|>> (as Bit) (bit.= boolean)) (/.boolean boolean))) (_.coverage [/.int] (expression (|>> (as Int) (i.= int)) @@ -75,7 +75,7 @@ (expression (|>> (as Dec) (d.= float)) (/.float float))) (_.coverage [/.string] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.string string))) ))) @@ -88,14 +88,14 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( left right)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.boolean left) (/.boolean right)))))] [/.or .or] [/.and .and] )) (_.coverage [/.not] - (expression (|>> (as Bit) (bit#= (not left))) + (expression (|>> (as Bit) (bit.= (not left))) (/.not (/.boolean left)))) )))) @@ -175,7 +175,7 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( parameter subject)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.float parameter) (/.float subject)))))] [/.< d.<] @@ -194,7 +194,7 @@ .let [expected (%.message left right)]] (all _.and (_.coverage [/.concat] - (expression (|>> (as Text) (text#= expected)) + (expression (|>> (as Text) (text.= expected)) (|> (/.string left) (/.concat (/.string right))))) ))) @@ -237,7 +237,7 @@ $table (of ! each /.var (random.lower_cased 11)) $arg (of ! each /.var (random.lower_cased 12)) field (random.upper_cased 5) - non_field (random.only (|>> (text#= field) not) + non_field (random.only (|>> (text.= field) not) (random.upper_cased 5)) method (random.upper_cased 6)] (all _.and @@ -282,19 +282,19 @@ ..test|array ..test|table (_.coverage [/.type/1] - (and (expression (|>> (as Text) (text#= "boolean")) + (and (expression (|>> (as Text) (text.= "boolean")) (/.type/1 (/.boolean boolean))) - (expression (|>> (as Text) (text#= "number")) + (expression (|>> (as Text) (text.= "number")) (/.type/1 (/.int int))) - (expression (|>> (as Text) (text#= "number")) + (expression (|>> (as Text) (text.= "number")) (/.type/1 (/.float float))) - (expression (|>> (as Text) (text#= "string")) + (expression (|>> (as Text) (text.= "string")) (/.type/1 (/.string string))) - (expression (|>> (as Text) (text#= "nil")) + (expression (|>> (as Text) (text.= "nil")) (/.type/1 /.nil)) - (expression (|>> (as Text) (text#= "table")) + (expression (|>> (as Text) (text.= "table")) (/.type/1 (/.table (list [string (/.float float)])))) - (expression (|>> (as Text) (text#= "table")) + (expression (|>> (as Text) (text.= "table")) (/.type/1 (/.array (list (/.boolean boolean) (/.float float) (/.string string))))) @@ -326,7 +326,7 @@ float/1 random.safe_dec float/2 random.safe_dec foreign (random.lower_cased 10) - local (random.only (|>> (text#= foreign) not) + local (random.only (|>> (text.= foreign) not) (random.lower_cased 10)) .let [$foreign (/.var foreign) $local (/.var local)]] diff --git a/stdlib/source/test/lux/meta/compiler/target/python.lux b/stdlib/source/test/lux/meta/compiler/target/python.lux index 357a5ca828..202b0636a2 100644 --- a/stdlib/source/test/lux/meta/compiler/target/python.lux +++ b/stdlib/source/test/lux/meta/compiler/target/python.lux @@ -17,8 +17,8 @@ ["[0]" function (.only) ["[0]" predicate]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -68,7 +68,7 @@ {.#Some _} false))) (try.else false))) (_.coverage [/.bool] - (expression (|>> (as Bit) (bit#= bool)) + (expression (|>> (as Bit) (bit.= bool)) (/.bool bool))) (_.coverage [/.int] (expression (|>> (as Int) (i.= int)) @@ -80,10 +80,10 @@ (expression (|>> (as Dec) (d.= float)) (/.float float))) (_.coverage [/.string] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.string string))) (_.coverage [/.unicode] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.unicode string))) ))) @@ -96,14 +96,14 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( left right)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.bool left) (/.bool right)))))] [/.or .or] [/.and .and] )) (_.coverage [/.not] - (expression (|>> (as Bit) (bit#= (not left))) + (expression (|>> (as Bit) (bit.= (not left))) (/.not (/.bool left)))) )))) @@ -130,7 +130,7 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( parameter subject)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.float parameter) (/.float subject)))))] [/.< d.<] @@ -143,7 +143,7 @@ (expression (|>> (as Dec) (d.= subject)) (/.float/1 (/.string (%.dec subject))))) (_.coverage [/.repr/1] - (expression (|>> (as Text) (text#= (text.replaced "+" "" (%.dec subject)))) + (expression (|>> (as Text) (text.= (text.replaced "+" "" (%.dec subject)))) (/.repr/1 (/.float subject)))) )))) @@ -204,7 +204,7 @@ (expression (|>> (as Int) (i.= left)) (/.int/1 (/.string (%.int left))))) (_.coverage [/.str/1] - (expression (|>> (as Text) (text#= (text.replaced "+" "" (%.int left)))) + (expression (|>> (as Text) (text.= (text.replaced "+" "" (%.int left)))) (/.str/1 (/.int left)))) (_.coverage [/.long] (or (expression (|>> (as Bit)) @@ -225,7 +225,7 @@ (/.? python_3? (/.ord/1 (/.chr/1 (/.int (.int expected_code)))) (/.unicode/1 (/.unichr/1 (/.int (.int expected_code)))))) - (expression (|>> (as Text) (text#= expected_char)) + (expression (|>> (as Text) (text.= expected_char)) (/.? python_3? (/.chr/1 (/.ord/1 (/.string expected_char))) (/.unichr/1 (/.unicode/1 (/.string expected_char))))))) @@ -273,7 +273,7 @@ (do [! random.monad] [expected random.safe_dec field (random.upper_cased 5) - dummy (random.only (|>> (text#= field) not) + dummy (random.only (|>> (text.= field) not) (random.upper_cased 5)) .let [field (/.string field) dummy (/.string dummy)]] @@ -614,7 +614,7 @@ (/.raise (/.Exception/1 (/.string expected_error))) (/.set (list $output) (/.float dummy)))))) {try.#Failure actual_error} - (text#= expected_error actual_error) + (text.= expected_error actual_error) {try.#Success _} false)) @@ -638,7 +638,7 @@ /.#exception $ex /.#handler (/.set (list $output) (/.float expected))]))))) {try.#Failure actual_error} - (text#= expected_error actual_error) + (text.= expected_error actual_error) {try.#Success actual} false))) diff --git a/stdlib/source/test/lux/meta/compiler/target/ruby.lux b/stdlib/source/test/lux/meta/compiler/target/ruby.lux index 439c1d70a9..6c8d80a22b 100644 --- a/stdlib/source/test/lux/meta/compiler/target/ruby.lux +++ b/stdlib/source/test/lux/meta/compiler/target/ruby.lux @@ -16,8 +16,8 @@ [function ["[0]" predicate]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -74,7 +74,7 @@ (_.coverage [/.nil] (..nil /.nil)) (_.coverage [/.bool] - (expression (|>> (as Bit) (bit#= bool)) + (expression (|>> (as Bit) (bit.= bool)) (/.bool bool))) (_.coverage [/.int] (expression (|>> (as Int) (i.= int)) @@ -83,10 +83,10 @@ (expression (|>> (as Dec) (d.= float)) (/.float float))) (_.coverage [/.string] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.string string))) (_.coverage [/.symbol] - (expression (|>> (as Text) (text#= string)) + (expression (|>> (as Text) (text.= string)) (/.do "id2name" (list) {.#None} (/.symbol string)))) ))) @@ -99,14 +99,14 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( left right)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.bool left) (/.bool right)))))] [/.or .or] [/.and .and] )) (_.coverage [/.not] - (expression (|>> (as Bit) (bit#= (not left))) + (expression (|>> (as Bit) (bit.= (not left))) (/.not (/.bool left)))) )))) @@ -133,7 +133,7 @@ (,, (template.with [ ] [(_.coverage [] (let [expected ( parameter subject)] - (expression (|>> (as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit.= expected)) ( (/.float parameter) (/.float subject)))))] [/.< d.<] @@ -219,7 +219,7 @@ (do [! random.monad] [expected random.safe_dec field (random.upper_cased 5) - dummy (random.only (|>> (text#= field) not) + dummy (random.only (|>> (text.= field) not) (random.upper_cased 5)) .let [field (/.string field) dummy (/.string dummy)]] @@ -346,7 +346,7 @@ (_.for [/.stdout] (all _.and (_.coverage [/.print/1] - (expression (|>> (as Text) (text#= expected)) + (expression (|>> (as Text) (text.= expected)) (|> (all /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdout) @@ -359,7 +359,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda (list))))) (_.coverage [/.print/2] - (expression (|>> (as Text) (text#= expected)) + (expression (|>> (as Text) (text.= expected)) (|> (all /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdout) @@ -374,7 +374,7 @@ (_.for [/.stdin] (all _.and (_.coverage [/.gets/0] - (expression (|>> (as Text) (text#= (%.message left text.\n))) + (expression (|>> (as Text) (text.= (%.message left text.\n))) (|> (all /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdin) @@ -386,7 +386,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda (list))))) (_.coverage [/.last_string_read] - (expression (|>> (as Text) (text#= (%.message right text.\n))) + (expression (|>> (as Text) (text.= (%.message right text.\n))) (|> (all /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdin) @@ -443,7 +443,7 @@ pattern (of ! each /.string (random.lower_cased 11))] (all _.and (_.coverage [/.global] - (expression (|>> (as Text) (text#= "global-variable")) + (expression (|>> (as Text) (text.= "global-variable")) (|> (all /.then (/.set (list $global) (/.float float/0)) (/.return (/.defined?/1 $global))) @@ -456,7 +456,7 @@ /.script_name)) (_.coverage [/.input_record_separator] (expression (|>> (as Text) - (text#= text.\n)) + (text.= text.\n)) /.input_record_separator)) (_.coverage [/.output_record_separator] (..nil /.output_record_separator)) @@ -464,7 +464,7 @@ (expression (|>> (as Nat) (n.= 0) not) /.process_id)) (_.coverage [/.case_insensitivity_flag] - (expression (|>> (as Bit) (bit#= false)) + (expression (|>> (as Bit) (bit.= false)) /.case_insensitivity_flag)) (_.coverage [/.command_line_arguments] (expression (|>> (as Int) (i.= +0)) @@ -651,7 +651,7 @@ (and (expression (|>> (as Bit)) (|> (/.defined?/1 $foreign) (/.= /.nil))) - (expression (|>> (as Text) (text#= "local-variable")) + (expression (|>> (as Text) (text.= "local-variable")) (|> (all /.then (/.set (list $foreign) (/.float float/0)) (/.return (/.defined?/1 $foreign))) @@ -659,7 +659,7 @@ (/.apply_lambda (list)))))) (_.for [/.CVar] (_.coverage [/.constant] - (expression (|>> (as Text) (text#= "constant")) + (expression (|>> (as Text) (text.= "constant")) (|> (all /.then (/.set (list $constant) (/.float float/0)) (/.return (/.defined?/1 $constant))) @@ -884,7 +884,7 @@ /.statement (/.catch expected_tag) [(list)] (/.throw/2 expected_tag (/.float expected)))))) (_.coverage [/.latest_error_message] - (expression (|>> (as Text) (text#= error)) + (expression (|>> (as Text) (text.= error)) (|> (/.begin (all /.then (/.statement (/.raise (/.string error))) (/.return (/.float dummy))) @@ -896,7 +896,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda (list)) ..nil) - (expression (|>> (as Bit) (bit#= true)) + (expression (|>> (as Bit) (bit.= true)) (|> (/.begin (all /.then (/.statement (/.raise (/.string error))) (/.return (/.float dummy))) @@ -965,10 +965,10 @@ float/1 random.safe_dec float/2 random.safe_dec arg/0 (random.lower_cased 10) - arg/1 (random.only (|>> (text#= arg/0) not) + arg/1 (random.only (|>> (text.= arg/0) not) (random.lower_cased 10)) - arg/2 (random.only (predicate.and (|>> (text#= arg/0) not) - (|>> (text#= arg/1) not)) + arg/2 (random.only (predicate.and (|>> (text.= arg/0) not) + (|>> (text.= arg/1) not)) (random.lower_cased 10)) .let [$arg/0 (/.local arg/0) $arg/1 (/.local arg/1) @@ -1020,7 +1020,7 @@ (/.apply_lambda (list (/.float float/0) (/.float float/1)))))) (_.coverage [/.require/1] (let [$JSON (is /.CVar (/.manual "JSON"))] - (expression (|>> (as Text) (text#= expected)) + (expression (|>> (as Text) (text.= expected)) (|> (all /.then (/.statement (/.require/1 (/.string "json"))) (/.return (let [json (/.do "parse" (list $arg/0) {.#None} $JSON)] diff --git a/stdlib/source/test/lux/meta/compiler/version.lux b/stdlib/source/test/lux/meta/compiler/version.lux index c06c37d5fa..1a1189e486 100644 --- a/stdlib/source/test/lux/meta/compiler/version.lux +++ b/stdlib/source/test/lux/meta/compiler/version.lux @@ -7,8 +7,8 @@ [abstract [monad (.only do)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] @@ -35,8 +35,8 @@ that ..random] (`` (all _.and (_.coverage [/.injection] - (bit#= (nat.= this that) - (text#= (/.injection this) (/.injection that)))) + (bit.= (nat.= this that) + (text.= (/.injection this) (/.injection that)))) (,, (template.with [] [(_.coverage [] (text.contains? (%.nat ( this)) diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux index 763c7d1f96..cee4be2ec0 100644 --- a/stdlib/source/test/lux/meta/extension.lux +++ b/stdlib/source/test/lux/meta/extension.lux @@ -14,7 +14,7 @@ ["[0]" product] ["[0]" binary (.only) ["[1]F" \\injection]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" sequence] @@ -212,7 +212,7 @@ (and (n.= expected (..my_translation expected)) (let [[_ expected] (symbol ..dummy_translation)] - (text#= expected + (text.= expected (..dummy_translation))))) (_.coverage [/.declaration] true) diff --git a/stdlib/source/test/lux/meta/label.lux b/stdlib/source/test/lux/meta/label.lux index 7e2fa62535..90537adf47 100644 --- a/stdlib/source/test/lux/meta/label.lux +++ b/stdlib/source/test/lux/meta/label.lux @@ -10,7 +10,7 @@ ["[0]" try (.use "[1]#[0]" functor)]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor monoid)] ["[0]" set]]] @@ -116,7 +116,7 @@ (do ! [head (random.lower_cased size)] (|> (random.lower_cased size) - (random.only (|>> (text#= head) not)) + (random.only (|>> (text.= head) not)) (random.set text.hash 3) (of ! each set.list) (random.and (in head))))))] diff --git a/stdlib/source/test/lux/meta/location.lux b/stdlib/source/test/lux/meta/location.lux index b95165c41d..72e0de3c6d 100644 --- a/stdlib/source/test/lux/meta/location.lux +++ b/stdlib/source/test/lux/meta/location.lux @@ -41,9 +41,9 @@ (do random.monad [location ..random error (random.alphabetic 10)] - (_.coverage [/.injection /.with] + (_.coverage [/.as_text /.with] (let [located_error (/.with location error)] - (and (text.contains? (/.injection location) + (and (text.contains? (/.as_text location) located_error) (text.contains? error located_error))))) diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index fdea057ad3..a4cf96fbde 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -9,7 +9,7 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]] [collection @@ -22,7 +22,7 @@ ["[0]" static] ["[0]" location] ["[0]" symbol] - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" code (.only) ["<[1]>" \\projection]]] [test ["_" property (.only Test)]]]] @@ -160,7 +160,7 @@ ... [expansion.total expansion.log_total! full_expansion] ... )) ... (_.coverage [expansion.one] - ... (bit#= (not (n.= 1 repetitions)) + ... (bit.= (not (n.= 1 repetitions)) ... (|> (expansion.one (` (..repeated (, (code.nat repetitions)) (, pow/1)))) ... (meta.value lux) ... (!expect {try.#Failure _})))) @@ -219,7 +219,7 @@ (all _.and (_.coverage [/.symbol] (|> (/.symbol symbol_prefix) - (of meta.monad each %.code) + (of meta.monad each code.as_text) (meta.value lux) (!expect (^.multi {try.#Success actual_symbol} (and (text.contains? symbol_prefix actual_symbol) diff --git a/stdlib/source/test/lux/meta/macro/expansion.lux b/stdlib/source/test/lux/meta/macro/expansion.lux index 86c36364ec..3335d12ef0 100644 --- a/stdlib/source/test/lux/meta/macro/expansion.lux +++ b/stdlib/source/test/lux/meta/macro/expansion.lux @@ -20,7 +20,7 @@ ["[0]" random]] ["[0]" meta (.only) ["[0]" static] - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" code (.only) ["<[1]>" \\projection]] [macro ["[0]" syntax] @@ -65,7 +65,7 @@ (and (<| static.expansion (do meta.monad [it (/.one (` (..dup 0 [])))] - (in (list (code.bit (code#= (` []) + (in (list (code.bit (code.= (` []) it)))))) (<| static.expansion (do meta.monad diff --git a/stdlib/source/test/lux/meta/macro/pattern.lux b/stdlib/source/test/lux/meta/macro/pattern.lux index 2e66a983d2..85b4c5130d 100644 --- a/stdlib/source/test/lux/meta/macro/pattern.lux +++ b/stdlib/source/test/lux/meta/macro/pattern.lux @@ -6,8 +6,6 @@ [lux (.except) [abstract [monad (.only do)]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] [math ["[0]" random (.only Random)] [number diff --git a/stdlib/source/test/lux/meta/macro/syntax/check.lux b/stdlib/source/test/lux/meta/macro/syntax/check.lux index 521d27effd..56665bf211 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/check.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/check.lux @@ -14,7 +14,7 @@ [math ["[0]" random (.only Random)]] [meta - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" code (.only) ["<[1]>" \\projection]]] [test ["_" property (.only Test)]]]] @@ -49,5 +49,5 @@ false {try.#Success check} - (and (code#= type (its /.#type check)) - (code#= value (its /.#value check))))))))) + (and (code.= type (its /.#type check)) + (code.= value (its /.#value check))))))))) diff --git a/stdlib/source/test/lux/meta/macro/syntax/definition.lux b/stdlib/source/test/lux/meta/macro/syntax/definition.lux index c6e6197ad3..6fa3666e4a 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/definition.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/definition.lux @@ -16,7 +16,7 @@ ["[0]" random (.only Random)]] [meta ["[0]" location] - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" code ["<[1]>" \\projection]]] [test ["_" property (.only Test)]]]] diff --git a/stdlib/source/test/lux/meta/macro/syntax/export.lux b/stdlib/source/test/lux/meta/macro/syntax/export.lux index 43a71e5edb..2240af36e2 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/export.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/export.lux @@ -14,7 +14,7 @@ [number ["n" nat]]] [meta - ["[0]" code (.use "[1]#[0]" equivalence) + ["[0]" code (.only) ["<[1]>" \\projection]]] [test ["_" property (.only Test)]]]] @@ -46,6 +46,6 @@ (try#each (function (_ [actual_export_policy actual_un_exported]) (|> expected_export_policy (maybe.else /.default) - (code#= actual_export_policy) + (code.= actual_export_policy) (and (n.= expected_un_exported actual_un_exported))))) (try.else false)))))) diff --git a/stdlib/source/test/lux/meta/macro/template.lux b/stdlib/source/test/lux/meta/macro/template.lux index b65c42090b..e0809ca3ca 100644 --- a/stdlib/source/test/lux/meta/macro/template.lux +++ b/stdlib/source/test/lux/meta/macro/template.lux @@ -10,7 +10,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math @@ -73,7 +73,7 @@ [0] [1] [2] ))))] (and (nat.= 3 (list.size bits)) - (list.every? (bit#= true) bits)))) + (list.every? (bit.= true) bits)))) (_.coverage [/.spliced] (of (list.equivalence nat.equivalence) = (list left mid right) diff --git a/stdlib/source/test/lux/meta/module.lux b/stdlib/source/test/lux/meta/module.lux index 0b4207c173..038a6b5513 100644 --- a/stdlib/source/test/lux/meta/module.lux +++ b/stdlib/source/test/lux/meta/module.lux @@ -9,7 +9,7 @@ [control ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)] [number @@ -42,7 +42,7 @@ version (random.upper_cased 1) source_code (random.upper_cased 1) expected_current_module (random.upper_cased 1) - imported_module_name (random.only (|>> (text#= expected_current_module) not) + imported_module_name (random.only (|>> (text.= expected_current_module) not) (random.upper_cased 1)) nominal_type (random.upper_cased 1) expected_seed random.nat @@ -50,8 +50,8 @@ dummy (random.only (|>> (n.= expected) not) random.nat) expected_short (random.upper_cased 1) dummy_module (random.only (function (_ module) - (not (or (text#= expected_current_module module) - (text#= imported_module_name module)))) + (not (or (text.= expected_current_module module) + (text.= imported_module_name module)))) (random.upper_cased 1)) .let [imported_module [.#module_hash 0 .#module_aliases (list) @@ -92,7 +92,7 @@ (|> /.current (//.value expected_lux) (!expect (^.multi {try.#Success [actual_current_module actual_module]} - (and (text#= expected_current_module actual_current_module) + (and (text.= expected_current_module actual_current_module) (same? expected_module actual_module)))))) (_.coverage [/.by_name] (|> (/.by_name expected_current_module) diff --git a/stdlib/source/test/lux/meta/module/import.lux b/stdlib/source/test/lux/meta/module/import.lux index c48a90d648..de9703b6f1 100644 --- a/stdlib/source/test/lux/meta/module/import.lux +++ b/stdlib/source/test/lux/meta/module/import.lux @@ -9,7 +9,7 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list]]] [math @@ -31,7 +31,7 @@ version (random.upper_cased 1) source_code (random.upper_cased 1) expected_current_module (random.upper_cased 1) - imported_module_name (random.only (|>> (text#= expected_current_module) not) + imported_module_name (random.only (|>> (text.= expected_current_module) not) (random.upper_cased 1)) nominal_type (random.upper_cased 1) expected_seed random.nat @@ -39,8 +39,8 @@ dummy (random.only (|>> (n.= expected) not) random.nat) expected_short (random.upper_cased 1) dummy_module (random.only (function (_ module) - (not (or (text#= expected_current_module module) - (text#= imported_module_name module)))) + (not (or (text.= expected_current_module module) + (text.= imported_module_name module)))) (random.upper_cased 1)) .let [imported_module [.#module_hash 0 .#module_aliases (list) diff --git a/stdlib/source/test/lux/meta/static.lux b/stdlib/source/test/lux/meta/static.lux index 57b3894452..5841c73711 100644 --- a/stdlib/source/test/lux/meta/static.lux +++ b/stdlib/source/test/lux/meta/static.lux @@ -5,8 +5,8 @@ [library [lux (.except) [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" bit] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list (.use "[1]#[0]" mix)]]] @@ -44,7 +44,7 @@ _ false)))] - [/.bit /.random_bit bit#= and .#Bit] + [/.bit /.random_bit bit.= and .#Bit] [/.nat /.random_nat n.= n.+ .#Nat] [/.int /.random_int i.= i.+ .#Int] [/.rev /.random_rev r.= r.+ .#Rev] @@ -69,7 +69,7 @@ (/.text (%.message ))] (when (' ) [_ {.#Text l+r}] - (text#= l+r (%.message )) + (text.= l+r (%.message )) _ false))) @@ -86,7 +86,7 @@ (/.literal code.text (%.message ))] (when (' ) [_ {.#Text l+r}] - (text#= l+r (%.message )) + (text.= l+r (%.message )) _ false))) diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux index 9b1b803007..640df0f4bd 100644 --- a/stdlib/source/test/lux/meta/symbol.lux +++ b/stdlib/source/test/lux/meta/symbol.lux @@ -101,12 +101,10 @@ (let [[module _] (symbol .._) [_ short] (symbol )] [module short]))] - (let [(open "/#[0]") /.equivalence] - (/#= (symbol ') (/.of '))))) + (/.= (symbol ') (/.of ')))) (_.coverage [.symbol] - (let [(open "/#[0]") /.equivalence] - (and (/#= [.prelude "yolo"] (.symbol .yolo)) - (/#= ["test/lux/meta/symbol" "yolo"] (.symbol ..yolo)) - (/#= ["" "yolo"] (.symbol yolo)) - (/#= ["library/lux/test" "yolo"] (.symbol library/lux/test.yolo))))) + (and (/.= [.prelude "yolo"] (.symbol .yolo)) + (/.= ["test/lux/meta/symbol" "yolo"] (.symbol ..yolo)) + (/.= ["" "yolo"] (.symbol yolo)) + (/.= ["library/lux/test" "yolo"] (.symbol library/lux/test.yolo)))) ))))) diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index 4b1f2fef53..f61e98613b 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -15,8 +15,8 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list] ["[0]" array]]] @@ -25,8 +25,8 @@ [number ["n" nat]]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] - ["[0]" code (.use "[1]#[0]" equivalence)] + ["[0]" symbol] + ["[0]" code] ["[0]" static] [macro ["^" pattern] @@ -36,7 +36,7 @@ ["_" property (.only Test)]]]] ["[0]" \\projection] [\\library - ["[0]" / (.use "[1]#[0]" equivalence)]] + ["[0]" /]] ["[0]" / ["[1][0]" nominal] ["[1][0]" check] @@ -73,7 +73,7 @@ (<| (_.for [\\projection.types_do_not_match]) (do [! random.monad] [expected ..nominal - dummy (random.only (|>> (/#= expected) not) + dummy (random.only (|>> (/.= expected) not) ..nominal)]) (all _.and (_.coverage [\\projection.exactly] @@ -116,9 +116,9 @@ (and (|> (\\projection.value ( (all <>.and \\projection.any \\projection.any \\projection.any)) ( (list expected_left expected_middle expected_right))) (!expect (^.multi {try.#Success [actual_left actual_middle actual_right]} - (and (/#= expected_left actual_left) - (/#= expected_middle actual_middle) - (/#= expected_right actual_right))))) + (and (/.= expected_left actual_left) + (/.= expected_middle actual_middle) + (/.= expected_right actual_right))))) (|> (\\projection.value ( (all <>.and \\projection.any \\projection.any \\projection.any)) ( (list expected_left expected_middle expected_right))) (!expect (^.multi {try.#Failure error} @@ -132,9 +132,9 @@ (and (|> (\\projection.value (\\projection.function (all <>.and \\projection.any \\projection.any) \\projection.any) (/.function (list expected_left expected_middle) expected_right)) (!expect (^.multi {try.#Success [[actual_left actual_middle] actual_right]} - (and (/#= expected_left actual_left) - (/#= expected_middle actual_middle) - (/#= expected_right actual_right))))) + (and (/.= expected_left actual_left) + (/.= expected_middle actual_middle) + (/.= expected_right actual_right))))) (|> (\\projection.value (\\projection.function (all <>.and \\projection.any \\projection.any) \\projection.any) (/.variant (list expected_left expected_middle expected_right))) (!expect (^.multi {try.#Failure error} @@ -143,9 +143,9 @@ (and (|> (\\projection.value (\\projection.applied (all <>.and \\projection.any \\projection.any \\projection.any)) (/.application (list expected_middle expected_right) expected_left)) (!expect (^.multi {try.#Success [actual_left actual_middle actual_right]} - (and (/#= expected_left actual_left) - (/#= expected_middle actual_middle) - (/#= expected_right actual_right))))) + (and (/.= expected_left actual_left) + (/.= expected_middle actual_middle) + (/.= expected_right actual_right))))) (|> (\\projection.value (\\projection.applied (all <>.and \\projection.any \\projection.any \\projection.any)) (/.variant (list expected_left expected_middle expected_right))) (!expect (^.multi {try.#Failure error} @@ -245,7 +245,7 @@ (|> (type (Rec @ expected)) (\\projection.value (\\projection.recursive \\projection.any)) (!expect (^.multi {try.#Success [@self actual]} - (/#= expected actual))))) + (/.= expected actual))))) (_.coverage [\\projection.recursive_self] (|> (type (Rec @ @)) (\\projection.value (\\projection.recursive \\projection.recursive_self)) @@ -276,7 +276,7 @@ (_.coverage [\\projection.value \\projection.any] (|> (\\projection.value \\projection.any expected) (!expect (^.multi {try.#Success actual} - (/#= expected actual)))))) + (/.= expected actual)))))) (do [! random.monad] [expected ..nominal] (_.coverage [\\projection.next \\projection.unconsumed_input] @@ -286,7 +286,7 @@ (in actual)) expected) (!expect (^.multi {try.#Success actual} - (/#= expected actual)))) + (/.= expected actual)))) (|> (\\projection.value \\projection.next expected) (!expect (^.multi {try.#Failure error} (exception.is? \\projection.unconsumed_input error))))))) @@ -316,7 +316,7 @@ (same? \\projection.fresh environment)))))) (do [! random.monad] [expected ..nominal - dummy (random.only (|>> (/#= expected) not) + dummy (random.only (|>> (/.= expected) not) ..nominal)] (_.coverage [\\projection.local] (|> (\\projection.value (do <>.monad @@ -325,7 +325,7 @@ \\projection.any)) dummy) (!expect (^.multi {try.#Success actual} - (/#= expected actual)))))) + (/.= expected actual)))))) (do [! random.monad] [expected random.nat] (_.coverage [\\projection.existential \\projection.not_existential] @@ -341,8 +341,8 @@ (|> (\\projection.value \\projection.named {.#Named expected_name expected_type}) (!expect (^.multi {try.#Success [actual_name actual_type]} - (and (symbol#= expected_name actual_name) - (/#= expected_type actual_type))))))) + (and (symbol.= expected_name actual_name) + (/.= expected_type actual_type))))))) ..test|aggregate ..test|matches ..test|parameter @@ -469,7 +469,7 @@ (_.coverage [/.function /.flat_function] (let [[inputs output] (|> (/.function members extra) /.flat_function)] (and (list#= members inputs) - (/#= extra output)))) + (/.= extra output)))) (_.coverage [/.application /.flat_application] (let [[tfunc tparams] (|> extra (/.application members) /.flat_application)] (n.= (list.size members) (list.size tparams)))) @@ -490,7 +490,7 @@ [(_.coverage [ ] (let [[flat_size flat_body] (|> body_type ( size) )] (and (n.= size flat_size) - (/#= body_type flat_body))))] + (/.= body_type flat_body))))] [/.univ_q /.flat_univ_q] [/.ex_q /.flat_ex_q] @@ -506,7 +506,7 @@ (random.only (function (_ type) (when type {.#Nominal name (list element_type)} - (not (text#= array.nominal name)) + (not (text.= array.nominal name)) _ true)))) @@ -515,7 +515,7 @@ (_.coverage [/.array /.flat_array] (let [[flat_depth flat_element] (|> element_type (/.array depth) /.flat_array)] (and (n.= depth flat_depth) - (/#= element_type flat_element)))) + (/.= element_type flat_element)))) (_.coverage [/.array?] (and (not (/.array? element_type)) (/.array? (/.array depth element_type)))) @@ -523,7 +523,7 @@ (_.coverage [/.by_example] (let [example (is (Maybe Nat) {.#None})] - (/#= (type (List Nat)) + (/.= (type (List Nat)) (/.by_example [a] (is (Maybe a) example) @@ -568,11 +568,11 @@ right (..random 0)] (all _.and (_.coverage [/.code] - (bit#= (/#= left right) - (code#= (/.code left) (/.code right)))) + (bit.= (/.= left right) + (code.= (/.code left) (/.code right)))) (_.coverage [/.absolute_injection] - (bit#= (/#= left right) - (text#= (/.absolute_injection left) (/.absolute_injection right)))) + (bit.= (/.= left right) + (text.= (/.absolute_injection left) (/.absolute_injection right)))) )) (expansion.let [random_type (these (static.random /.code (all random.either @@ -587,10 +587,10 @@ (let [(open "/#[0]") /.equivalence] (all _.and (_.coverage [/.parameters] - (/#= (And parameter parameter) + (/.= (And parameter parameter) (/.parameters ..generalized_function [parameter return]))) (_.coverage [/.return] - (/#= return + (/.= return (/.return ..generalized_function [parameter return]))) ))) ... (_.coverage [.type] diff --git a/stdlib/source/test/lux/meta/type/brand.lux b/stdlib/source/test/lux/meta/type/brand.lux index 0892de9c57..c8d8ab949f 100644 --- a/stdlib/source/test/lux/meta/type/brand.lux +++ b/stdlib/source/test/lux/meta/type/brand.lux @@ -9,7 +9,7 @@ [math ["[0]" random (.only Random)]] [meta - ["[0]" type (.use "[1]#[0]" equivalence)]] + ["[0]" type]] [test ["_" property (.only Test)]]]] [\\library @@ -25,11 +25,11 @@ (let [$0 (/.dynamic 0) $1 (/.dynamic 1) $2 (/.dynamic 2)] - (and (not (type#= (type_of ($0 [])) (type_of ($0 [])))) - (not (type#= (type_of ($1 [])) (type_of ($1 [])))) - (not (type#= (type_of ($2 [])) (type_of ($2 []))))))) + (and (not (type.= (type_of ($0 [])) (type_of ($0 [])))) + (not (type.= (type_of ($1 [])) (type_of ($1 [])))) + (not (type.= (type_of ($2 [])) (type_of ($2 []))))))) (_.coverage [/.static] - (and (not (type#= (/.static 0) (/.static 0))) - (not (type#= (/.static 1) (/.static 1))) - (not (type#= (/.static 2) (/.static 2))))) + (and (not (type.= (/.static 0) (/.static 0))) + (not (type.= (/.static 1) (/.static 1))) + (not (type.= (/.static 2) (/.static 2))))) ))) diff --git a/stdlib/source/test/lux/meta/type/check.lux b/stdlib/source/test/lux/meta/type/check.lux index 8899c4807d..6032d011a1 100644 --- a/stdlib/source/test/lux/meta/type/check.lux +++ b/stdlib/source/test/lux/meta/type/check.lux @@ -17,9 +17,9 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor monoid)] ["[0]" set]]] @@ -34,7 +34,7 @@ ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) - ["/[1]" // (.use "[1]#[0]" equivalence)]]]) + ["/[1]" //]]]) ... TODO: Remove the following 3 definitions ASAP. //.type already exists... (the short @@ -211,7 +211,7 @@ (when (/.value /.fresh_context (do /.monad [[var_id var_type] /.var] - (in (//#= var_type {.#Var var_id})))) + (in (//.= var_type {.#Var var_id})))) {try.#Success verdict} verdict {try.#Failure error} false)) (do random.monad @@ -499,8 +499,8 @@ _ (/.check var/head nominal/0) failures (monad.each ! (|>> (/.check nominal/1) ..verdict) (list.partial var/head var/tail+)) successes (monad.each ! (|>> (/.check nominal/0) ..verdict) (list.partial var/head var/tail+))] - (/.assertion "" (and (list.every? (bit#= false) failures) - (list.every? (bit#= true) successes))))) + (/.assertion "" (and (list.every? (bit.= false) failures) + (list.every? (bit.= true) successes))))) can_merge_multiple_rings_of_variables! (succeeds? (do [! /.monad] @@ -512,8 +512,8 @@ (list.partial var/head/1 var/tail+/1))] failures (monad.each ! (|>> (/.check nominal/1) ..verdict) all_variables) successes (monad.each ! (|>> (/.check nominal/0) ..verdict) all_variables)] - (/.assertion "" (and (list.every? (bit#= false) failures) - (list.every? (bit#= true) successes)))))] + (/.assertion "" (and (list.every? (bit.= false) failures) + (list.every? (bit.= true) successes)))))] (and can_create_rings_of_variables! can_bind_rings_of_variables! can_merge_multiple_rings_of_variables!))) @@ -670,8 +670,8 @@ Test (do [! random.monad] [nominal ..nominal - [name/0 name/1] (..non_twins text#= (random.upper_cased 10)) - [parameter/0 parameter/1] (..non_twins //#= ..nominal) + [name/0 name/1] (..non_twins text.= (random.upper_cased 10)) + [parameter/0 parameter/1] (..non_twins //.= ..nominal) left_name ..symbol right_name ..symbol ring_tail_size (of ! each (n.% 10) random.nat)] @@ -742,7 +742,7 @@ (and (|> (do /.monad [[var_id varT] /.var cleanedT (/.clean (list) (type_shape varT))] - (in (//#= (type_shape varT) + (in (//.= (type_shape varT) cleanedT))) (/.value /.fresh_context) (try.else false)) @@ -751,7 +751,7 @@ [_ replacementT] /.existential _ (/.check varT replacementT) cleanedT (/.clean (list) (type_shape varT))] - (in (//#= (type_shape replacementT) + (in (//.= (type_shape replacementT) cleanedT))) (/.value /.fresh_context) (try.else false)) diff --git a/stdlib/source/test/lux/meta/type/dynamic.lux b/stdlib/source/test/lux/meta/type/dynamic.lux index d6591259ac..5420f98541 100644 --- a/stdlib/source/test/lux/meta/type/dynamic.lux +++ b/stdlib/source/test/lux/meta/type/dynamic.lux @@ -10,7 +10,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] @@ -45,7 +45,7 @@ (_.coverage [/.injection] (when (/.injection (/.dynamic expected)) {try.#Success actual} - (text#= (%.nat expected) actual) + (text.= (%.nat expected) actual) {try.#Failure _} false)) diff --git a/stdlib/source/test/lux/meta/type/implicit.lux b/stdlib/source/test/lux/meta/type/implicit.lux index 3219667172..c8f6a52723 100644 --- a/stdlib/source/test/lux/meta/type/implicit.lux +++ b/stdlib/source/test/lux/meta/type/implicit.lux @@ -11,7 +11,7 @@ [monad (.only do)] ["[0]" enum]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list]]] [math @@ -41,7 +41,7 @@ ... (_.coverage [/.any] ... (let [first_order! ... (let [(open "list#[0]") (list.equivalence n.equivalence)] - ... (and (bit#= (of n.equivalence = left right) + ... (and (bit.= (of n.equivalence = left right) ... (/.any = left right)) ... (list#= (of list.functor each ++ (enum.range n.enum start end)) ... (/.any each ++ (enum.range n.enum start end))))) diff --git a/stdlib/source/test/lux/meta/type/linear.lux b/stdlib/source/test/lux/meta/type/linear.lux index 9435828647..b4d1a219e0 100644 --- a/stdlib/source/test/lux/meta/type/linear.lux +++ b/stdlib/source/test/lux/meta/type/linear.lux @@ -15,7 +15,7 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random]] @@ -43,7 +43,7 @@ (`` (all _.and (,, (template.with [ ] [(_.coverage - (<| (text#= (%.message pre post)) + (<| (text.= (%.message pre post)) (is (Pure Text)) (/.value !) (do (/.monad !) @@ -85,7 +85,7 @@ (`` (all _.and (,, (template.with [ ] [(_.coverage - (<| (text#= (%.message pre post)) + (<| (text.= (%.message pre post)) io.value (is (IO Text)) (/.value !) @@ -134,7 +134,7 @@ (in (%.message left right))))] (unit.coverage - (text#= (%.message pre post) + (text.= (%.message pre post) outcome))))] [[/.Affine /.Key /.Res /.Ordered /.ordered diff --git a/stdlib/source/test/lux/meta/type/nominal.lux b/stdlib/source/test/lux/meta/type/nominal.lux index e43132ead5..51927f96d3 100644 --- a/stdlib/source/test/lux/meta/type/nominal.lux +++ b/stdlib/source/test/lux/meta/type/nominal.lux @@ -10,14 +10,14 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random] [number ["n" nat]]] ["[0]" meta (.only) - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] ["[0]" code (.only) ["<[1]>" \\projection]] ["[0]" macro (.only) @@ -66,7 +66,7 @@ (/.abstraction 'Foo) (is ('Foo Bit)) (/.representation 'Foo) - (text#= expected_foo)) + (text.= expected_foo)) (|> (/.abstraction expected_bar) (is ('Bar Bit)) /.representation @@ -87,10 +87,10 @@ /.#name /.#type_vars /.#abstraction /.#representation] (all _.and (_.coverage [/.current] - (symbol#= (`` (symbol (,, (template.symbol [.._] ['Bar])))) + (symbol.= (`` (symbol (,, (template.symbol [.._] ['Bar])))) (..current))) (_.coverage [/.specific] - (symbol#= (`` (symbol (,, (template.symbol [.._] ['Foo])))) + (symbol.= (`` (symbol (,, (template.symbol [.._] ['Foo])))) (..specific))) )) )))))))) diff --git a/stdlib/source/test/lux/meta/type/poly.lux b/stdlib/source/test/lux/meta/type/poly.lux index 6549be8003..109875496c 100644 --- a/stdlib/source/test/lux/meta/type/poly.lux +++ b/stdlib/source/test/lux/meta/type/poly.lux @@ -9,11 +9,11 @@ [control ["?" projection]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta ["[0]" static] ["[0]" type @@ -49,8 +49,8 @@ (all _.and (_.coverage [/.macro] false - ... (and (bit#= (constant Bit)) - ... (nat#= (constant Nat))) + ... (and (bit.= (constant Bit)) + ... (nat.= (constant Nat))) ) )))) ) diff --git a/stdlib/source/test/lux/meta/type/quotient.lux b/stdlib/source/test/lux/meta/type/quotient.lux index da736e85f9..7a93f7b3bb 100644 --- a/stdlib/source/test/lux/meta/type/quotient.lux +++ b/stdlib/source/test/lux/meta/type/quotient.lux @@ -9,12 +9,12 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] [number - ["n" nat (.use "[1]#[0]" equivalence)]]] + ["n" nat]]] [test ["_" property (.only Test)]]]] [\\library @@ -55,7 +55,7 @@ (let [quotient (/.quotient (/.class class) value)] (and (same? value (/.value quotient)) - (text#= (class value) + (text.= (class value) (/.label quotient))))) (_.coverage [/.type] (exec diff --git a/stdlib/source/test/lux/meta/type/record.lux b/stdlib/source/test/lux/meta/type/record.lux index 16d2da2139..86363db646 100644 --- a/stdlib/source/test/lux/meta/type/record.lux +++ b/stdlib/source/test/lux/meta/type/record.lux @@ -8,35 +8,17 @@ ["[0]" monad (.only do)] ["[0]" equivalence ["[1]T" \\test]]] - [control - ["<>" projection] - ["[0]" pipe] - ["[0]" maybe] - ["[0]" try] - ["[0]" exception]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] - [collection - ["[0]" list] - ["[0]" array]]] [math - ["[0]" random (.only Random) (.use "[1]#[0]" monad)] - [number - ["n" nat]]] + ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] - ["[0]" code (.use "[1]#[0]" equivalence)] ["[0]" static] [macro - ["^" pattern] - ["[0]" expansion] - ["[0]" template]]] + ["[0]" expansion]]] [test ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) - ["/[1]" // (.use "[1]#[0]" equivalence)]]]) + ["/[1]" //]]]) (every (Generalized_Record foo bar baz) (Record @@ -65,35 +47,35 @@ (let [(open "//#[0]") //.equivalence] (all _.and (_.coverage [/.member] - (and (//#= Any (/.member .#None [parameter])) - (//#= parameter (/.member .#Some [parameter])))) + (and (//.= Any (/.member .#None [parameter])) + (//.= parameter (/.member .#Some [parameter])))) (_.coverage [/.only] - (and (//#= foo + (and (//.= foo (/.only [foo bar baz] [..#foo])) - (//#= bar + (//.= bar (/.only [foo bar baz] [..#bar])) - (//#= baz + (//.= baz (/.only [foo bar baz] [..#baz])) - (//#= (And foo bar) + (//.= (And foo bar) (/.only [foo bar baz] [..#foo ..#bar])) - (//#= (And foo baz) + (//.= (And foo baz) (/.only [foo bar baz] [..#foo ..#baz])) - (//#= (And bar baz) + (//.= (And bar baz) (/.only [foo bar baz] [..#bar ..#baz])))) (_.coverage [/.except] - (and (//#= (And bar baz) + (and (//.= (And bar baz) (/.except [foo bar baz] [..#foo])) - (//#= (And foo baz) + (//.= (And foo baz) (/.except [foo bar baz] [..#bar])) - (//#= (And foo bar) + (//.= (And foo bar) (/.except [foo bar baz] [..#baz])) - (//#= baz + (//.= baz (/.except [foo bar baz] [..#foo ..#bar])) - (//#= bar + (//.= bar (/.except [foo bar baz] [..#foo ..#baz])) - (//#= foo + (//.= foo (/.except [foo bar baz] [..#bar ..#baz])))) ))) ))) diff --git a/stdlib/source/test/lux/meta/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index 95fe495ce5..b190e8a272 100644 --- a/stdlib/source/test/lux/meta/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux @@ -14,7 +14,7 @@ ["[0]" order ["[1]T" \\test]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)] @@ -77,7 +77,7 @@ (let [it (|> expected (of in) (of injection))] - (and (not (text#= (%.int expected) it)) + (and (not (text.= (%.int expected) it)) (text.starts_with? (%.int expected) it)))))] [/.Gram /.gram] diff --git a/stdlib/source/test/lux/meta/type/unit/scale.lux b/stdlib/source/test/lux/meta/type/unit/scale.lux index 98c2e90bba..ff336fc750 100644 --- a/stdlib/source/test/lux/meta/type/unit/scale.lux +++ b/stdlib/source/test/lux/meta/type/unit/scale.lux @@ -12,7 +12,7 @@ [number ["n" nat] ["i" int] - ["[0]" frac (.use "[1]#[0]" equivalence)]]] + ["[0]" frac]]] ["[0]" meta (.only) ["[0]" code] [macro @@ -101,7 +101,7 @@ (is (//.Measure How //.Meter)) (of ..how down) (meter#= unscaled)) - (frac#= [frac.#denominator ..how::from + (frac.= [frac.#denominator ..how::from frac.#numerator ..how::to] (of ..how frac)))) ))))) diff --git a/stdlib/source/test/lux/music/chord.lux b/stdlib/source/test/lux/music/chord.lux index 54a3faafa1..6f2c588460 100644 --- a/stdlib/source/test/lux/music/chord.lux +++ b/stdlib/source/test/lux/music/chord.lux @@ -11,8 +11,8 @@ [control ["[0]" maybe]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" bit] + ["[0]" text] [collection ["[0]" list] ["[0]" sequence (.only sequence)] @@ -73,8 +73,8 @@ (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.injection] - (bit#= (of /.equivalence = left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (of /.equivalence = left right) + (text.= (/.injection left) (/.injection right)))) (_.coverage [/.size] (n.> 0 (/.size left))) (_.coverage [/.monad] diff --git a/stdlib/source/test/lux/music/interval.lux b/stdlib/source/test/lux/music/interval.lux index f288a1a9c3..fd2cce0b2a 100644 --- a/stdlib/source/test/lux/music/interval.lux +++ b/stdlib/source/test/lux/music/interval.lux @@ -16,7 +16,7 @@ [math ["[0]" random (.only Random) (.use "[1]#[0]" functor)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta [macro ["[0]" expansion] @@ -56,7 +56,7 @@ (let [options (is (List /.Interval) (list )) uniques (set.of_list nat.hash options)] - (nat#= (list.size options) + (nat.= (list.size options) (set.size uniques)))) (,, (template.with [ ] [(_.coverage [] diff --git a/stdlib/source/test/lux/music/mode.lux b/stdlib/source/test/lux/music/mode.lux index 6e81c4c9b9..8b3e6be651 100644 --- a/stdlib/source/test/lux/music/mode.lux +++ b/stdlib/source/test/lux/music/mode.lux @@ -16,7 +16,7 @@ [\\library ["[0]" / (.only) [// - ["[0]" scale (.use "[1]#[0]" equivalence) + ["[0]" scale (.only) ["[1]T" \\test]]]]]) (the .public test @@ -30,11 +30,11 @@ (and (|> expected /.next /.previous - (scale#= expected)) + (scale.= expected)) (|> expected /.previous /.next - (scale#= expected)))) + (scale.= expected)))) (_.coverage [/.of?] (and (|> expected /.next diff --git a/stdlib/source/test/lux/music/note.lux b/stdlib/source/test/lux/music/note.lux index 752ad75547..1d1c5a3ba2 100644 --- a/stdlib/source/test/lux/music/note.lux +++ b/stdlib/source/test/lux/music/note.lux @@ -16,7 +16,7 @@ [math ["[0]" random (.only Random)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta [macro ["[0]" expansion] @@ -55,7 +55,7 @@ (let [options (is (List /.Value) (list )) uniques (set.of_list nat.hash options)] - (nat#= (list.size options) + (nat.= (list.size options) (set.size uniques)))) (,, (template.with [ ] [(_.coverage [] diff --git a/stdlib/source/test/lux/music/percussion.lux b/stdlib/source/test/lux/music/percussion.lux index cfd35bb8f7..7423108ff1 100644 --- a/stdlib/source/test/lux/music/percussion.lux +++ b/stdlib/source/test/lux/music/percussion.lux @@ -13,7 +13,7 @@ [math ["[0]" random (.only Random)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta [macro ["[0]" template] diff --git a/stdlib/source/test/lux/music/pitch.lux b/stdlib/source/test/lux/music/pitch.lux index b2b93354a8..d369740329 100644 --- a/stdlib/source/test/lux/music/pitch.lux +++ b/stdlib/source/test/lux/music/pitch.lux @@ -16,7 +16,7 @@ [math ["[0]" random (.only Random)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta [macro ["[0]" template] @@ -222,7 +222,7 @@ (let [options (is (List /.Class) (list )) uniques (set.of_list nat.hash options)] - (nat#= (list.size options) + (nat.= (list.size options) (set.size uniques)))) (_.coverage [/.inversion] (and (|> expected_class @@ -251,7 +251,7 @@ ,bundles)) (_.coverage [/.Octave /.pitch /.octave /.class] - (nat#= expected_pitch + (nat.= expected_pitch (/.pitch (/.octave expected_pitch) (/.class expected_pitch)))) (_.coverage [/.lowest] diff --git a/stdlib/source/test/lux/music/velocity.lux b/stdlib/source/test/lux/music/velocity.lux index ea43c17109..d3bf891a91 100644 --- a/stdlib/source/test/lux/music/velocity.lux +++ b/stdlib/source/test/lux/music/velocity.lux @@ -13,7 +13,7 @@ [math ["[0]" random (.only Random)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [meta [macro ["[0]" expansion] @@ -46,7 +46,7 @@ (let [options (is (List /.Velocity) (list )) uniques (set.of_list nat.hash options)] - (nat#= (list.size options) + (nat.= (list.size options) (set.size uniques)))) (,, (template.with [ ] [(_.coverage [] diff --git a/stdlib/source/test/lux/program.lux b/stdlib/source/test/lux/program.lux index 6a88556881..2ad7a42969 100644 --- a/stdlib/source/test/lux/program.lux +++ b/stdlib/source/test/lux/program.lux @@ -11,7 +11,7 @@ ["[0]" io] ["[0]" try]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" list]]] [math @@ -45,7 +45,7 @@ (_.for [\\projection.Projection]) (do [! random.monad] [expected (of ! each n#injection random.nat) - .let [random_dummy (random.only (|>> (text#= expected) not) + .let [random_dummy (random.only (|>> (text.= expected) not) (random.unicode 5))] dummy random_dummy short (random.unicode 1) @@ -56,11 +56,11 @@ (_.coverage [\\projection.value \\projection.any] (|> (\\projection.value \\projection.any (list expected)) (!expect (^.multi {try.#Success actual} - (text#= expected actual))))) + (text.= expected actual))))) (_.coverage [\\projection.parse] (|> (\\projection.value (\\projection.parse n#projection) (list expected)) (!expect (^.multi {try.#Success actual} - (text#= expected + (text.= expected (n#injection actual)))))) (_.coverage [\\projection.this] (and (|> (\\projection.value (\\projection.this expected) (list expected)) @@ -80,16 +80,16 @@ (_.coverage [\\projection.named] (|> (\\projection.value (\\projection.named dummy \\projection.any) (list dummy expected)) (!expect (^.multi {try.#Success actual} - (text#= expected actual))))) + (text.= expected actual))))) (_.coverage [\\projection.parameter] (and (|> (\\projection.value (\\projection.parameter [short long] \\projection.any) (list short expected)) (!expect (^.multi {try.#Success actual} - (text#= expected actual)))) + (text.= expected actual)))) (|> (\\projection.value (\\projection.parameter [short long] \\projection.any) (list long expected)) (!expect (^.multi {try.#Success actual} - (text#= expected actual)))) + (text.= expected actual)))) (|> (\\projection.value (\\projection.parameter [short long] \\projection.any) (list dummy expected)) (!expect {try.#Failure _})))) diff --git a/stdlib/source/test/lux/test/coverage.lux b/stdlib/source/test/lux/test/coverage.lux index fef3cbff82..60a7a997eb 100644 --- a/stdlib/source/test/lux/test/coverage.lux +++ b/stdlib/source/test/lux/test/coverage.lux @@ -14,7 +14,7 @@ [math ["[0]" random (.only Random)]] [meta - ["[0]" symbol (.use "[1]#[0]" equivalence)] + ["[0]" symbol] ["[0]" static] ["[0]" code (.only) ["<[1]>" \\projection]] @@ -55,7 +55,7 @@ (`` (_.coverage [/.of] (and (let [[module _] (symbol .._) [_ short] (symbol g!defined)] - (symbol#= [module short] + (symbol.= [module short] (/.of (,, (template.symbol [.._] [g!defined]))))) (exec (macro_error (/.of (,, (template.symbol [.._] [g!un_defined])))) diff --git a/stdlib/source/test/lux/test/property.lux b/stdlib/source/test/lux/test/property.lux index 469c6a23d4..535f5e6f7f 100644 --- a/stdlib/source/test/lux/test/property.lux +++ b/stdlib/source/test/lux/test/property.lux @@ -13,7 +13,7 @@ ["[0]" async] ["[0]" atom (.only Atom)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list] @@ -187,9 +187,9 @@ (/.for [/.Test]) (do [! random.monad] [expected_context (random.lower_cased 5) - expected_message/0 (random.only (|>> (text#= expected_context) not) + expected_message/0 (random.only (|>> (text.= expected_context) not) (random.lower_cased 5)) - expected_message/1 (random.only (|>> (text#= expected_message/0) not) + expected_message/1 (random.only (|>> (text.= expected_message/0) not) (random.lower_cased 5))] (all /.and (/.for [/.Seed] diff --git a/stdlib/source/test/lux/test/tally.lux b/stdlib/source/test/lux/test/tally.lux index 48617111d5..dc9be07008 100644 --- a/stdlib/source/test/lux/test/tally.lux +++ b/stdlib/source/test/lux/test/tally.lux @@ -8,7 +8,7 @@ [monad (.only do)]] [data [collection - ["[0]" set (.use "[1]#[0]" equivalence)]]] + ["[0]" set]]] [math ["[0]" random] [number @@ -68,11 +68,11 @@ (and (let [it (/.and /.success custom)] (and (n.= (++ expected_successes) (its /.#successes it)) (n.= expected_failures (its /.#failures it)) - (set#= (its /.#expected custom) (its /.#expected it)) - (set#= (its /.#actual custom) (its /.#actual it)))) + (set.= (its /.#expected custom) (its /.#expected it)) + (set.= (its /.#actual custom) (its /.#actual it)))) (let [it (/.and custom /.failure)] (and (n.= expected_successes (its /.#successes it)) (n.= (++ expected_failures) (its /.#failures it)) - (set#= (its /.#expected custom) (its /.#expected it)) - (set#= (its /.#actual custom) (its /.#actual it)))))))) + (set.= (its /.#expected custom) (its /.#expected it)) + (set.= (its /.#actual custom) (its /.#actual it)))))))) ))) diff --git a/stdlib/source/test/lux/test/unit.lux b/stdlib/source/test/lux/test/unit.lux index cf3962f350..fcfc2849ea 100644 --- a/stdlib/source/test/lux/test/unit.lux +++ b/stdlib/source/test/lux/test/unit.lux @@ -13,13 +13,14 @@ ["[0]" text (.only) ["%" \\injection]] [collection - ["[0]" set (.use "[1]#[0]" equivalence)]]] + ["[0]" set]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number ["n" nat]]] [meta ["[0]" static] + ["[0]" symbol] ["[0]" code] [macro ["[0]" expansion]]] @@ -103,9 +104,9 @@ [context_tally context_message] (/.context (/.test expected_message/0 ))] (/.coverage [/.context] - (and (set#= (its tally.#expected context_tally) + (and (set.= (its tally.#expected context_tally) (its tally.#expected reference_tally)) - (set#= (its tally.#actual context_tally) + (set.= (its tally.#actual context_tally) (its tally.#actual reference_tally)) (n.= (its tally.#successes context_tally) (its tally.#successes reference_tally)) @@ -118,14 +119,14 @@ [context_tally context_message] (<| (/.for [..dummy_target]) (/.test expected_message/0 ))] (/.coverage [/.for] - (and (set#= (its tally.#expected reference_tally) + (and (set.= (its tally.#expected reference_tally) (its tally.#expected context_tally)) - (not (set#= (its tally.#actual reference_tally) + (not (set.= (its tally.#actual reference_tally) (its tally.#actual context_tally))) (n.= (its tally.#successes reference_tally) (its tally.#successes context_tally)) (n.= (its tally.#failures reference_tally) (its tally.#failures context_tally)) - (not (text.contains? (%.symbol (symbol ..dummy_target)) reference_message)) - (text.contains? (%.symbol (symbol ..dummy_target)) context_message)))) + (not (text.contains? (symbol.as_text (symbol ..dummy_target)) reference_message)) + (text.contains? (symbol.as_text (symbol ..dummy_target)) context_message)))) ))))) diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index e7d15a2678..07467e5fb3 100644 --- a/stdlib/source/test/lux/world/console.lux +++ b/stdlib/source/test/lux/world/console.lux @@ -13,7 +13,7 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random]] @@ -116,5 +116,5 @@ (do try.monad [_ ?_ actual ?actual] - (in (text#= expected actual))))))))) + (in (text.= expected actual))))))))) ))) diff --git a/stdlib/source/test/lux/world/environment.lux b/stdlib/source/test/lux/world/environment.lux index d86a1c68eb..cf7a76075d 100644 --- a/stdlib/source/test/lux/world/environment.lux +++ b/stdlib/source/test/lux/world/environment.lux @@ -16,7 +16,7 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" dictionary] ["[0]" list]]] @@ -69,7 +69,7 @@ (|> \\projection.empty (dictionary.has property expected) (\\projection.value (\\projection.property property)) - (of try.functor each (text#= expected)) + (of try.functor each (text.= expected)) (try.else false)))) (do random.monad [property (random.alphabetic 1)] @@ -117,7 +117,7 @@ (list.every? (function (_ [key value]) (|> environment (dictionary.value key) - (maybe#each (text#= value)) + (maybe#each (text.= value)) (maybe.else false))))))))))) (_.coverage [/.unknown_environment_variable] (let [it (/.mock environment home directory)] diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux index b22502d487..e7b80a0019 100644 --- a/stdlib/source/test/lux/world/file.lux +++ b/stdlib/source/test/lux/world/file.lux @@ -17,9 +17,9 @@ [function ["[0]" predicate]]] [data - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence monoid) + ["[0]" binary (.only Binary) (.use "[1]#[0]" monoid) ["$[1]" \\test]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [encoding ["[0]" utf8 (.use "[1]#[0]" format)]]] [collection @@ -34,7 +34,7 @@ ["^" pattern]]] [world [time - ["[0]" instant (.only Instant) (.use "[1]#[0]" equivalence)]]] + ["[0]" instant (.only Instant)]]] [test ["_" property (.only Test)] ["[0]" unit]]]] @@ -62,12 +62,12 @@ (unit.coverage [/.parent] (|> (/.rooted fs parent child) (/.parent fs) - (maybe#each (text#= parent)) + (maybe#each (text.= parent)) (maybe.else false))) (unit.coverage [/.name] (|> (/.rooted fs parent child) (/.name fs) - (text#= child))) + (text.= child))) )))) (the (directory?&make_directory fs parent) @@ -111,7 +111,7 @@ (of ! each (n.= expected_file_size) pre_file_size) pre_content! - (of ! each (binary#= content) pre_content) + (of ! each (binary.= content) pre_content) _ appended? @@ -119,7 +119,7 @@ (of ! each (n.= (n.* 2 expected_file_size)) post_file_size) post_content! - (of ! each (binary#= (binary#composite content appendix)) post_content)] + (of ! each (binary.= (binary#composite content appendix)) post_content)] (in (and pre_file_size! pre_content! post_file_size! @@ -134,7 +134,7 @@ (in (<| (try.else false) (do [! try.monad] [_ modified?] - (of ! each (instant#= expected_time) last_modified)))))) + (of ! each (instant.= expected_time) last_modified)))))) (the (directory_files&sub_directories fs parent sub_dir child) (-> (/.System Async) /.Path /.Path /.Path @@ -181,11 +181,11 @@ (<| (do [! random.monad] [parent (random.numeric 2) child (random.numeric 2) - sub_dir (random.only (|>> (text#= child) not) + sub_dir (random.only (|>> (text.= child) not) (random.numeric 2)) alternate_child (random.only (predicate.and - (|>> (text#= child) not) - (|>> (text#= sub_dir) not)) + (|>> (text.= child) not) + (|>> (text.= sub_dir) not)) (random.numeric 2)) expected_file_size (of ! each (|>> (n.% 10) ++) random.nat) content ($binary.random expected_file_size) @@ -317,7 +317,7 @@ Test) (<| (do [! random.monad] [file (random.numeric 2) - dir (random.only (|>> (text#= file) not) + dir (random.only (|>> (text.= file) not) (random.numeric 2))]) in (do [! async.monad] @@ -452,7 +452,7 @@ [_ (atom.compare_and_swap! disk' (dictionary.lacks @ disk') disk)] (when (/.parent fs @) {.#Some parent} - (alert_parent! disk (list.only (|>> (text#= @) not)) parent) + (alert_parent! disk (list.only (|>> (text.= @) not)) parent) {.#None} (in {try.#Success []}))) diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 3cd49a548b..d45f7fa75f 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -14,8 +14,8 @@ [function [predicate (.only Predicate)]]] [data - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" binary (.only Binary)] + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list]]] @@ -111,7 +111,7 @@ poll/post (of watcher poll [])] (in (and (when poll/pre (list [concern actual_path]) - (and (text#= expected_path actual_path) + (and (text.= expected_path actual_path) (and (/.creation? concern) (not (/.modification? concern)) (not (/.deletion? concern)))) @@ -129,7 +129,7 @@ poll/2' (of watcher poll [])] (in (and (when poll/2 (list [concern actual_path]) - (and (text#= expected_path actual_path) + (and (text.= expected_path actual_path) (and (not (/.creation? concern)) (/.modification? concern) (not (/.deletion? concern)))) diff --git a/stdlib/source/test/lux/world/finance/interest/rate.lux b/stdlib/source/test/lux/world/finance/interest/rate.lux index 5c3a907bba..25cc30f169 100644 --- a/stdlib/source/test/lux/world/finance/interest/rate.lux +++ b/stdlib/source/test/lux/world/finance/interest/rate.lux @@ -9,8 +9,8 @@ ["[0]" monoid ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" functor)] [number @@ -52,8 +52,8 @@ ..random)) (_.coverage [/.injection] - (bit#= (d.= left right) - (text#= (/.injection left) (/.injection right)))) + (bit.= (d.= left right) + (text.= (/.injection left) (/.injection right)))) (_.coverage [/.loss? /.gain? /.break_even?] (or (and (/.loss? left) (not (/.gain? left)) diff --git a/stdlib/source/test/lux/world/finance/market/analysis.lux b/stdlib/source/test/lux/world/finance/market/analysis.lux index 17d10c31cd..d5dca5896a 100644 --- a/stdlib/source/test/lux/world/finance/market/analysis.lux +++ b/stdlib/source/test/lux/world/finance/market/analysis.lux @@ -12,8 +12,8 @@ ["n" nat]]] [world [time - ["[0]" instant (.use "[1]#[0]" equivalence)] - ["[0]" duration (.use "[1]#[0]" equivalence)] + ["[0]" instant] + ["[0]" duration] ["[0]" series (.only) ["[1]T" \\test]]]] [test @@ -34,9 +34,9 @@ .let [output (it input)]] (all _.and (_.coverage [/.Analysis] - (and (instant#= (its series.#start input) + (and (instant.= (its series.#start input) (its series.#start output)) - (duration#= (its series.#interval input) + (duration.= (its series.#interval input) (its series.#interval output)) (n.= (series.size input) (series.size output)))) diff --git a/stdlib/source/test/lux/world/finance/market/price.lux b/stdlib/source/test/lux/world/finance/market/price.lux index dcd7952b33..334c99d87c 100644 --- a/stdlib/source/test/lux/world/finance/market/price.lux +++ b/stdlib/source/test/lux/world/finance/market/price.lux @@ -13,7 +13,7 @@ [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]]] [math @@ -94,10 +94,10 @@ (/.>= subject (/.max parameter subject)))) (_.coverage [/.>] - (bit#= (/.> parameter subject) + (bit.= (/.> parameter subject) (/.< subject parameter))) (_.coverage [/.<= /.>=] - (bit#= (/.<= parameter subject) + (bit.= (/.<= parameter subject) (/.>= subject parameter))) (_.coverage [/.units /.sub_units /.of_units /.of_sub_units] diff --git a/stdlib/source/test/lux/world/finance/money.lux b/stdlib/source/test/lux/world/finance/money.lux index 06783d15d4..c07c326fd4 100644 --- a/stdlib/source/test/lux/world/finance/money.lux +++ b/stdlib/source/test/lux/world/finance/money.lux @@ -13,7 +13,7 @@ [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text (.only) ["%" \\injection]]] [math @@ -95,10 +95,10 @@ expected_subject (/.money currency.usd expected_subject)] (all _.and (_.coverage [/.>] - (bit#= (/.> expected_parameter expected_subject) + (bit.= (/.> expected_parameter expected_subject) (/.< expected_subject expected_parameter))) (_.coverage [/.<= /.>=] - (bit#= (/.<= expected_parameter expected_subject) + (bit.= (/.<= expected_parameter expected_subject) (/.>= expected_subject expected_parameter))) )) (_.coverage [/.units /.sub_units diff --git a/stdlib/source/test/lux/world/finance/trade/session.lux b/stdlib/source/test/lux/world/finance/trade/session.lux index a1b00996a4..07b33855c3 100644 --- a/stdlib/source/test/lux/world/finance/trade/session.lux +++ b/stdlib/source/test/lux/world/finance/trade/session.lux @@ -9,8 +9,8 @@ ["[0]" equivalence ["[1]T" \\test]]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" bit] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" functor)] [number @@ -77,9 +77,9 @@ (money.>= (its [/.#volume volume.#out] after) (its [/.#volume volume.#out] both)))))) (_.coverage [/.injection] - (bit#= (of /.equivalence = + (bit.= (of /.equivalence = before after) - (text#= (/.injection before) + (text.= (/.injection before) (/.injection after)))) ))) diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index b06c2a11b6..b001fda82a 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -9,7 +9,7 @@ [control ["[0]" maybe]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] [collection ["[0]" list] ["[0]" set (.only Set)]]] @@ -166,7 +166,7 @@ [key ..random .let [sample ( key)]] (_.coverage [] - (and (bit#= (its /.#pressed? sample)) + (and (bit.= (its /.#pressed? sample)) (n.= key (its /.#input sample)))))] [#0 /.release] diff --git a/stdlib/source/test/lux/world/locale.lux b/stdlib/source/test/lux/world/locale.lux index 0939806f8c..f969ef3413 100644 --- a/stdlib/source/test/lux/world/locale.lux +++ b/stdlib/source/test/lux/world/locale.lux @@ -13,7 +13,7 @@ [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["[0]" encoding (.only Encoding)]] [collection ["[0]" list]]] @@ -85,7 +85,7 @@ lt_locale (/.locale language {.#Some territory} {.#None}) le_locale (/.locale language {.#None} {.#Some encoding}) lte_locale (/.locale language {.#Some territory} {.#Some encoding})] - .let [language_check (and (text#= (language.code language) + .let [language_check (and (text.= (language.code language) (/.code l_locale)) (list.every? (|>> /.code (text.starts_with? (language.code language))) (list lt_locale le_locale lte_locale))) diff --git a/stdlib/source/test/lux/world/logging.lux b/stdlib/source/test/lux/world/logging.lux index 48438c5369..bd2c33623e 100644 --- a/stdlib/source/test/lux/world/logging.lux +++ b/stdlib/source/test/lux/world/logging.lux @@ -11,7 +11,7 @@ [concurrency ["[0]" async (.only Async) (.use "[1]#[0]" monad)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]]] [math ["[0]" random (.only Random)]] @@ -64,7 +64,7 @@ (when [logged? actual_message] [{try.#Success _} {try.#Success actual_message}] - (text#= expected_message actual_message) + (text.= expected_message actual_message) _ false))))) @@ -78,7 +78,7 @@ (when [logged? actual_message] [{try.#Success _} {try.#Success actual_message}] - (and (not (text#= expected_message actual_message)) + (and (not (text.= expected_message actual_message)) (text.contains? expected_message actual_message)) _ @@ -100,7 +100,7 @@ (when [logged? actual_message] [{try.#Success _} {try.#Success actual_message}] - (text#= (text.suffix expected_appendix expected_message) + (text.= (text.suffix expected_appendix expected_message) actual_message) _ diff --git a/stdlib/source/test/lux/world/net/http/cookie.lux b/stdlib/source/test/lux/world/net/http/cookie.lux index 6257f7fd8d..56e9c12ce2 100644 --- a/stdlib/source/test/lux/world/net/http/cookie.lux +++ b/stdlib/source/test/lux/world/net/http/cookie.lux @@ -12,7 +12,7 @@ ["|" pipe] ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence)] + ["[0]" text] [collection ["[0]" dictionary] ["[0]" list]]] @@ -76,7 +76,7 @@ (|> /.empty (/.has cookie expected) (/.value cookie) - (try#each (text#= expected)) + (try#each (text.= expected)) (try.else false))) (_.coverage [/.unknown] (|> /.empty @@ -93,7 +93,7 @@ (|> /.empty (/.has ( cookie) expected) (/.value cookie) - (try#each (text#= expected)) + (try#each (text.= expected)) (try.else false)))] [/.expires instant] @@ -106,7 +106,7 @@ (|> /.empty (/.has ( cookie) expected) (/.value cookie) - (try#each (text#= expected)) + (try#each (text.= expected)) (try.else false)))] [/.secure] @@ -119,7 +119,7 @@ (|> /.empty (/.has (/.same_site it cookie) expected) (/.value cookie) - (try#each (text#= expected)) + (try#each (text.= expected)) (try.else false))))] (and (uses_policy! /.strict) (uses_policy! /.lax) diff --git a/stdlib/source/test/lux/world/net/http/header.lux b/stdlib/source/test/lux/world/net/http/header.lux index 1664db2c4a..3872173aff 100644 --- a/stdlib/source/test/lux/world/net/http/header.lux +++ b/stdlib/source/test/lux/world/net/http/header.lux @@ -11,11 +11,11 @@ ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] [data - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number - ["[0]" nat (.use "[1]#[0]" equivalence)]]] + ["[0]" nat]]] [test ["_" property (.only Test)]]]] [\\library @@ -23,7 +23,7 @@ [// ["[0]" cookie (.only Cookie)] [// - ["[0]" mime (.use "[1]#[0]" equivalence)]]]]]) + ["[0]" mime]]]]]) (the .public test Test @@ -61,19 +61,19 @@ (|> /.empty (/.has /.content_length expected_content_length) (/.one /.content_length) - (try#each (nat#= expected_content_length)) + (try#each (nat.= expected_content_length)) (try.else false))) (_.coverage [/.content_type] (|> /.empty (/.has /.content_type expected_content_type) (/.one /.content_type) - (try#each (mime#= expected_content_type)) + (try#each (mime.= expected_content_type)) (try.else false))) (_.coverage [/.location] (|> /.empty (/.has /.location expected_location) (/.one /.location) - (try#each (text#= expected_location)) + (try#each (text.= expected_location)) (try.else false))) (do ! [name (random.upper_cased 1) diff --git a/stdlib/source/test/lux/world/net/http/request.lux b/stdlib/source/test/lux/world/net/http/request.lux index 4619eab75d..2fe4f06c0c 100644 --- a/stdlib/source/test/lux/world/net/http/request.lux +++ b/stdlib/source/test/lux/world/net/http/request.lux @@ -11,7 +11,7 @@ ["[0]" pure (.only Pure)] ["[0]" try]] [data - ["[0]" binary (.use "[1]#[0]" equivalence)] + ["[0]" binary] [text [encoding ["[0]" utf8 (.use "[1]#[0]" format)]]] @@ -32,9 +32,9 @@ ["/[1]" // (.only) ["[0]" header] [// - ["[0]" mime (.use "[1]#[0]" equivalence)] + ["[0]" mime] [uri - ["[0]" scheme (.use "[1]#[0]" equivalence)] + ["[0]" scheme] ["[0]" query (.use "[1]#[0]" format) ["[1]T" \\test]]]]]]]) @@ -67,13 +67,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.utf_8 actual) + (mime.= mime.utf_8 actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection expected_text) + (binary.= (utf8#injection expected_text) actual) {try.#Failure error} @@ -86,13 +86,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.json actual) + (mime.= mime.json actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection (json#injection expected_json)) + (binary.= (utf8#injection (json#injection expected_json)) actual) {try.#Failure error} @@ -105,13 +105,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.form actual) + (mime.= mime.form actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection (query#injection expected_form)) + (binary.= (utf8#injection (query#injection expected_form)) actual) {try.#Failure error} @@ -123,19 +123,19 @@ ( (/.utf8 pure.monad expected_text)))] (and (|> it (its [/.#protocol /.#scheme]) - (scheme#= )) + (scheme.= )) (|> it (its [/.#message //.#headers]) (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.utf_8 actual) + (mime.= mime.utf_8 actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection expected_text) + (binary.= (utf8#injection expected_text) actual) {try.#Failure error} @@ -162,13 +162,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.utf_8 actual) + (mime.= mime.utf_8 actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection expected_text) + (binary.= (utf8#injection expected_text) actual) {try.#Failure error} @@ -196,13 +196,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.utf_8 actual) + (mime.= mime.utf_8 actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection expected_text) + (binary.= (utf8#injection expected_text) actual) {try.#Failure error} @@ -226,13 +226,13 @@ (header.one header.content_type) (|.when {try.#Success actual} - (mime#= mime.utf_8 actual) + (mime.= mime.utf_8 actual) {try.#Failure error} false)) (when ((its [/.#message //.#body] it) {.#None}) {try.#Success [_ actual]} - (binary#= (utf8#injection expected_text) + (binary.= (utf8#injection expected_text) actual) {try.#Failure error} diff --git a/stdlib/source/test/lux/world/net/http/response.lux b/stdlib/source/test/lux/world/net/http/response.lux index cd5f04bfc5..8454766e9f 100644 --- a/stdlib/source/test/lux/world/net/http/response.lux +++ b/stdlib/source/test/lux/world/net/http/response.lux @@ -12,11 +12,11 @@ ["[0]" async]]] [data ["[0]" product] - ["[0]" binary (.use "[1]#[0]" equivalence)] + ["[0]" binary] ["[0]" color [rgb ["[1]T" \\test]]] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) [encoding ["[0]" utf8 (.use "[1]#[0]" format)]]] [format @@ -44,7 +44,7 @@ ["[0]" header] ["[0]" status] [// - ["[0]" mime (.use "[1]#[0]" equivalence)]]]]] + ["[0]" mime]]]]] [// ["[0]T" status] [// @@ -89,7 +89,7 @@ (|> response (its [/.#message //.#headers]) (header.one header.content_type) - (try#each (mime#= )) + (try#each (mime.= )) (try.else false)))))] [/.empty (/.empty async.monad expected_status) expected_status 0 mime.utf_8] @@ -104,7 +104,7 @@ (|> response (its [/.#message //.#headers]) (header.one header.location) - (try#each (text#= expected_url)) + (try#each (text.= expected_url)) (try.else false))))) (in (do async.monad [.let [response (/.text async.monad utf8)] @@ -119,11 +119,11 @@ (|> response (its [/.#message //.#headers]) (header.one header.content_type) - (try#each (mime#= mime.utf_8)) + (try#each (mime.= mime.utf_8)) (try.else false)) (|> body (try#each (|>> product.right - (binary#= utf8_data))) + (binary.= utf8_data))) (try.else false)))))) (in (do async.monad [.let [response (/.html async.monad expected_html) @@ -142,11 +142,11 @@ (|> response (its [/.#message //.#headers]) (header.one header.content_type) - (try#each (mime#= mime.html)) + (try#each (mime.= mime.html)) (try.else false)) (|> body (try#each (|>> product.right - (binary#= data))) + (binary.= data))) (try.else false)))))) (in (do async.monad [.let [response (/.json async.monad expected_json) @@ -165,11 +165,11 @@ (|> response (its [/.#message //.#headers]) (header.one header.content_type) - (try#each (mime#= mime.json)) + (try#each (mime.= mime.json)) (try.else false)) (|> body (try#each (|>> product.right - (binary#= data))) + (binary.= data))) (try.else false)))))) (in (do async.monad [.let [response (/.css async.monad expected_css) @@ -188,10 +188,10 @@ (|> response (its [/.#message //.#headers]) (header.one header.content_type) - (try#each (mime#= mime.css)) + (try#each (mime.= mime.css)) (try.else false)) (|> body (try#each (|>> product.right - (binary#= data))) + (binary.= data))) (try.else false)))))) )))) diff --git a/stdlib/source/test/lux/world/net/http/server.lux b/stdlib/source/test/lux/world/net/http/server.lux index ff2164112b..e966e7d5a2 100644 --- a/stdlib/source/test/lux/world/net/http/server.lux +++ b/stdlib/source/test/lux/world/net/http/server.lux @@ -12,16 +12,16 @@ [concurrency ["[0]" async (.only Async)]]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection] [encoding ["[0]" utf8 (.use "[1]#[0]" format)]]] - ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence) + ["[0]" binary (.only Binary) ["[1]T" \\test]] [collection ["[0]" dictionary]] [format - ["[0]" json (.use "[1]#[0]" equivalence format) + ["[0]" json (.use "[1]#[0]" format) ["?[1]" \\projection] ["[1]T" \\test]]]] [math @@ -154,7 +154,7 @@ (when good_body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -193,7 +193,7 @@ (when good_body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -246,7 +246,7 @@ (when good_body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -274,7 +274,7 @@ (when http_body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -287,7 +287,7 @@ (when https_body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -313,7 +313,7 @@ (when body {try.#Success [actual_data_size actual_data]} (and (n.= expected_data_size actual_data_size) - (binary#= expected_data actual_data)) + (binary.= expected_data actual_data)) {try.#Failure error} false) @@ -340,7 +340,7 @@ (do try.monad [[_ actual_value] body actual_value (utf8#projection actual_value)] - (in (text#= expected_value actual_value)))) + (in (text.= expected_value actual_value)))) ))))) (do ! [expected (random.lower_cased 7)] @@ -357,7 +357,7 @@ (do try.monad [[_ actual] body actual (utf8#projection actual)] - (in (text#= expected actual)))) + (in (text.= expected actual)))) ))))) (do ! [expected jsonT.random] @@ -376,7 +376,7 @@ [[_ actual] body actual (utf8#projection actual) actual (json#projection actual)] - (in (json#= expected actual)))) + (in (json.= expected actual)))) ))))) (do ! [expected_property (random.lower_cased 8) @@ -396,6 +396,6 @@ (do try.monad [[_ actual_value] body actual_value (utf8#projection actual_value)] - (in (text#= expected_value actual_value)))) + (in (text.= expected_value actual_value)))) ))))) )))) diff --git a/stdlib/source/test/lux/world/net/uri/encoding.lux b/stdlib/source/test/lux/world/net/uri/encoding.lux index 1c2f783360..1787dd6fd9 100644 --- a/stdlib/source/test/lux/world/net/uri/encoding.lux +++ b/stdlib/source/test/lux/world/net/uri/encoding.lux @@ -10,7 +10,7 @@ ["[0]" maybe] ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list] @@ -47,12 +47,12 @@ (_.coverage [/.reserved] (not (set.empty? /.reserved))) (_.coverage [/.injection] - (and (text#= safe (/.injection safe)) - (not (text#= unsafe (/.injection unsafe))))) + (and (text.= safe (/.injection safe)) + (not (text.= unsafe (/.injection unsafe))))) (_.coverage [/.projection] (|> unsafe /.injection /.projection - (try#each (text#= unsafe)) + (try#each (text.= unsafe)) (try.else false))) ))) diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index 87ec9e1d7c..c344804a64 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -14,7 +14,7 @@ ["[0]" async (.only Async) (.use "[1]#[0]" monad)]]] [data ["[0]" product] - ["[0]" text (.use "[1]#[0]" equivalence) + ["[0]" text (.only) ["%" \\injection]] [collection ["[0]" list]]] @@ -57,7 +57,7 @@ (the (can_read! expected process) (-> Text (/.Process Async) (Async Bit)) (|> (of process read []) - (async#each (|>> (try#each (text#= expected)) + (async#each (|>> (try#each (text.= expected)) (try.else false))))) (the (can_destroy! process) @@ -192,7 +192,7 @@ false {try.#Failure write} - (text#= input write))})) + (text.= input write))})) destroyed! (do ! [destroy (of process destroy [])] (in {try.#Success (when destroy @@ -200,10 +200,10 @@ false {try.#Failure destroy} - (text#= destruction destroy))})) + (text.= destruction destroy))})) await (of process await [])] - (in (and (text#= command read) - (text#= oops failure) + (in (and (text.= command read) + (text.= oops failure) wrote! destroyed! (i.= exit await))))] diff --git a/stdlib/source/test/lux/world/time/duration.lux b/stdlib/source/test/lux/world/time/duration.lux index 4879cdcfb3..422ad895ca 100644 --- a/stdlib/source/test/lux/world/time/duration.lux +++ b/stdlib/source/test/lux/world/time/duration.lux @@ -19,7 +19,7 @@ [control ["[0]" try (.use "[1]#[0]" functor)]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] + ["[0]" bit] ["[0]" text ["?[1]" \\projection]]] [math @@ -56,32 +56,30 @@ (_.coverage [/.of_millis /.millis] (|> duration /.millis /.of_millis (of /.equivalence = duration)))) (do random.monad - [.let [(open "#[0]") /.equivalence] - expected /.random + [expected /.random parameter /.random] (all _.and (_.coverage [/.composite /.difference] - (|> expected (/.composite parameter) (/.difference parameter) (#= expected))) + (|> expected (/.composite parameter) (/.difference parameter) (/.= expected))) (_.coverage [/.empty] - (|> expected (/.composite /.empty) (#= expected))) + (|> expected (/.composite /.empty) (/.= expected))) (_.coverage [/.inverse] - (and (|> expected /.inverse /.inverse (#= expected)) - (|> expected (/.composite (/.inverse expected)) (#= /.empty)))) + (and (|> expected /.inverse /.inverse (/.= expected)) + (|> expected (/.composite (/.inverse expected)) (/.= /.empty)))) (_.coverage [/.positive? /.negative? /.neutral?] - (or (bit#= (/.positive? expected) + (or (bit.= (/.positive? expected) (/.negative? (/.inverse expected))) - (bit#= (/.neutral? expected) + (bit.= (/.neutral? expected) (/.neutral? (/.inverse expected))))) )) (do random.monad - [.let [(open "#[0]") /.equivalence] - factor random.nat] + [factor random.nat] (_.coverage [/.up /.down] - (|> /.milli_second (/.up factor) (/.down factor) (#= /.milli_second)))) + (|> /.milli_second (/.up factor) (/.down factor) (/.= /.milli_second)))) (do [! random.monad] - [.let [(open "#[0]") /.order + [.let [(open "/#[0]") /.order positive (|> /.random - (random.only (|>> (#= /.empty) not)) + (random.only (|>> (/.= /.empty) not)) (of ! each (function (_ duration) (if (/.positive? duration) duration @@ -91,13 +89,13 @@ (`` (all _.and (_.coverage [/.framed] (let [sample' (/.framed frame sample)] - (and (#< frame sample') - (bit#= (#< frame sample) - (#= sample sample'))))) + (and (/#< frame sample') + (bit.= (/#< frame sample) + (/.= sample sample'))))) (_.coverage [/.ticks] (i.= +1 (/.ticks sample sample))) (_.coverage [/.milli_second] - (#= /.empty (of /.enum pred /.milli_second))) + (/.= /.empty (of /.enum pred /.milli_second))) (,, (template.with [ ] [(_.coverage [] (|> (/.ticks ) (i.= )))] diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux index 431a1a3aa9..61b67e5d78 100644 --- a/stdlib/source/test/lux/world/time/instant.lux +++ b/stdlib/source/test/lux/world/time/instant.lux @@ -52,32 +52,29 @@ (formatT.spec /.equivalence /.format /.random)) (do random.monad - [.let [(open "/#[0]") /.equivalence] - expected /.random] + [expected /.random] (all _.and (_.coverage [/.millis /.of_millis] - (|> expected /.millis /.of_millis (/#= expected))) + (|> expected /.millis /.of_millis (/.= expected))) (_.coverage [/.relative /.absolute] - (|> expected /.relative /.absolute (/#= expected))) + (|> expected /.relative /.absolute (/.= expected))) (_.coverage [/.date /.time /.of_date_time] - (/#= expected + (/.= expected (/.of_date_time (/.date expected) (/.time expected)))) )) (do random.monad - [.let [(open "/#[0]") /.equivalence - (open "duration#[0]") duration.equivalence] - from /.random + [from /.random to /.random] (all _.and (_.coverage [/.span] - (|> from (/.span from) (duration#= duration.empty))) + (|> from (/.span from) (duration.= duration.empty))) (_.coverage [/.before] - (|> from (/.before (/.span to from)) (/#= to))) + (|> from (/.before (/.span to from)) (/.= to))) (_.coverage [/.after] - (|> from (/.after (/.span from to)) (/#= to))) + (|> from (/.after (/.span from to)) (/.= to))) (_.coverage [/.epoch] - (duration#= (/.relative to) + (duration.= (/.relative to) (/.span /.epoch to))) )) (do random.monad @@ -101,7 +98,7 @@ instant_shift (|> instant (/.after (polarity (duration.up steps duration.day))) /.day_of_week)] - (day#= day_shift + (day.= day_shift instant_shift))))] (and (apply function.identity day#succ 0) (apply function.identity day#succ 1) diff --git a/stdlib/source/test/lux/world/time/series.lux b/stdlib/source/test/lux/world/time/series.lux index 56a6c5e1d5..4db002cabb 100644 --- a/stdlib/source/test/lux/world/time/series.lux +++ b/stdlib/source/test/lux/world/time/series.lux @@ -97,7 +97,7 @@ (instant#< (/.end expected_series) (/.start expected_series))) (_.coverage [/.at] - (and (instant#= (/.at 0 expected_series) + (and (instant.= (/.at 0 expected_series) (/.start expected_series)) (instant#< (/.at (-- expected_size) expected_series) (/.start expected_series)))) diff --git a/stdlib/source/test/lux/world/time/series/average.lux b/stdlib/source/test/lux/world/time/series/average.lux index 6e370f1448..e9aa438241 100644 --- a/stdlib/source/test/lux/world/time/series/average.lux +++ b/stdlib/source/test/lux/world/time/series/average.lux @@ -18,7 +18,7 @@ [world [time ["[0]" instant (.use "[1]#[0]" order)] - ["[0]" duration (.use "[1]#[0]" equivalence)]]] + ["[0]" duration]]] [test ["_" property (.only Test)]]]] [\\library @@ -68,7 +68,7 @@ (all _.and (_.coverage [/.cumulative] (let [output (/.cumulative input)] - (and (instant#= (//.start input) + (and (instant.= (//.start input) (//.start output)) (n.= (//.size input) (//.size output))))) diff --git a/stdlib/source/test/lux/world/time/solar.lux b/stdlib/source/test/lux/world/time/solar.lux index 42dfd25338..0a18dcc8fd 100644 --- a/stdlib/source/test/lux/world/time/solar.lux +++ b/stdlib/source/test/lux/world/time/solar.lux @@ -11,8 +11,7 @@ ["[0]" exception] ["[0]" io]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - ["[0]" text (.use "[1]#[0]" equivalence)]] + ["[0]" text]] [math ["[0]" random (.only Random)] [number @@ -47,7 +46,7 @@ (io.value (do io.monad [zone /.local_zone it /.now] - (in (text#= zone (/.zone it)))))) + (in (text.= zone (/.zone it)))))) (_.coverage [/.injection /.universal /.offset] (io.value (do io.monad [zone /.local_zone diff --git a/stdlib/source/test/lux/world/time/year.lux b/stdlib/source/test/lux/world/time/year.lux index 44e6b45b2c..e8485369bd 100644 --- a/stdlib/source/test/lux/world/time/year.lux +++ b/stdlib/source/test/lux/world/time/year.lux @@ -16,7 +16,7 @@ ["[0]" try] ["[0]" exception]] [data - ["[0]" bit (.use "[1]#[0]" equivalence)]] + ["[0]" bit]] [math ["[0]" random (.only Random)] [number @@ -47,7 +47,7 @@ [expected random.int] (all _.and (_.coverage [/.year] - (bit#= (i.= +0 expected) + (bit.= (i.= +0 expected) (when (/.year expected) {try.#Success _} false diff --git a/to_do.md b/to_do.md index ba2c4f5233..b69f972f6f 100644 --- a/to_do.md +++ b/to_do.md @@ -38,11 +38,13 @@ 0. Implement extensible pattern-matching in the compiler, guided by the experiment in `control/pattern`. 0. Dissolve `math/random` into the rest of the standard library. 0. Dissolve `injection/.../text` into the rest of the standard library. -0. Add a `=` definition to every module that has an `Equivalence`. 0. Add `<`, `<=`, `>`, `>=` definitions to every module that has an `Order`. +0. Fix bug wherein two imported modules can have the same alias. ## Done +0. Add a `=` definition to every module that has an `Equivalence`. +0. [(Commit)](https://github.com/LuxLang/lux/commit/ad2bd2abad4d7e014791257af066aa964c5c5aa5) Eliminated the bootstrapping compiler 0. [(Commit)](https://github.com/LuxLang/lux/commit/90bdd8c16e6864f36dfe44b716c48266a44549c4) Better syntax for the `.when#` extension. 0. [(Commit)](https://github.com/LuxLang/lux/commit/3b9cad357e2dcc44a42d5fa01cc380908b08970a) Re-name the `left` and `right` macros in the prelude. Also, get rid of their highlighting in `lux-mode`. 0. [(Commit)](https://github.com/LuxLang/lux/commit/6de33f8b2c7b3804be4bd5ec04fb3c4b0a3efe79) Make type-normalization no longer confuse local type parameters with globally-defined types/macros.