From 0d909187d5b9effcd08f533d50af7d29c0d6bfd8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Apr 2022 05:42:36 -0400 Subject: De-sigil-ification: $ --- stdlib/source/documentation/lux.lux | 24 +- stdlib/source/documentation/lux/macro/syntax.lux | 46 +- stdlib/source/documentation/lux/math/logic.lux | 28 +- stdlib/source/documentation/lux/world.lux | 58 +- stdlib/source/library/lux.lux | 190 +-- stdlib/source/library/lux/abstract/apply.lux | 2 +- stdlib/source/library/lux/abstract/comonad.lux | 2 +- stdlib/source/library/lux/abstract/monad.lux | 4 +- stdlib/source/library/lux/abstract/predicate.lux | 16 +- .../source/library/lux/control/concatenative.lux | 12 +- .../library/lux/control/concurrency/actor.lux | 38 +- .../library/lux/control/concurrency/thread.lux | 6 +- stdlib/source/library/lux/control/exception.lux | 44 +- .../source/library/lux/control/function/inline.lux | 10 +- .../source/library/lux/control/function/mutual.lux | 10 +- .../source/library/lux/control/parser/binary.lux | 2 +- stdlib/source/library/lux/control/parser/code.lux | 18 +- stdlib/source/library/lux/control/parser/text.lux | 22 +- stdlib/source/library/lux/control/parser/tree.lux | 2 +- stdlib/source/library/lux/control/parser/type.lux | 2 +- stdlib/source/library/lux/control/remember.lux | 22 +- .../library/lux/control/security/capability.lux | 6 +- stdlib/source/library/lux/control/try.lux | 6 +- .../lux/data/collection/dictionary/ordered.lux | 8 +- stdlib/source/library/lux/data/collection/list.lux | 4 +- .../library/lux/data/collection/tree/zipper.lux | 16 +- stdlib/source/library/lux/data/color.lux | 18 +- stdlib/source/library/lux/data/format/binary.lux | 2 +- stdlib/source/library/lux/data/format/html.lux | 44 +- stdlib/source/library/lux/data/format/json.lux | 106 +- stdlib/source/library/lux/data/format/tar.lux | 140 +- stdlib/source/library/lux/data/format/xml.lux | 136 +- stdlib/source/library/lux/data/product.lux | 2 +- stdlib/source/library/lux/data/sum.lux | 2 +- stdlib/source/library/lux/data/text.lux | 6 +- stdlib/source/library/lux/data/text/format.lux | 2 +- stdlib/source/library/lux/data/text/regex.lux | 176 +-- .../source/library/lux/data/text/unicode/set.lux | 18 +- stdlib/source/library/lux/debug.lux | 140 +- stdlib/source/library/lux/documentation.lux | 204 +-- stdlib/source/library/lux/extension.lux | 12 +- stdlib/source/library/lux/ffi.jvm.lux | 242 ++-- stdlib/source/library/lux/ffi.lux | 70 +- stdlib/source/library/lux/ffi.old.lux | 256 ++-- stdlib/source/library/lux/ffi.php.lux | 62 +- stdlib/source/library/lux/ffi.scm.lux | 42 +- stdlib/source/library/lux/ffi/export.js.lux | 12 +- stdlib/source/library/lux/ffi/export.jvm.lux | 34 +- stdlib/source/library/lux/ffi/export.lua.lux | 28 +- stdlib/source/library/lux/ffi/export.py.lux | 6 +- stdlib/source/library/lux/ffi/export.rb.lux | 18 +- stdlib/source/library/lux/ffi/node_js.js.lux | 8 +- stdlib/source/library/lux/macro.lux | 4 +- stdlib/source/library/lux/macro/code.lux | 20 +- stdlib/source/library/lux/macro/syntax.lux | 16 +- stdlib/source/library/lux/macro/syntax/check.lux | 8 +- .../library/lux/macro/syntax/declaration.lux | 8 +- .../source/library/lux/macro/syntax/definition.lux | 28 +- stdlib/source/library/lux/macro/syntax/input.lux | 16 +- stdlib/source/library/lux/macro/template.lux | 24 +- stdlib/source/library/lux/math/infix.lux | 80 +- stdlib/source/library/lux/math/modular.lux | 10 +- stdlib/source/library/lux/math/number/frac.lux | 32 +- stdlib/source/library/lux/math/number/ratio.lux | 6 +- stdlib/source/library/lux/math/number/rev.lux | 8 +- stdlib/source/library/lux/meta.lux | 146 +- stdlib/source/library/lux/meta/location.lux | 14 +- stdlib/source/library/lux/meta/symbol.lux | 2 +- stdlib/source/library/lux/target/jvm/attribute.lux | 32 +- .../library/lux/target/jvm/attribute/code.lux | 84 +- .../lux/target/jvm/attribute/code/exception.lux | 82 +- .../lux/target/jvm/bytecode/environment/limit.lux | 26 +- .../lux/target/jvm/bytecode/instruction.lux | 28 +- stdlib/source/library/lux/target/jvm/class.lux | 60 +- stdlib/source/library/lux/target/jvm/constant.lux | 14 +- stdlib/source/library/lux/target/jvm/field.lux | 26 +- stdlib/source/library/lux/target/jvm/method.lux | 28 +- .../source/library/lux/target/jvm/type/alias.lux | 80 +- stdlib/source/library/lux/target/jvm/type/lux.lux | 90 +- .../source/library/lux/target/jvm/type/parser.lux | 66 +- stdlib/source/library/lux/time.lux | 36 +- stdlib/source/library/lux/time/date.lux | 8 +- stdlib/source/library/lux/time/day.lux | 8 +- stdlib/source/library/lux/time/duration.lux | 24 +- stdlib/source/library/lux/time/instant.lux | 6 +- stdlib/source/library/lux/time/month.lux | 8 +- .../library/lux/tool/compiler/default/platform.lux | 14 +- .../library/lux/tool/compiler/language/lux.lux | 110 +- .../compiler/language/lux/analysis/complex.lux | 12 +- .../tool/compiler/language/lux/analysis/scope.lux | 2 +- .../language/lux/phase/analysis/function.lux | 2 +- .../language/lux/phase/analysis/reference.lux | 2 +- .../language/lux/phase/extension/analysis/js.lux | 14 +- .../language/lux/phase/extension/analysis/jvm.lux | 282 ++-- .../language/lux/phase/extension/analysis/lua.lux | 14 +- .../language/lux/phase/extension/analysis/lux.lux | 10 +- .../language/lux/phase/extension/analysis/php.lux | 14 +- .../lux/phase/extension/analysis/python.lux | 14 +- .../language/lux/phase/extension/analysis/ruby.lux | 10 +- .../lux/phase/extension/analysis/scheme.lux | 6 +- .../language/lux/phase/extension/directive/jvm.lux | 546 ++++---- .../language/lux/phase/extension/directive/lux.lux | 10 +- .../extension/generation/common_lisp/common.lux | 4 +- .../lux/phase/extension/generation/js/common.lux | 18 +- .../lux/phase/extension/generation/js/host.lux | 22 +- .../lux/phase/extension/generation/jvm.lux | 8 +- .../lux/phase/extension/generation/jvm/common.lux | 242 ++-- .../lux/phase/extension/generation/jvm/host.lux | 430 +++--- .../lux/phase/extension/generation/lua/common.lux | 12 +- .../lux/phase/extension/generation/lua/host.lux | 10 +- .../lux/phase/extension/generation/php/common.lux | 12 +- .../lux/phase/extension/generation/php/host.lux | 10 +- .../phase/extension/generation/python/common.lux | 26 +- .../lux/phase/extension/generation/python/host.lux | 10 +- .../lux/phase/extension/generation/r/common.lux | 4 +- .../lux/phase/extension/generation/ruby/common.lux | 24 +- .../lux/phase/extension/generation/ruby/host.lux | 6 +- .../phase/extension/generation/scheme/common.lux | 12 +- .../lux/phase/extension/generation/scheme/host.lux | 2 +- .../lux/phase/generation/common_lisp/case.lux | 12 +- .../generation/common_lisp/extension/common.lux | 6 +- .../lux/phase/generation/common_lisp/runtime.lux | 18 +- .../language/lux/phase/generation/js/case.lux | 88 +- .../language/lux/phase/generation/js/function.lux | 64 +- .../language/lux/phase/generation/js/loop.lux | 30 +- .../language/lux/phase/generation/js/runtime.lux | 630 ++++----- .../language/lux/phase/generation/jvm/case.lux | 238 ++-- .../language/lux/phase/generation/jvm/function.lux | 40 +- .../generation/jvm/function/field/constant.lux | 36 +- .../generation/jvm/function/field/variable.lux | 66 +- .../jvm/function/field/variable/count.lux | 34 +- .../jvm/function/field/variable/partial.lux | 16 +- .../lux/phase/generation/jvm/function/method.lux | 20 +- .../phase/generation/jvm/function/method/apply.lux | 132 +- .../jvm/function/method/implementation.lux | 18 +- .../phase/generation/jvm/function/method/init.lux | 22 +- .../phase/generation/jvm/function/method/new.lux | 32 +- .../phase/generation/jvm/function/method/reset.lux | 60 +- .../language/lux/phase/generation/jvm/host.lux | 12 +- .../language/lux/phase/generation/jvm/loop.lux | 54 +- .../language/lux/phase/generation/jvm/program.lux | 130 +- .../lux/phase/generation/jvm/reference.lux | 10 +- .../language/lux/phase/generation/jvm/runtime.lux | 490 +++---- .../language/lux/phase/generation/jvm/value.lux | 22 +- .../language/lux/phase/generation/lua/case.lux | 70 +- .../language/lux/phase/generation/lua/function.lux | 96 +- .../language/lux/phase/generation/lua/loop.lux | 26 +- .../language/lux/phase/generation/lua/runtime.lux | 240 ++-- .../language/lux/phase/generation/php/case.lux | 62 +- .../language/lux/phase/generation/php/function.lux | 62 +- .../language/lux/phase/generation/php/loop.lux | 22 +- .../language/lux/phase/generation/php/runtime.lux | 432 +++--- .../language/lux/phase/generation/python/case.lux | 90 +- .../lux/phase/generation/python/function.lux | 54 +- .../language/lux/phase/generation/python/loop.lux | 22 +- .../lux/phase/generation/python/runtime.lux | 240 ++-- .../language/lux/phase/generation/r/case.lux | 40 +- .../language/lux/phase/generation/r/function.lux | 118 +- .../language/lux/phase/generation/r/loop.lux | 78 +- .../lux/phase/generation/r/procedure/common.lux | 2 +- .../language/lux/phase/generation/r/runtime.lux | 684 +++++----- .../language/lux/phase/generation/ruby/case.lux | 114 +- .../lux/phase/generation/ruby/function.lux | 58 +- .../language/lux/phase/generation/ruby/loop.lux | 72 +- .../language/lux/phase/generation/ruby/runtime.lux | 384 +++--- .../lux/phase/generation/scheme/runtime.lux | 14 +- .../lux/tool/compiler/language/lux/syntax.lux | 2 +- .../lux/tool/compiler/language/lux/synthesis.lux | 92 +- .../compiler/language/lux/synthesis/access.lux | 8 +- .../language/lux/synthesis/access/member.lux | 8 +- .../language/lux/synthesis/access/side.lux | 8 +- .../library/lux/tool/compiler/meta/archive.lux | 16 +- .../lux/tool/compiler/meta/archive/artifact.lux | 10 +- .../compiler/meta/archive/artifact/category.lux | 16 +- .../compiler/meta/archive/module/descriptor.lux | 42 +- .../tool/compiler/meta/archive/module/document.lux | 6 +- .../lux/tool/compiler/meta/archive/registry.lux | 40 +- .../lux/tool/compiler/meta/archive/signature.lux | 18 +- .../lux/tool/compiler/meta/archive/unit.lux | 6 +- .../compiler/meta/cache/dependency/artifact.lux | 38 +- .../source/library/lux/tool/compiler/meta/cli.lux | 36 +- .../lux/tool/compiler/meta/cli/compiler.lux | 8 +- .../library/lux/tool/compiler/meta/export.lux | 8 +- .../library/lux/tool/compiler/meta/io/archive.lux | 22 +- .../lux/tool/compiler/meta/packager/scheme.lux | 14 +- stdlib/source/library/lux/type.lux | 92 +- stdlib/source/library/lux/type/abstract.lux | 22 +- stdlib/source/library/lux/type/check.lux | 24 +- stdlib/source/library/lux/type/implicit.lux | 16 +- stdlib/source/library/lux/type/poly.lux | 6 +- stdlib/source/library/lux/type/unit.lux | 14 +- stdlib/source/library/lux/world/file/watch.lux | 50 +- stdlib/source/library/lux/world/input/keyboard.lux | 4 +- .../source/library/lux/world/net/http/cookie.lux | 52 +- stdlib/source/library/lux/world/net/http/query.lux | 100 +- stdlib/source/poly/lux/abstract/equivalence.lux | 228 ++-- stdlib/source/poly/lux/abstract/functor.lux | 114 +- stdlib/source/poly/lux/data/format/json.lux | 318 ++--- stdlib/source/program/aedifex/artifact.lux | 10 +- .../source/program/aedifex/artifact/snapshot.lux | 38 +- .../program/aedifex/artifact/snapshot/stamp.lux | 8 +- .../program/aedifex/artifact/snapshot/version.lux | 22 +- .../aedifex/artifact/snapshot/version/value.lux | 8 +- .../source/program/aedifex/artifact/versioning.lux | 26 +- stdlib/source/program/aedifex/cli.lux | 118 +- stdlib/source/program/aedifex/dependency.lux | 8 +- .../source/program/aedifex/dependency/status.lux | 38 +- .../source/program/aedifex/metadata/artifact.lux | 36 +- .../source/program/aedifex/metadata/snapshot.lux | 8 +- stdlib/source/program/aedifex/package.lux | 20 +- stdlib/source/program/aedifex/parser.lux | 116 +- stdlib/source/program/aedifex/pom.lux | 40 +- stdlib/source/program/aedifex/profile.lux | 114 +- .../source/program/aedifex/repository/identity.lux | 8 +- .../source/program/aedifex/repository/origin.lux | 28 +- stdlib/source/program/aedifex/runtime.lux | 10 +- stdlib/source/specification/aedifex/repository.lux | 48 +- stdlib/source/specification/compositor.lux | 18 +- .../specification/compositor/analysis/type.lux | 40 +- .../specification/compositor/generation/case.lux | 240 ++-- .../specification/compositor/generation/common.lux | 534 ++++---- .../compositor/generation/function.lux | 122 +- .../compositor/generation/primitive.lux | 34 +- .../compositor/generation/reference.lux | 6 +- .../compositor/generation/structure.lux | 8 +- stdlib/source/specification/lux/abstract/apply.lux | 12 +- .../source/specification/lux/abstract/comonad.lux | 10 +- stdlib/source/specification/lux/abstract/enum.lux | 22 +- .../specification/lux/abstract/equivalence.lux | 10 +- .../source/specification/lux/abstract/functor.lux | 10 +- .../lux/abstract/functor/contravariant.lux | 6 +- .../source/specification/lux/abstract/interval.lux | 12 +- stdlib/source/specification/lux/abstract/monad.lux | 10 +- .../source/specification/lux/abstract/monoid.lux | 22 +- stdlib/source/specification/lux/abstract/order.lux | 84 +- stdlib/source/specification/lux/world/file.lux | 126 +- stdlib/source/specification/lux/world/shell.lux | 12 +- stdlib/source/test/aedifex.lux | 96 +- stdlib/source/test/aedifex/artifact.lux | 94 +- stdlib/source/test/aedifex/artifact/extension.lux | 72 +- stdlib/source/test/aedifex/artifact/snapshot.lux | 76 +- .../test/aedifex/artifact/snapshot/build.lux | 58 +- .../test/aedifex/artifact/snapshot/stamp.lux | 72 +- .../source/test/aedifex/artifact/snapshot/time.lux | 62 +- .../test/aedifex/artifact/snapshot/version.lux | 78 +- .../aedifex/artifact/snapshot/version/value.lux | 52 +- stdlib/source/test/aedifex/artifact/time.lux | 92 +- stdlib/source/test/aedifex/artifact/time/date.lux | 94 +- stdlib/source/test/aedifex/artifact/time/time.lux | 20 +- stdlib/source/test/aedifex/artifact/type.lux | 68 +- stdlib/source/test/aedifex/artifact/versioning.lux | 90 +- stdlib/source/test/aedifex/cache.lux | 14 +- stdlib/source/test/aedifex/cli.lux | 56 +- stdlib/source/test/aedifex/command.lux | 54 +- stdlib/source/test/aedifex/command/auto.lux | 64 +- stdlib/source/test/aedifex/command/build.lux | 204 +-- stdlib/source/test/aedifex/command/install.lux | 64 +- stdlib/source/test/aedifex/command/test.lux | 110 +- stdlib/source/test/aedifex/dependency.lux | 52 +- .../source/test/aedifex/dependency/deployment.lux | 102 +- .../source/test/aedifex/dependency/resolution.lux | 188 +-- stdlib/source/test/aedifex/dependency/status.lux | 72 +- stdlib/source/test/aedifex/hash.lux | 152 +-- stdlib/source/test/aedifex/local.lux | 10 +- stdlib/source/test/aedifex/metadata.lux | 92 +- stdlib/source/test/aedifex/metadata/artifact.lux | 116 +- stdlib/source/test/aedifex/metadata/snapshot.lux | 86 +- stdlib/source/test/aedifex/package.lux | 118 +- stdlib/source/test/aedifex/pom.lux | 54 +- stdlib/source/test/aedifex/profile.lux | 118 +- stdlib/source/test/aedifex/project.lux | 110 +- stdlib/source/test/aedifex/repository.lux | 34 +- stdlib/source/test/aedifex/repository/identity.lux | 36 +- stdlib/source/test/aedifex/repository/local.lux | 72 +- stdlib/source/test/aedifex/repository/origin.lux | 36 +- stdlib/source/test/aedifex/repository/remote.lux | 74 +- stdlib/source/test/aedifex/runtime.lux | 68 +- stdlib/source/test/lux.lux | 1364 +++++++++--------- stdlib/source/test/lux/abstract.lux | 54 +- stdlib/source/test/lux/abstract/apply.lux | 22 +- stdlib/source/test/lux/abstract/comonad.lux | 16 +- stdlib/source/test/lux/abstract/comonad/cofree.lux | 16 +- stdlib/source/test/lux/abstract/enum.lux | 52 +- stdlib/source/test/lux/abstract/equivalence.lux | 40 +- stdlib/source/test/lux/abstract/functor.lux | 68 +- stdlib/source/test/lux/abstract/hash.lux | 8 +- stdlib/source/test/lux/abstract/interval.lux | 248 ++-- stdlib/source/test/lux/abstract/mix.lux | 38 +- stdlib/source/test/lux/abstract/monad.lux | 86 +- stdlib/source/test/lux/abstract/monad/free.lux | 22 +- stdlib/source/test/lux/abstract/monoid.lux | 46 +- stdlib/source/test/lux/abstract/order.lux | 40 +- stdlib/source/test/lux/abstract/predicate.lux | 96 +- stdlib/source/test/lux/control.lux | 128 +- stdlib/source/test/lux/control/concatenative.lux | 500 +++---- .../source/test/lux/control/concurrency/actor.lux | 338 ++--- .../source/test/lux/control/concurrency/async.lux | 222 +-- .../source/test/lux/control/concurrency/atom.lux | 118 +- stdlib/source/test/lux/control/concurrency/frp.lux | 294 ++-- .../test/lux/control/concurrency/semaphore.lux | 250 ++-- stdlib/source/test/lux/control/concurrency/stm.lux | 114 +- .../source/test/lux/control/concurrency/thread.lux | 82 +- stdlib/source/test/lux/control/continuation.lux | 112 +- stdlib/source/test/lux/control/exception.lux | 152 +-- stdlib/source/test/lux/control/function.lux | 70 +- .../source/test/lux/control/function/contract.lux | 44 +- stdlib/source/test/lux/control/function/inline.lux | 10 +- stdlib/source/test/lux/control/function/memo.lux | 110 +- stdlib/source/test/lux/control/function/mixin.lux | 172 +-- stdlib/source/test/lux/control/function/mutual.lux | 38 +- stdlib/source/test/lux/control/io.lux | 56 +- stdlib/source/test/lux/control/lazy.lux | 42 +- stdlib/source/test/lux/control/maybe.lux | 114 +- stdlib/source/test/lux/control/parser.lux | 510 +++---- stdlib/source/test/lux/control/parser/analysis.lux | 190 +-- stdlib/source/test/lux/control/parser/binary.lux | 524 +++---- stdlib/source/test/lux/control/parser/cli.lux | 84 +- stdlib/source/test/lux/control/parser/code.lux | 212 +-- .../source/test/lux/control/parser/environment.lux | 94 +- stdlib/source/test/lux/control/parser/json.lux | 232 ++-- .../source/test/lux/control/parser/synthesis.lux | 262 ++-- stdlib/source/test/lux/control/parser/text.lux | 694 +++++----- stdlib/source/test/lux/control/parser/tree.lux | 234 ++-- stdlib/source/test/lux/control/parser/type.lux | 480 +++---- stdlib/source/test/lux/control/parser/xml.lux | 236 ++-- stdlib/source/test/lux/control/pipe.lux | 176 +-- stdlib/source/test/lux/control/reader.lux | 46 +- stdlib/source/test/lux/control/region.lux | 208 +-- stdlib/source/test/lux/control/remember.lux | 26 +- .../test/lux/control/security/capability.lux | 56 +- stdlib/source/test/lux/control/security/policy.lux | 38 +- stdlib/source/test/lux/control/state.lux | 98 +- stdlib/source/test/lux/control/thread.lux | 90 +- stdlib/source/test/lux/control/try.lux | 96 +- stdlib/source/test/lux/control/writer.lux | 42 +- stdlib/source/test/lux/data.lux | 48 +- stdlib/source/test/lux/data/binary.lux | 264 ++-- stdlib/source/test/lux/data/bit.lux | 76 +- stdlib/source/test/lux/data/collection.lux | 104 +- stdlib/source/test/lux/data/collection/array.lux | 714 +++++----- stdlib/source/test/lux/data/collection/bits.lux | 146 +- .../source/test/lux/data/collection/dictionary.lux | 382 +++--- .../lux/data/collection/dictionary/ordered.lux | 138 +- .../test/lux/data/collection/dictionary/plist.lux | 102 +- stdlib/source/test/lux/data/collection/list.lux | 644 ++++----- stdlib/source/test/lux/data/collection/queue.lux | 182 +-- .../test/lux/data/collection/queue/priority.lux | 136 +- .../source/test/lux/data/collection/sequence.lux | 312 ++--- stdlib/source/test/lux/data/collection/set.lux | 188 +-- .../source/test/lux/data/collection/set/multi.lux | 334 ++--- .../test/lux/data/collection/set/ordered.lux | 236 ++-- stdlib/source/test/lux/data/collection/stack.lux | 112 +- stdlib/source/test/lux/data/collection/stream.lux | 142 +- stdlib/source/test/lux/data/collection/tree.lux | 108 +- .../test/lux/data/collection/tree/finger.lux | 206 +-- .../test/lux/data/collection/tree/zipper.lux | 436 +++--- stdlib/source/test/lux/data/color.lux | 220 +-- stdlib/source/test/lux/data/color/named.lux | 20 +- stdlib/source/test/lux/data/format/binary.lux | 36 +- stdlib/source/test/lux/data/format/json.lux | 272 ++-- stdlib/source/test/lux/data/format/tar.lux | 600 ++++---- stdlib/source/test/lux/data/format/xml.lux | 50 +- stdlib/source/test/lux/data/identity.lux | 44 +- stdlib/source/test/lux/data/product.lux | 116 +- stdlib/source/test/lux/data/sum.lux | 150 +- stdlib/source/test/lux/data/text.lux | 484 +++---- stdlib/source/test/lux/data/text/buffer.lux | 56 +- stdlib/source/test/lux/data/text/encoding.lux | 14 +- stdlib/source/test/lux/data/text/escape.lux | 140 +- stdlib/source/test/lux/data/text/format.lux | 224 +-- stdlib/source/test/lux/data/text/regex.lux | 386 +++--- stdlib/source/test/lux/data/text/unicode/block.lux | 56 +- stdlib/source/test/lux/data/text/unicode/set.lux | 146 +- stdlib/source/test/lux/debug.lux | 124 +- stdlib/source/test/lux/documentation.lux | 130 +- stdlib/source/test/lux/extension.lux | 36 +- stdlib/source/test/lux/ffi.js.lux | 170 +-- stdlib/source/test/lux/ffi.jvm.lux | 384 +++--- stdlib/source/test/lux/ffi.lua.lux | 74 +- stdlib/source/test/lux/ffi.old.lux | 238 ++-- stdlib/source/test/lux/ffi.py.lux | 72 +- stdlib/source/test/lux/ffi.rb.lux | 56 +- stdlib/source/test/lux/ffi/export.js.lux | 10 +- stdlib/source/test/lux/ffi/export.jvm.lux | 88 +- stdlib/source/test/lux/ffi/export.lua.lux | 10 +- stdlib/source/test/lux/ffi/export.py.lux | 10 +- stdlib/source/test/lux/ffi/export.rb.lux | 14 +- stdlib/source/test/lux/locale.lux | 138 +- stdlib/source/test/lux/locale/language.lux | 132 +- stdlib/source/test/lux/locale/territory.lux | 86 +- stdlib/source/test/lux/macro.lux | 178 +-- stdlib/source/test/lux/macro/code.lux | 184 +-- stdlib/source/test/lux/macro/local.lux | 40 +- stdlib/source/test/lux/macro/pattern.lux | 110 +- stdlib/source/test/lux/macro/syntax.lux | 76 +- stdlib/source/test/lux/macro/syntax/check.lux | 38 +- .../source/test/lux/macro/syntax/declaration.lux | 72 +- stdlib/source/test/lux/macro/syntax/definition.lux | 74 +- stdlib/source/test/lux/macro/syntax/export.lux | 46 +- stdlib/source/test/lux/macro/syntax/input.lux | 76 +- .../source/test/lux/macro/syntax/type/variable.lux | 52 +- stdlib/source/test/lux/macro/template.lux | 124 +- stdlib/source/test/lux/math.lux | 164 +-- stdlib/source/test/lux/math/logic/continuous.lux | 186 +-- stdlib/source/test/lux/math/logic/fuzzy.lux | 454 +++--- stdlib/source/test/lux/math/modular.lux | 148 +- stdlib/source/test/lux/math/modulus.lux | 88 +- stdlib/source/test/lux/math/number.lux | 188 +-- stdlib/source/test/lux/math/number/complex.lux | 336 ++--- stdlib/source/test/lux/math/number/frac.lux | 616 ++++----- stdlib/source/test/lux/math/number/i16.lux | 44 +- stdlib/source/test/lux/math/number/i32.lux | 44 +- stdlib/source/test/lux/math/number/i64.lux | 368 ++--- stdlib/source/test/lux/math/number/i8.lux | 44 +- stdlib/source/test/lux/math/number/int.lux | 410 +++--- stdlib/source/test/lux/math/number/nat.lux | 230 ++-- stdlib/source/test/lux/math/number/ratio.lux | 166 +-- stdlib/source/test/lux/math/number/rev.lux | 304 ++--- stdlib/source/test/lux/meta.lux | 1068 +++++++-------- stdlib/source/test/lux/meta/configuration.lux | 86 +- stdlib/source/test/lux/meta/location.lux | 80 +- stdlib/source/test/lux/meta/symbol.lux | 64 +- stdlib/source/test/lux/meta/version.lux | 32 +- stdlib/source/test/lux/static.lux | 122 +- stdlib/source/test/lux/target.lux | 10 +- stdlib/source/test/lux/target/js.lux | 1182 ++++++++-------- stdlib/source/test/lux/target/jvm.lux | 1346 +++++++++--------- stdlib/source/test/lux/target/lua.lux | 958 ++++++------- stdlib/source/test/lux/target/python.lux | 1204 ++++++++-------- stdlib/source/test/lux/target/ruby.lux | 1442 ++++++++++---------- stdlib/source/test/lux/test.lux | 438 +++--- stdlib/source/test/lux/time.lux | 168 +-- stdlib/source/test/lux/time/date.lux | 176 +-- stdlib/source/test/lux/time/day.lux | 132 +- stdlib/source/test/lux/time/duration.lux | 142 +- stdlib/source/test/lux/time/instant.lux | 148 +- stdlib/source/test/lux/time/month.lux | 166 +-- stdlib/source/test/lux/time/year.lux | 168 +-- stdlib/source/test/lux/tool.lux | 38 +- stdlib/source/test/lux/tool/compiler/arity.lux | 16 +- .../lux/tool/compiler/language/lux/analysis.lux | 652 ++++----- .../compiler/language/lux/analysis/complex.lux | 76 +- .../compiler/language/lux/analysis/coverage.lux | 642 ++++----- .../compiler/language/lux/analysis/inference.lux | 486 +++---- .../tool/compiler/language/lux/analysis/macro.lux | 60 +- .../tool/compiler/language/lux/analysis/module.lux | 438 +++--- .../compiler/language/lux/analysis/pattern.lux | 126 +- .../tool/compiler/language/lux/analysis/scope.lux | 282 ++-- .../tool/compiler/language/lux/analysis/simple.lux | 40 +- .../tool/compiler/language/lux/analysis/type.lux | 164 +-- .../tool/compiler/language/lux/phase/analysis.lux | 86 +- .../compiler/language/lux/phase/analysis/case.lux | 384 +++--- .../language/lux/phase/analysis/complex.lux | 834 +++++------ .../language/lux/phase/analysis/function.lux | 296 ++-- .../language/lux/phase/analysis/reference.lux | 334 ++--- .../language/lux/phase/analysis/simple.lux | 36 +- .../tool/compiler/language/lux/phase/extension.lux | 362 ++--- .../language/lux/phase/extension/analysis/lux.lux | 208 +-- .../tool/compiler/language/lux/phase/synthesis.lux | 34 +- .../compiler/language/lux/phase/synthesis/case.lux | 116 +- .../language/lux/phase/synthesis/function.lux | 118 +- .../compiler/language/lux/phase/synthesis/loop.lux | 362 ++--- .../language/lux/phase/synthesis/primitive.lux | 56 +- .../language/lux/phase/synthesis/structure.lux | 8 +- .../language/lux/phase/synthesis/variable.lux | 186 +-- .../test/lux/tool/compiler/language/lux/syntax.lux | 134 +- .../compiler/language/lux/synthesis/access.lux | 8 +- .../language/lux/synthesis/access/member.lux | 28 +- .../language/lux/synthesis/access/side.lux | 28 +- .../compiler/language/lux/synthesis/simple.lux | 30 +- .../source/test/lux/tool/compiler/meta/archive.lux | 364 ++--- .../lux/tool/compiler/meta/archive/artifact.lux | 20 +- .../compiler/meta/archive/artifact/category.lux | 44 +- .../test/lux/tool/compiler/meta/archive/key.lux | 14 +- .../test/lux/tool/compiler/meta/archive/module.lux | 28 +- .../compiler/meta/archive/module/descriptor.lux | 50 +- .../tool/compiler/meta/archive/module/document.lux | 120 +- .../lux/tool/compiler/meta/archive/registry.lux | 224 +-- .../lux/tool/compiler/meta/archive/signature.lux | 50 +- .../test/lux/tool/compiler/meta/archive/unit.lux | 26 +- .../source/test/lux/tool/compiler/meta/cache.lux | 44 +- .../test/lux/tool/compiler/meta/cache/archive.lux | 34 +- .../test/lux/tool/compiler/meta/cache/artifact.lux | 34 +- .../test/lux/tool/compiler/meta/cache/module.lux | 82 +- .../test/lux/tool/compiler/meta/cache/purge.lux | 148 +- stdlib/source/test/lux/tool/compiler/meta/cli.lux | 188 +-- .../test/lux/tool/compiler/meta/cli/compiler.lux | 20 +- .../source/test/lux/tool/compiler/meta/context.lux | 52 +- .../source/test/lux/tool/compiler/meta/export.lux | 122 +- .../source/test/lux/tool/compiler/meta/import.lux | 94 +- stdlib/source/test/lux/tool/compiler/phase.lux | 260 ++-- stdlib/source/test/lux/tool/compiler/reference.lux | 106 +- .../test/lux/tool/compiler/reference/variable.lux | 40 +- stdlib/source/test/lux/tool/compiler/version.lux | 24 +- stdlib/source/test/lux/type.lux | 382 +++--- stdlib/source/test/lux/type/abstract.lux | 104 +- stdlib/source/test/lux/type/check.lux | 572 ++++---- stdlib/source/test/lux/type/dynamic.lux | 46 +- stdlib/source/test/lux/type/implicit.lux | 54 +- stdlib/source/test/lux/type/poly.lux | 28 +- stdlib/source/test/lux/type/poly/equivalence.lux | 32 +- stdlib/source/test/lux/type/poly/json.lux | 30 +- stdlib/source/test/lux/type/quotient.lux | 46 +- stdlib/source/test/lux/type/refinement.lux | 108 +- stdlib/source/test/lux/type/resource.lux | 236 ++-- stdlib/source/test/lux/type/unit.lux | 194 +-- stdlib/source/test/lux/type/variance.lux | 48 +- stdlib/source/test/lux/world.lux | 20 +- stdlib/source/test/lux/world/console.lux | 70 +- stdlib/source/test/lux/world/file.lux | 74 +- stdlib/source/test/lux/world/file/watch.lux | 192 +-- stdlib/source/test/lux/world/input/keyboard.lux | 38 +- stdlib/source/test/lux/world/net/http/client.lux | 50 +- stdlib/source/test/lux/world/net/http/status.lux | 14 +- .../test/lux/world/output/video/resolution.lux | 18 +- stdlib/source/test/lux/world/program.lux | 56 +- stdlib/source/test/lux/world/shell.lux | 86 +- stdlib/source/unsafe/lux/data/binary.lux | 34 +- 518 files changed, 31167 insertions(+), 31165 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 31161cb4f..468fc588f 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -208,15 +208,15 @@ [(= (Tuple) (And))]) -(documentation: /._$ +(documentation: /.left "Left-association for the application of binary functions over variadic arguments." - [(_$ text#composite "Hello, " name ". How are you?") + [(left text#composite "Hello, " name ". How are you?") "=>" (text#composite (text#composite "Hello, " name) ". How are you?")]) -(documentation: /.$_ +(documentation: /.all "Right-association for the application of binary functions over variadic arguments." - [($_ text#composite "Hello, " name ". How are you?") + [(all text#composite "Hello, " name ". How are you?") "=>" (text#composite "Hello, " (text#composite name ". How are you?"))]) @@ -353,7 +353,7 @@ [(case (is (List Int) (list +1 +2 +3)) {#Item x {#Item y {#Item z {#End}}}} - {#Some ($_ * x y z)} + {#Some (all * x y z)} _ {#None})]) @@ -364,7 +364,7 @@ [(case (is (List Int) (list +1 +2 +3)) (pattern (list x y z)) - {#Some ($_ * x y z)} + {#Some (all * x y z)} _ {#None})]) @@ -711,9 +711,9 @@ [form (list (bit #1)) "(#1)"] [tuple (list (bit #1)) "[#1]"] )] - ($_ and - - )))]) + (all and + + )))]) (documentation: /.static (format "Resolves the names of definitions to their values at compile-time, assuming their values are either:" @@ -837,7 +837,7 @@ 2 3 4)] - ($_ + ))]) + (all + ))]) (documentation: /.char "If given a 1-character text literal, yields the char-code of the sole character." @@ -936,8 +936,8 @@ ..Tuple ..Or ..And - .._$ - ..$_ + ..left + ..all ..if ..Primitive ..` diff --git a/stdlib/source/documentation/lux/macro/syntax.lux b/stdlib/source/documentation/lux/macro/syntax.lux index 866221b4b..c4867ea7a 100644 --- a/stdlib/source/documentation/lux/macro/syntax.lux +++ b/stdlib/source/documentation/lux/macro/syntax.lux @@ -1,22 +1,22 @@ (.using - [library - [lux {"-" char} - ["$" documentation {"+" documentation:}] - [data - [text {"+" \n} - ["%" format {"+" format}]] - [collection - ["[0]" list]]]]] - ["[0]" / "_" - ["[1][0]" check] - ["[1][0]" declaration] - ["[1][0]" definition] - ["[1][0]" export] - ["[1][0]" input] - ["[1][0]" type "_" - ["[1]/[0]" variable]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" char} + ["$" documentation {"+" documentation:}] + [data + [text {"+" \n} + ["%" format {"+" format}]] + [collection + ["[0]" list]]]]] + ["[0]" / "_" + ["[1][0]" check] + ["[1][0]" declaration] + ["[1][0]" definition] + ["[1][0]" export] + ["[1][0]" input] + ["[1][0]" type "_" + ["[1]/[0]" variable]]] + [\\library + ["[0]" /]]) (documentation: /.syntax: (format \n "A more advanced way to define macros than 'macro:'." @@ -29,11 +29,11 @@ interfaces (tuple (some (super_class_decl^ imports class_vars))) constructor_args (constructor_args^ imports class_vars) methods (some (overriden_method_def^ imports))]) - (let [def_code ($_ text#composite "anon-class:" - (spaced (list (super_class_decl$ (maybe.else object_super_class super)) - (with_brackets (spaced (list#each super_class_decl$ interfaces))) - (with_brackets (spaced (list#each constructor_arg$ constructor_args))) - (with_brackets (spaced (list#each (method_def$ id) methods))))))] + (let [def_code (all text#composite "anon-class:" + (spaced (list (super_class_decl$ (maybe.else object_super_class super)) + (with_brackets (spaced (list#each super_class_decl$ interfaces))) + (with_brackets (spaced (list#each constructor_arg$ constructor_args))) + (with_brackets (spaced (list#each (method_def$ id) methods))))))] (in (list (` ((~ (code.text def_code))))))))]) (.def: .public documentation diff --git a/stdlib/source/documentation/lux/math/logic.lux b/stdlib/source/documentation/lux/math/logic.lux index 02db866cc..11d930333 100644 --- a/stdlib/source/documentation/lux/math/logic.lux +++ b/stdlib/source/documentation/lux/math/logic.lux @@ -1,18 +1,18 @@ (.using - [library - [lux {"-" char} - ["$" documentation {"+" documentation:}] - [data - [text - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" monoid)]]]]] - ["[0]" / "_" - ["[1][0]" continuous] - ["[1][0]" fuzzy]]) + [library + [lux {"-" char} + ["$" documentation {"+" documentation:}] + [data + [text + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" monoid)]]]]] + ["[0]" / "_" + ["[1][0]" continuous] + ["[1][0]" fuzzy]]) (.def: .public documentation (.List $.Module) - ($_ list#composite - /continuous.documentation - /fuzzy.documentation)) + (all list#composite + /continuous.documentation + /fuzzy.documentation)) diff --git a/stdlib/source/documentation/lux/world.lux b/stdlib/source/documentation/lux/world.lux index f199a1e93..d226dfa3d 100644 --- a/stdlib/source/documentation/lux/world.lux +++ b/stdlib/source/documentation/lux/world.lux @@ -1,33 +1,33 @@ (.using - [library - [lux "*" - [program {"+" program:}] - ["$" documentation {"+" documentation:}] - ["[0]" debug] - [control - ["[0]" io]] - [data - [collection - ["[0]" list ("[1]#[0]" monoid)]]]]] - ["[0]" / "_" - ["[1][0]" console] - ["[1][0]" file] - ["[1][0]" input "_" - ["[1]/[0]" keyboard]] - ["[1][0]" net] - ["[1][0]" output "_" - ["[1]/[0]" video "_" - ["[1]/[0]" resolution]]] - ["[1][0]" program] - ["[1][0]" shell]]) + [library + [lux "*" + [program {"+" program:}] + ["$" documentation {"+" documentation:}] + ["[0]" debug] + [control + ["[0]" io]] + [data + [collection + ["[0]" list ("[1]#[0]" monoid)]]]]] + ["[0]" / "_" + ["[1][0]" console] + ["[1][0]" file] + ["[1][0]" input "_" + ["[1]/[0]" keyboard]] + ["[1][0]" net] + ["[1][0]" output "_" + ["[1]/[0]" video "_" + ["[1]/[0]" resolution]]] + ["[1][0]" program] + ["[1][0]" shell]]) (.def: .public documentation (.List $.Module) - ($_ list#composite - /console.documentation - /file.documentation - /input/keyboard.documentation - /net.documentation - /output/video/resolution.documentation - /program.documentation - /shell.documentation)) + (all list#composite + /console.documentation + /file.documentation + /input/keyboard.documentation + /net.documentation + /output/video/resolution.documentation + /program.documentation + /shell.documentation)) diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 5c6c625a8..7ff877259 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -1337,32 +1337,34 @@ (function' [right left] (func left right))) -(macro:' .public (_$ tokens) +(macro:' .public (left tokens) ({{#Item op tokens'} ({{#Item first nexts} (meta#in (list (list#mix (function#flipped (right_associativity op)) first nexts))) _ - (failure "Wrong syntax for _$")} + (failure "Wrong syntax for left")} tokens') _ - (failure "Wrong syntax for _$")} + (failure "Wrong syntax for left")} tokens)) -(macro:' .public ($_ tokens) +(macro:' .public (right tokens) ({{#Item op tokens'} ({{#Item last prevs} (meta#in (list (list#mix (right_associativity op) last prevs))) _ - (failure "Wrong syntax for $_")} + (failure "Wrong syntax for right")} (list#reversed tokens')) _ - (failure "Wrong syntax for $_")} + (failure "Wrong syntax for right")} tokens)) +(def:''' .public all Macro ..right) + ... (type: (Monad m) ... (Interface ... (is (All (_ a) (-> a (m a))) @@ -1531,7 +1533,7 @@ (-> Symbol Text) (let' [[module name] full_name] ({"" name - _ ($_ text#composite module ..symbol_separator name)} + _ (all text#composite module ..symbol_separator name)} module))) (def:''' .private (global_symbol full_name state) @@ -1553,11 +1555,11 @@ constant) {#None} - {#Left ($_ text#composite "Unknown definition: " (symbol#encoded full_name))}} + {#Left (all text#composite "Unknown definition: " (symbol#encoded full_name))}} (plist#value name definitions)) {#None} - {#Left ($_ text#composite "Unknown module: " module " @ " (symbol#encoded full_name))}} + {#Left (all text#composite "Unknown module: " module " @ " (symbol#encoded full_name))}} (plist#value module modules)))) (def:''' .private (:List expression) @@ -2200,7 +2202,7 @@ (def:''' .private (text#encoded original) (-> Text Text) - ($_ text#composite ..double_quote original ..double_quote)) + (all text#composite ..double_quote original ..double_quote)) (def:''' .private (code#encoded code) (-> Code Text) @@ -2226,25 +2228,25 @@ (symbol#encoded [module name]) [_ {#Form xs}] - ($_ text#composite "(" (|> xs - (list#each code#encoded) - (list#interposed " ") - list#reversed - (list#mix text#composite "")) ")") + (all text#composite "(" (|> xs + (list#each code#encoded) + (list#interposed " ") + list#reversed + (list#mix text#composite "")) ")") [_ {#Tuple xs}] - ($_ text#composite "[" (|> xs - (list#each code#encoded) - (list#interposed " ") - list#reversed - (list#mix text#composite "")) "]") + (all text#composite "[" (|> xs + (list#each code#encoded) + (list#interposed " ") + list#reversed + (list#mix text#composite "")) "]") [_ {#Variant xs}] - ($_ text#composite "{" (|> xs - (list#each code#encoded) - (list#interposed " ") - list#reversed - (list#mix text#composite "")) "}")} + (all text#composite "{" (|> xs + (list#each code#encoded) + (list#interposed " ") + list#reversed + (list#mix text#composite "")) "}")} code)) (def:''' .private (normal_type type) @@ -2360,7 +2362,7 @@ ..#seed ("lux i64 +" 1 seed) ..#expected expected ..#location location ..#extensions extensions ..#scope_type_vars scope_type_vars ..#eval _eval] - (local$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}} + (local$ (all text#composite "__gensym__" prefix (nat#encoded seed)))}} state)) (macro:' .public (exec tokens) @@ -2440,11 +2442,11 @@ (do meta_monad [] (in (list))) _ - (failure ($_ text#composite "'lux.case' expects an even number of tokens: " (|> branches - (list#each code#encoded) - (list#interposed " ") - list#reversed - (list#mix text#composite ""))))} + (failure (all text#composite "'lux.case' expects an even number of tokens: " (|> branches + (list#each code#encoded) + (list#interposed " ") + list#reversed + (list#mix text#composite ""))))} branches)) (macro:' .public (case tokens) @@ -3000,7 +3002,7 @@ {#Right state module} _ - {#Left ($_ text#composite "Unknown module: " name)})))) + {#Left (all text#composite "Unknown module: " name)})))) (def: (type_slot [module name]) (-> Symbol (Meta [Nat (List Symbol) Bit Type])) @@ -3083,38 +3085,38 @@ name _ - ($_ text#composite "(" name " " (|> params (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")")) + (all text#composite "(" name " " (|> params (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")")) {#Sum _} - ($_ text#composite "{" (|> (flat_variant type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "}") + (all text#composite "{" (|> (flat_variant type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "}") {#Product _} - ($_ text#composite "[" (|> (flat_tuple type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "]") + (all text#composite "[" (|> (flat_tuple type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "]") {#Function _} - ($_ text#composite "(-> " (|> (flat_lambda type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")") + (all text#composite "(-> " (|> (flat_lambda type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")") {#Parameter id} (nat#encoded id) {#Var id} - ($_ text#composite "-" (nat#encoded id)) + (all text#composite "-" (nat#encoded id)) {#Ex id} - ($_ text#composite "+" (nat#encoded id)) + (all text#composite "+" (nat#encoded id)) {#UnivQ env body} - ($_ text#composite "(All " (type#encoded body) ")") + (all text#composite "(All " (type#encoded body) ")") {#ExQ env body} - ($_ text#composite "(Ex " (type#encoded body) ")") + (all text#composite "(Ex " (type#encoded body) ")") {#Apply _} (let [[func args] (flat_application type)] - ($_ text#composite - "(" (type#encoded func) " " - (|> args (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) - ")")) + (all text#composite + "(" (type#encoded func) " " + (|> args (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) + ")")) {#Named name _} (symbol#encoded name) @@ -3131,9 +3133,9 @@ (meta#in tags) _ - (failure ($_ text#composite - "No tags available for type: " - (type#encoded struct_type))))) + (failure (all text#composite + "No tags available for type: " + (type#encoded struct_type))))) .let [tag_mappings (is (List [Text Code]) (list#each (function (_ tag) [(product#right tag) @@ -3164,7 +3166,7 @@ {#Item head tail} (list#mix (function (_ right left) - ($_ text#composite left separator right)) + (all text#composite left separator right)) head tail))) @@ -3478,7 +3480,7 @@ (function (again left right) (case (..text#split_by pattern right) {#Some [pre post]} - (again ($_ "lux text concat" left pre replacement) post) + (again (all "lux text concat" left pre replacement) post) {#None} ("lux text concat" left right)))) @@ -3486,7 +3488,7 @@ (def: (alias_stand_in index) (-> Nat Text) - ($_ "lux text concat" "[" (nat#encoded index) "]")) + (all "lux text concat" "[" (nat#encoded index) "]")) (def: (module_alias context aliased) (-> (List Text) Text Text) @@ -3514,7 +3516,7 @@ _ (case root "" hierarchy - _ ($_ text#composite root ..module_separator hierarchy)))) + _ (all text#composite root ..module_separator hierarchy)))) (def: (normal_parallel_path hierarchy root) (-> Text Text (Maybe Text)) @@ -3550,7 +3552,7 @@ (case (relative_ups 0 module) 0 (meta#in (if nested? - ($_ "lux text concat" relative_root ..module_separator module) + (all "lux text concat" relative_root ..module_separator module) module)) relatives @@ -3565,12 +3567,12 @@ clean ("lux text clip" relatives (|> module "lux text size" ("lux i64 -" relatives)) module) output (case ("lux text size" clean) 0 prefix - _ ($_ text#composite prefix ..module_separator clean))] + _ (all text#composite prefix ..module_separator clean))] (meta#in output)) - (failure ($_ "lux text concat" - "Cannot climb the module hierarchy..." \n - "Importing module: " module \n - " Relative Root: " relative_root \n)))))) + (failure (all "lux text concat" + "Cannot climb the module hierarchy..." \n + "Importing module: " module \n + " Relative Root: " relative_root \n)))))) (def: (imports_parser nested? relative_root context imports) (-> Bit Text (List Text) (List Code) (Meta (List Importation))) @@ -3642,9 +3644,9 @@ _ (do meta_monad [current_module current_module_name] - (failure ($_ text#composite - "Wrong syntax for import @ " current_module - \n (code#encoded token))))))) + (failure (all text#composite + "Wrong syntax for import @ " current_module + \n (code#encoded token))))))) imports)] (in (list#conjoint imports')))) @@ -3685,19 +3687,19 @@ {#Right state (list#conjoint to_alias)}) {#None} - {#Left ($_ text#composite - "Unknown module: " (text#encoded module) \n - "Current module: " (case current_module - {#Some current_module} - (text#encoded current_module) - - {#None} - "???") \n - "Known modules: " (|> modules - (list#each (function (_ [name module]) - (text$ name))) - tuple$ - code#encoded))}) + {#Left (all text#composite + "Unknown module: " (text#encoded module) \n + "Current module: " (case current_module + {#Some current_module} + (text#encoded current_module) + + {#None} + "???") \n + "Known modules: " (|> modules + (list#each (function (_ [name module]) + (text$ name))) + tuple$ + code#encoded))}) )) (def: (list#only p xs) @@ -3846,13 +3848,13 @@ {#Right [compiler struct_type]} _ - {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})) + {#Left (all text#composite "Unknown var: " (symbol#encoded full_name))})) (case (definition_type full_name compiler) {#Some struct_type} {#Right [compiler struct_type]} _ - {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})))] + {#Left (all text#composite "Unknown var: " (symbol#encoded full_name))})))] (case temp {#Right [compiler {#Var type_id}]} (let [[..#info _ ..#source _ ..#current_module _ ..#modules _ @@ -4108,11 +4110,11 @@ #refer_open openings]) _ - (failure ($_ text#composite "Wrong syntax for refer @ " current_module - \n (|> options - (list#each code#encoded) - (list#interposed " ") - (list#mix text#composite ""))))))) + (failure (all text#composite "Wrong syntax for refer @ " current_module + \n (|> options + (list#each code#encoded) + (list#interposed " ") + (list#mix text#composite ""))))))) (def: (referral_definitions module_name [r_defs r_opens]) (-> Text Refer (Meta (List Code))) @@ -4125,7 +4127,7 @@ (function (_ _def) (if (is_member? all_defs _def) (meta#in []) - (failure ($_ text#composite _def " is not defined in module " module_name " @ " current_module))))) + (failure (all text#composite _def " is not defined in module " module_name " @ " current_module))))) referred_defs)))] defs' (case r_defs {#All} @@ -4528,10 +4530,10 @@ (single_expansion expr) _ - (failure ($_ text#composite - "Incorrect expansion in with_expansions" - " | Binding: " (text#encoded var_name) - " | Expression: " (code#encoded expr))))] + (failure (all text#composite + "Incorrect expansion in with_expansions" + " | Binding: " (text#encoded var_name) + " | Expression: " (code#encoded expr))))] (again &rest (plist#with var_name expansion map))) {#End} @@ -4730,8 +4732,8 @@ (do meta_monad [location ..location .let [[module line column] location - location ($_ "lux text concat" (text#encoded module) "," (nat#encoded line) "," (nat#encoded column)) - message ($_ "lux text concat" "Undefined behavior @ " location)]] + location (all "lux text concat" (text#encoded module) "," (nat#encoded line) "," (nat#encoded column)) + message (all "lux text concat" "Undefined behavior @ " location)]] (in (list (` (..panic! (~ (text$ message))))))) _ @@ -4836,14 +4838,14 @@ (in (as ..Text value)) _ - (failure ($_ text#composite - "Invalid target platform (must be a value of type Text): " (symbol#encoded symbol) - " : " (..code#encoded (..type_code type)))))) + (failure (all text#composite + "Invalid target platform (must be a value of type Text): " (symbol#encoded symbol) + " : " (..code#encoded (..type_code type)))))) _ - (failure ($_ text#composite - "Invalid target platform syntax: " (..code#encoded choice) - \n "Must be either a text literal or a symbol.")))) + (failure (all text#composite + "Invalid target platform syntax: " (..code#encoded choice) + \n "Must be either a text literal or a symbol.")))) (def: (target_pick target options default) (-> Text (List [Code Code]) (Maybe Code) (Meta (List Code))) @@ -4851,7 +4853,7 @@ {#End} (case default {#None} - (failure ($_ text#composite "No code for target platform: " target)) + (failure (all text#composite "No code for target platform: " target)) {#Some default} (meta#in (list default))) diff --git a/stdlib/source/library/lux/abstract/apply.lux b/stdlib/source/library/lux/abstract/apply.lux index 9a63c3747..90fedf8d3 100644 --- a/stdlib/source/library/lux/abstract/apply.lux +++ b/stdlib/source/library/lux/abstract/apply.lux @@ -36,7 +36,7 @@ (# f_apply on fgx fgf'))) ... (let [applyF (# f_apply on) ... applyG (# g_apply on)] - ... ($_ applyF + ... (all applyF ... fgf ... (# f_monad in applyG) ... fgx)) diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux index 72057bf06..c1b40888f 100644 --- a/stdlib/source/library/lux/abstract/comonad.lux +++ b/stdlib/source/library/lux/abstract/comonad.lux @@ -39,7 +39,7 @@ {.#Some bindings} (let [[module short] (symbol ..be) symbol (is (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) + (|>> (all "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) g!_ (symbol "_") g!each (symbol "each") g!disjoint (symbol "disjoint") diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux index 79152d481..6c853b9e4 100644 --- a/stdlib/source/library/lux/abstract/monad.lux +++ b/stdlib/source/library/lux/abstract/monad.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" all} [meta ["[0]" location]]]] [// @@ -69,7 +69,7 @@ (if (|> bindings list#size .int ("lux i64 %" +2) ("lux i64 =" +0)) (let [[module short] (symbol ..do) symbol (is (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) + (|>> (.all "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) g!_ (symbol "_") g!each (symbol "each") g!conjoint (symbol "conjoint") diff --git a/stdlib/source/library/lux/abstract/predicate.lux b/stdlib/source/library/lux/abstract/predicate.lux index e785b7ae4..7e87cfc9d 100644 --- a/stdlib/source/library/lux/abstract/predicate.lux +++ b/stdlib/source/library/lux/abstract/predicate.lux @@ -1,12 +1,12 @@ (.using - [library - [lux {"-" or and} - [control - ["[0]" function]]]] - [// - [monoid {"+" Monoid}] - [functor - ["[0]" contravariant]]]) + [library + [lux {"-" all or and} + [control + ["[0]" function]]]] + [// + [monoid {"+" Monoid}] + [functor + ["[0]" contravariant]]]) (type: .public (Predicate a) (-> a Bit)) diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux index 3fb95ed21..59c692222 100644 --- a/stdlib/source/library/lux/control/concatenative.lux +++ b/stdlib/source/library/lux/control/concatenative.lux @@ -76,8 +76,8 @@ (def: signature^ (Parser [(List Alias) Stack Stack]) - (<>.either ($_ <>.and aliases^ stack^ stack^) - ($_ <>.and (<>#in (list)) stack^ stack^))) + (<>.either (all <>.and aliases^ stack^ stack^) + (all <>.and (<>#in (list)) stack^ stack^))) (syntax: .public (=> [[aliases inputs outputs] signature^]) (let [de_alias (function (_ aliased) @@ -119,10 +119,10 @@ (def: word (Parser [Code Text Code (List Code)]) (|export|.parser - ($_ <>.and - .local - .any - (<>.many .any)))) + (all <>.and + .local + .any + (<>.many .any)))) (syntax: .public (word: [[export_policy name type commands] ..word]) (in (list (` (def: (~ export_policy) (~ (code.local name)) diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux index 8334f6f41..25fad05eb 100644 --- a/stdlib/source/library/lux/control/concurrency/actor.lux +++ b/stdlib/source/library/lux/control/concurrency/actor.lux @@ -3,7 +3,7 @@ [lux "*" ["[0]" debug] [abstract - monad] + [monad {"+" do}]] [control ["[0]" pipe] ["[0]" function] @@ -229,14 +229,14 @@ (def: on_mail^ (Parser (Maybe On_MailC)) (<>.maybe (.form (<>.and (.form (<>.after (.this (' on_mail)) - ($_ <>.and ..argument ..argument ..argument))) + (all <>.and ..argument ..argument ..argument))) .any)))) (def: behavior^ (Parser BehaviorC) - ($_ <>.and - ..on_mail^ - (<>.some .any))) + (all <>.and + ..on_mail^ + (<>.some .any))) (def: (on_mail g!_ ?on_mail) (-> Code (Maybe On_MailC) Code) @@ -254,10 +254,10 @@ (def: actorP (Parser [Code [Text (List Text)] Code BehaviorC]) (|export|.parser - ($_ <>.and - ..actor_decl^ - .any - behavior^))) + (all <>.and + ..actor_decl^ + .any + behavior^))) (syntax: .public (actor: [[export_policy [name vars] state_type [?on_mail messages]] ..actorP]) (with_symbols [g!_] @@ -296,12 +296,12 @@ (def: signature^ (Parser Signature) - (.form ($_ <>.and - (<>.else (list) (.tuple (<>.some .local))) - .local - |input|.parser - .local - .local))) + (.form (all <>.and + (<>.else (list) (.tuple (<>.some .local))) + .local + |input|.parser + .local + .local))) (def: reference^ (Parser [Symbol (List Text)]) @@ -311,10 +311,10 @@ (def: messageP (Parser [Code Signature Code Code]) (|export|.parser - ($_ <>.and - ..signature^ - .any - .any))) + (all <>.and + ..signature^ + .any + .any))) (syntax: .public (message: [[export_policy signature output_type body] ..messageP]) (with_symbols [g!_ g!return] diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux index 619b9733d..0902501b4 100644 --- a/stdlib/source/library/lux/control/concurrency/thread.lux +++ b/stdlib/source/library/lux/control/concurrency/thread.lux @@ -112,9 +112,9 @@ (case (try (io.run! action)) {try.#Failure error} (exec - ("lux io log" ($_ "lux text concat" - "ERROR DURING THREAD EXECUTION:" text.new_line - error)) + ("lux io log" (all "lux text concat" + "ERROR DURING THREAD EXECUTION:" text.new_line + error)) []) {try.#Success _} diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index 3d34b95f7..173b8b9bf 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -79,22 +79,22 @@ (def: exception (Parser [Code (List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)]) (let [private (is (Parser [(List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)]) - ($_ <>.and - (<>.else (list) (.tuple (<>.some |type_variable|.parser))) - (<>.either (.form (<>.and .local |input|.parser)) - (<>.and .local (<>#in (list)))) - (<>.maybe .any) - ))] - ($_ <>.either - (<>.and .any private) - (<>.and (<>#in (` .private)) private) - ))) + (all <>.and + (<>.else (list) (.tuple (<>.some |type_variable|.parser))) + (<>.either (.form (<>.and .local |input|.parser)) + (<>.and .local (<>#in (list)))) + (<>.maybe .any) + ))] + (all <>.either + (<>.and .any private) + (<>.and (<>#in (` .private)) private) + ))) (syntax: .public (exception: [[export_policy t_vars [name inputs] body] ..exception]) (macro.with_symbols [g!_ g!descriptor] (do meta.monad [current_module meta.current_module_name - .let [descriptor ($_ text#composite "{" current_module "." name "}" text.new_line) + .let [descriptor (all text#composite "{" current_module "." name "}" text.new_line) g!self (code.local name)]] (in (list (` (def: (~ export_policy) (~ g!self) @@ -126,14 +126,14 @@ text.together)] (|> message (text.replaced text.new_line on_new_line) - ($_ text#composite padding header header_separator)))))] + (all text#composite padding header header_separator)))))] (case entries {.#End} "" {.#Item head tail} (list#mix (function (_ post pre) - ($_ text#composite pre text.new_line (on_entry post))) + (all text#composite pre text.new_line (on_entry post))) (on_entry head) tail)))) @@ -156,19 +156,19 @@ ..report')) (def: separator - (let [gap ($_ "lux text concat" text.new_line text.new_line) + (let [gap (all "lux text concat" text.new_line text.new_line) horizontal_line (|> "-" (list.repeated 64) text.together)] - ($_ "lux text concat" - gap - horizontal_line - gap))) + (all "lux text concat" + gap + horizontal_line + gap))) (def: (decorated prelude error) (-> Text Text Text) - ($_ "lux text concat" - prelude - ..separator - error)) + (all "lux text concat" + prelude + ..separator + error)) (def: .public (with exception message computation) (All (_ e a) (-> (Exception e) e (Try a) (Try a))) diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index 80674c8eb..8785e6cb7 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -22,11 +22,11 @@ (def: inline (Parser [Code [Text (List Code)] Code Code]) (|export|.parser - ($_ <>.and - ..declaration - .any - .any - ))) + (all <>.and + ..declaration + .any + .any + ))) (syntax: .public (inline: [[privacy [name parameters] type term] ..inline]) (do [! meta.monad] diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index 1c75c9f07..95a7f132f 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -32,11 +32,11 @@ (.def: mutual (Parser [Declaration Code Code]) - ($_ <>.and - declaration.parser - .any - .any - )) + (all <>.and + declaration.parser + .any + .any + )) (.def: (mutual_definition context g!context [g!name mutual]) (-> (List Code) Code [Code Mutual] Code) diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux index 1e360a194..2c32f7b8d 100644 --- a/stdlib/source/library/lux/control/parser/binary.lux +++ b/stdlib/source/library/lux/control/parser/binary.lux @@ -286,7 +286,7 @@ (def: .public location (Parser Location) - ($_ //.and ..text ..nat ..nat)) + (all //.and ..text ..nat ..nat)) (def: .public code (Parser Code) diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux index 516e6ff2e..70a65f6e5 100644 --- a/stdlib/source/library/lux/control/parser/code.lux +++ b/stdlib/source/library/lux/control/parser/code.lux @@ -35,7 +35,7 @@ (-> (List Code) Text) (|>> (list#each code.format) (text.interposed " ") - ($_ text#composite text.new_line "Remaining input: "))) + (all text#composite text.new_line "Remaining input: "))) (def: .public any (Parser Code) @@ -58,7 +58,7 @@ {try.#Success [tokens next]}))) (template [ ] - [(with_expansions [ (these {try.#Failure ($_ text#composite "Cannot parse " (remaining_inputs tokens))})] + [(with_expansions [ (these {try.#Failure (all text#composite "Cannot parse " (remaining_inputs tokens))})] (def: .public (Parser ) (function (_ tokens) @@ -97,13 +97,13 @@ {.#Item [token tokens']} (if (code#= code token) {try.#Success [tokens' []]} - {try.#Failure ($_ text#composite "Expected a " (code.format code) " but instead got " (code.format token) - (remaining_inputs tokens))}) + {try.#Failure (all text#composite "Expected a " (code.format code) " but instead got " (code.format token) + (remaining_inputs tokens))}) _ {try.#Failure "There are no tokens to parse!"}))) -(with_expansions [ (these {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] +(with_expansions [ (these {try.#Failure (all text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] (def: .public local (Parser Text) (function (_ tokens) @@ -126,7 +126,7 @@ _ )))) -(with_expansions [ (these {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] +(with_expansions [ (these {try.#Failure (all text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] (def: .public global (Parser Symbol) (function (_ tokens) @@ -164,10 +164,10 @@ {.#Item [[_ { members}] tokens']} (case (p members) {try.#Success [{.#End} x]} {try.#Success [tokens' x]} - _ {try.#Failure ($_ text#composite "Parser was expected to fully consume " (remaining_inputs tokens))}) + _ {try.#Failure (all text#composite "Parser was expected to fully consume " (remaining_inputs tokens))}) _ - {try.#Failure ($_ text#composite "Cannot parse " (remaining_inputs tokens))})))] + {try.#Failure (all text#composite "Cannot parse " (remaining_inputs tokens))})))] [form .#Form "form"] [variant .#Variant "variant"] @@ -179,7 +179,7 @@ (function (_ tokens) (case tokens {.#End} {try.#Success [tokens []]} - _ {try.#Failure ($_ text#composite "Expected list of tokens to be empty!" (remaining_inputs tokens))}))) + _ {try.#Failure (all text#composite "Expected list of tokens to be empty!" (remaining_inputs tokens))}))) (def: .public end? (Parser Bit) diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux index 1e380a218..b4f3daa90 100644 --- a/stdlib/source/library/lux/control/parser/text.lux +++ b/stdlib/source/library/lux/control/parser/text.lux @@ -177,7 +177,7 @@ (do //.monad [char any .let [char' (maybe.trusted (/.char 0 char))] - _ (//.assertion ($_ /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top)) + _ (//.assertion (all /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top)) (.and (n.>= bottom char') (n.<= top char')))] (in char))) @@ -188,7 +188,7 @@ [it ..any! char (..slice (in it)) .let [char' (maybe.trusted (/.char 0 char))] - _ (//.assertion ($_ /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top)) + _ (//.assertion (all /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top)) (.and (n.>= bottom char') (n.<= top char')))] (in it))) @@ -216,17 +216,17 @@ (def: .public hexadecimal (Parser Text) - ($_ //.either - ..decimal - (..range (char "a") (char "f")) - (..range (char "A") (char "F")))) + (all //.either + ..decimal + (..range (char "a") (char "f")) + (..range (char "A") (char "F")))) (def: .public hexadecimal! (Parser Slice) - ($_ //.either - ..decimal! - (..range! (char "a") (char "f")) - (..range! (char "A") (char "F")))) + (all //.either + ..decimal! + (..range! (char "a") (char "f")) + (..range! (char "A") (char "F")))) (template [] [(exception: .public ( [options Text @@ -319,7 +319,7 @@ (do //.monad [=left left =right right] - (in ($_ /#composite =left =right)))) + (in (all /#composite =left =right)))) (def: .public (and! left right) (-> (Parser Slice) (Parser Slice) (Parser Slice)) diff --git a/stdlib/source/library/lux/control/parser/tree.lux b/stdlib/source/library/lux/control/parser/tree.lux index 6828da45a..2db46e2b5 100644 --- a/stdlib/source/library/lux/control/parser/tree.lux +++ b/stdlib/source/library/lux/control/parser/tree.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" left right} [abstract [monad {"+" do}]] [control diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux index 3b837d8a9..f95894b0b 100644 --- a/stdlib/source/library/lux/control/parser/type.lux +++ b/stdlib/source/library/lux/control/parser/type.lux @@ -137,7 +137,7 @@ (def: (label idx) (-> Nat Code) - (code.local ($_ text#composite "label" text.tab (n#encoded idx)))) + (code.local (all text#composite "label" text.tab (n#encoded idx)))) (def: .public (with_extension type poly) (All (_ a) (-> Type (Parser a) (Parser [Code a]))) diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux index 3a895593e..672783d02 100644 --- a/stdlib/source/library/lux/control/remember.lux +++ b/stdlib/source/library/lux/control/remember.lux @@ -38,17 +38,17 @@ (def: deadline (Parser Date) - ($_ <>.either - (<>#each (|>> instant.of_millis instant.date) - .int) - (do <>.monad - [raw .text] - (case (# date.codec decoded raw) - {try.#Success date} - (in date) - - {try.#Failure message} - (<>.failure message))))) + (all <>.either + (<>#each (|>> instant.of_millis instant.date) + .int) + (do <>.monad + [raw .text] + (case (# date.codec decoded raw) + {try.#Success date} + (in date) + + {try.#Failure message} + (<>.failure message))))) (syntax: .public (remember [deadline ..deadline message .text diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 322f2cf5b..4878554bf 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -41,9 +41,9 @@ (syntax: .public (capability: [[export_policy declaration [forger input output]] (|export|.parser - ($_ <>.and - |declaration|.parser - (.form ($_ <>.and .local .any .any))))]) + (all <>.and + |declaration|.parser + (.form (all <>.and .local .any .any))))]) (macro.with_symbols [g!_] (do [! meta.monad] [this_module meta.current_module_name diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux index b2c5b02fc..1fd3037b9 100644 --- a/stdlib/source/library/lux/control/try.lux +++ b/stdlib/source/library/lux/control/try.lux @@ -159,9 +159,9 @@ text$ ("lux in-module" "library/lux" .text$)] {.#Right [state (.list (` (.if (~ test) (~ then) - {..#Failure (~ (text$ ($_ "lux text concat" - "[" (code#encoded (` .when)) "]" - " " "Invalid condition:")))})))]}) + {..#Failure (~ (text$ (all "lux text concat" + "[" (code#encoded (` .when)) "]" + " " "Invalid condition:")))})))]}) _ {.#Left "Wrong syntax for 'when'"})) diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux index e099a841b..3c95f2544 100644 --- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux @@ -552,10 +552,10 @@ (list) {.#Some node'} - ($_ list#composite - (again (the #left node')) - (list ) - (again (the #right node'))))))] + (all list#composite + (again (the #left node')) + (list ) + (again (the #right node'))))))] [entries [k v] [(the #key node') (the #value node')]] [keys k (the #key node')] diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux index e0f68faa3..19ac281fc 100644 --- a/stdlib/source/library/lux/data/collection/list.lux +++ b/stdlib/source/library/lux/data/collection/list.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" revised} + [lux {"-" revised all} ["@" target] [abstract [monoid {"+" Monoid}] @@ -387,7 +387,7 @@ (is (~~ (type_of xs)) (list))]) xs')] - ($_ composite (sorted < pre) (list x) (sorted < post))))) + (.all composite (sorted < pre) (list x) (sorted < post))))) (def: .public (empty? xs) (All (_ a) (Predicate (List a))) diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux index e45697595..d0790fa4f 100644 --- a/stdlib/source/library/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" left right} ["@" target] [abstract [functor {"+" Functor}] @@ -35,13 +35,13 @@ (Equivalence (Zipper a)))) (def: (= reference sample) - (let [== ($_ product.equivalence - (maybe.equivalence - ($_ product.equivalence - = - (list.equivalence (//.equivalence super)) - (list.equivalence (//.equivalence super)))) - (//.equivalence super))] + (let [== (all product.equivalence + (maybe.equivalence + (all product.equivalence + = + (list.equivalence (//.equivalence super)) + (list.equivalence (//.equivalence super)))) + (//.equivalence super))] (== reference sample)))) (def: .public (zipper tree) diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux index dc2f0fff7..7a907d83e 100644 --- a/stdlib/source/library/lux/data/color.lux +++ b/stdlib/source/library/lux/data/color.lux @@ -81,10 +81,10 @@ (def: (hash value) (let [[r g b] (representation value)] - ($_ i64.or - (i64.left_shifted 16 r) - (i64.left_shifted 8 g) - b)))) + (all i64.or + (i64.left_shifted 16 r) + (i64.left_shifted 8 g) + b)))) (def: .public black Color @@ -140,8 +140,8 @@ red (..down red) green (..down green) blue (..down blue) - max ($_ f.max red green blue) - min ($_ f.min red green blue) + max (all f.max red green blue) + min (all f.min red green blue) luminance (|> (f.+ max min) (f./ +2.0))] (if (f.= max min) ... Achromatic @@ -212,8 +212,8 @@ red (..down red) green (..down green) blue (..down blue) - max ($_ f.max red green blue) - min ($_ f.min red green blue) + max (all f.max red green blue) + min (all f.min red green blue) brightness max diff (|> max (f.- min)) saturation (if (f.= +0.0 max) @@ -261,7 +261,7 @@ red (..down red) green (..down green) blue (..down blue) - key (|> +1.0 (f.- ($_ f.max red green blue))) + key (|> +1.0 (f.- (all f.max red green blue))) f (if (f.< +1.0 key) (|> +1.0 (f./ (|> +1.0 (f.- key)))) +0.0) diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux index 6e9e000ad..88ee81c34 100644 --- a/stdlib/source/library/lux/data/format/binary.lux +++ b/stdlib/source/library/lux/data/format/binary.lux @@ -265,7 +265,7 @@ (def: .public location (Writer Location) - ($_ ..and ..text ..nat ..nat)) + (all ..and ..text ..nat ..nat)) (def: .public code (Writer Code) diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux index 28d3c849a..418513440 100644 --- a/stdlib/source/library/lux/data/format/html.lux +++ b/stdlib/source/library/lux/data/format/html.lux @@ -297,15 +297,15 @@ (def: .public (each attributes areas for) (-> Attributes (List [Attributes Shape]) Image Image) - ($_ ..and - for - (case (list#each (product.uncurried ..area) areas) - {.#End} - (..empty "map" attributes) - - {.#Item head tail} - (..tag "map" attributes - (list#mix (function.flipped ..and) head tail))))) + (all ..and + for + (case (list#each (product.uncurried ..area) areas) + {.#End} + (..empty "map" attributes) + + {.#Item head tail} + (..tag "map" attributes + (list#mix (function.flipped ..and) head tail))))) (.template [ ] [(def: .public @@ -349,9 +349,9 @@ (..tag attributes (case description {.#Some description} - ($_ ..and - (..tag (list) description) - content) + (all ..and + (..tag (list) description) + content) {.#None} content)))] @@ -417,17 +417,17 @@ (def: (ruby_pronunciation pronunciation) (-> Content (HTML Any)) (..tag "rt" (list) - ($_ ..and - (..tag "rp" (list) (..text "(")) - pronunciation - (..tag "rp" (list) (..text ")"))))) + (all ..and + (..tag "rp" (list) (..text "(")) + pronunciation + (..tag "rp" (list) (..text ")"))))) (def: .public (ruby attributes content pronunciation) (-> Attributes Content Content Element) (..tag "ruby" attributes - ($_ ..and - content - (ruby_pronunciation pronunciation)))) + (all ..and + content + (ruby_pronunciation pronunciation)))) (type: .public Composite (-> Attributes Element Element)) @@ -462,9 +462,9 @@ (def: .public (description_list attributes descriptions) (-> Attributes (List [Content Element]) Element) (case (list#each (function (_ [term description]) - ($_ ..and - (..term term) - (..description description))) + (all ..and + (..term term) + (..description description))) descriptions) {.#End} (..empty "dl" attributes) diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 2f21d8dc5..1eb7c31fb 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -83,17 +83,17 @@ (.Parser JSON') (<>.rec (function (_ jsonP) - ($_ <>.or - (.form (<>#in [])) - .bit - .frac - .text - (<>#each sequence.of_list - (.tuple (<>.some jsonP))) - (<>#each (dictionary.of_list text.hash) - (.variant (<>.some (<>.and .text jsonP)))) - .any - )))) + (all <>.or + (.form (<>#in [])) + .bit + .frac + .text + (<>#each sequence.of_list + (.tuple (<>.some jsonP))) + (<>#each (dictionary.of_list text.hash) + (.variant (<>.some (<>.and .text jsonP)))) + .any + )))) (def: (jsonF token) (-> JSON' Code) @@ -132,7 +132,7 @@ {try.#Success (dictionary.keys obj)} _ - {try.#Failure ($_ text#composite "Cannot get the fields of a non-object.")})) + {try.#Failure (all text#composite "Cannot get the fields of a non-object.")})) (def: .public (field key json) (-> String JSON (Try JSON)) @@ -143,10 +143,10 @@ {try.#Success value} {.#None} - {try.#Failure ($_ text#composite "Missing field '" key "' on object.")}) + {try.#Failure (all text#composite "Missing field '" key "' on object.")}) _ - {try.#Failure ($_ text#composite "Cannot get field '" key "' on a non-object.")})) + {try.#Failure (all text#composite "Cannot get field '" key "' on a non-object.")})) (def: .public (has key value json) (-> String JSON JSON (Try JSON)) @@ -155,7 +155,7 @@ {try.#Success {#Object (dictionary.has key value obj)}} _ - {try.#Failure ($_ text#composite "Cannot set field '" key "' on a non-object.")})) + {try.#Failure (all text#composite "Cannot set field '" key "' on a non-object.")})) (template [ ] [(def: .public ( key json) @@ -165,7 +165,7 @@ {try.#Success value} {try.#Success _} - {try.#Failure ($_ text#composite "Wrong value type at key: " key)} + {try.#Failure (all text#composite "Wrong value type at key: " key)} {try.#Failure error} {try.#Failure error}))] @@ -275,11 +275,11 @@ (def: (kv_format format [key value]) (-> (-> JSON Text) (-> [String JSON] Text)) - ($_ text#composite - (..string_format key) - ..entry_separator - (format value) - )) + (all text#composite + (..string_format key) + ..entry_separator + (format value) + )) (def: (object_format format) (-> (-> JSON Text) (-> Object Text)) @@ -312,10 +312,10 @@ (def: value_separator_parser (Parser [Text Any Text]) - ($_ <>.and - ..space_parser - (.this ..value_separator) - ..space_parser)) + (all <>.and + ..space_parser + (.this ..value_separator) + ..space_parser)) (def: null_parser (Parser Null) @@ -336,9 +336,9 @@ (def: boolean_parser (Parser Boolean) - ($_ <>.either - ..true_parser - ..false_parser)) + (all <>.either + ..true_parser + ..false_parser)) (def: number_parser (Parser Number) @@ -354,8 +354,8 @@ [mark (.one_of "eE") signed?' (<>.parses? (.this "-")) offset (.many .decimal)] - (in ($_ text#composite mark (if signed?' "-" "") offset))))] - (case (f#decoded ($_ text#composite (if signed? "-" "") digits "." decimals exp)) + (in (all text#composite mark (if signed?' "-" "") offset))))] + (case (f#decoded (all text#composite (if signed? "-" "") digits "." decimals exp)) {try.#Failure message} (<>.failure message) @@ -364,21 +364,21 @@ (def: escaped_parser (Parser Text) - ($_ <>.either - (<>.after (.this "\t") - (<>#in text.tab)) - (<>.after (.this "\b") - (<>#in text.back_space)) - (<>.after (.this "\n") - (<>#in text.new_line)) - (<>.after (.this "\r") - (<>#in text.carriage_return)) - (<>.after (.this "\f") - (<>#in text.form_feed)) - (<>.after (.this (text#composite "\" text.double_quote)) - (<>#in text.double_quote)) - (<>.after (.this "\\") - (<>#in "\")))) + (all <>.either + (<>.after (.this "\t") + (<>#in text.tab)) + (<>.after (.this "\b") + (<>#in text.back_space)) + (<>.after (.this "\n") + (<>#in text.new_line)) + (<>.after (.this "\r") + (<>#in text.carriage_return)) + (<>.after (.this "\f") + (<>#in text.form_feed)) + (<>.after (.this (text#composite "\" text.double_quote)) + (<>#in text.double_quote)) + (<>.after (.this "\\") + (<>#in "\")))) (def: string_parser (Parser String) @@ -391,7 +391,7 @@ (do ! [escaped escaped_parser next_chars (again [])] - (in ($_ text#composite chars escaped next_chars))) + (in (all text#composite chars escaped next_chars))) (in chars)))) (def: (kv_parser json_parser) @@ -423,13 +423,13 @@ (Parser JSON) (<>.rec (function (_ json_parser) - ($_ <>.or - null_parser - boolean_parser - number_parser - string_parser - (array_parser json_parser) - (object_parser json_parser))))) + (all <>.or + null_parser + boolean_parser + number_parser + string_parser + (array_parser json_parser) + (object_parser json_parser))))) (implementation: .public codec (Codec Text JSON) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 0069ebb85..5e3c57155 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -353,46 +353,46 @@ (def: small_number (-> Size Size) - (|>> ($_ n.+ ..blank_size ..null_size))) + (|>> (all n.+ ..blank_size ..null_size))) (def: big_number (-> Size Size) - (|>> ($_ n.+ ..blank_size))) + (|>> (all n.+ ..blank_size))) (def: string (-> Size Size) - (|>> ($_ n.+ ..null_size))) + (|>> (all n.+ ..null_size))) (def: header_size - ($_ n.+ - ... name - (..string ..path_size) - ... mode - (..small_number ..mode_size) - ... uid - (..small_number ..owner_id_size) - ... gid - (..small_number ..owner_id_size) - ... size - (..big_number ..content_size) - ... mtime - (..big_number ..modification_time_size) - ... chksum - (..small_number ..checksum_size) - ... linkflag - ..link_flag_size - ... linkname - (..string ..path_size) - ... magic - (..string ..magic_size) - ... uname - (..string ..name_size) - ... gname - (..string ..name_size) - ... devmajor - (..small_number ..device_size) - ... devminor - (..small_number ..device_size))) + (all n.+ + ... name + (..string ..path_size) + ... mode + (..small_number ..mode_size) + ... uid + (..small_number ..owner_id_size) + ... gid + (..small_number ..owner_id_size) + ... size + (..big_number ..content_size) + ... mtime + (..big_number ..modification_time_size) + ... chksum + (..small_number ..checksum_size) + ... linkflag + ..link_flag_size + ... linkname + (..string ..path_size) + ... magic + (..string ..magic_size) + ... uname + (..string ..name_size) + ... gname + (..string ..name_size) + ... devmajor + (..small_number ..device_size) + ... devminor + (..small_number ..device_size))) (abstract: Link_Flag Char @@ -493,25 +493,25 @@ (def: maximum_mode Mode - ($_ and - ..none - - ..execute_by_other - ..write_by_other - ..read_by_other - - ..execute_by_group - ..write_by_group - ..read_by_group - - ..execute_by_owner - ..write_by_owner - ..read_by_owner - - ..save_text - ..set_group_id_on_execution - ..set_user_id_on_execution - )) + (all and + ..none + + ..execute_by_other + ..write_by_other + ..read_by_other + + ..execute_by_group + ..write_by_group + ..read_by_group + + ..execute_by_owner + ..write_by_owner + ..read_by_owner + + ..save_text + ..set_group_id_on_execution + ..set_user_id_on_execution + )) (def: mode_parser (Parser Mode) @@ -622,22 +622,22 @@ (def: header_writer' (Writer Header) - ($_ format.and - ..path_writer - ..mode_writer - ..small_writer - ..small_writer - ..big_writer - ..big_writer - ..checksum_writer - ..link_flag_writer - ..path_writer - ..magic_writer - ..name_writer - ..name_writer - ..small_writer - ..small_writer - )) + (all format.and + ..path_writer + ..mode_writer + ..small_writer + ..small_writer + ..big_writer + ..big_writer + ..checksum_writer + ..link_flag_writer + ..path_writer + ..magic_writer + ..name_writer + ..name_writer + ..small_writer + ..small_writer + )) (def: (header_writer header) (Writer Header) @@ -661,9 +661,9 @@ (-> Link_Flag (Writer File)) (function (_ [path modification_time mode ownership content]) (let [[size content] (..from_content content) - writer ($_ format.and - ..header_writer - (format.segment (..rounded_content_size size)))] + writer (all format.and + ..header_writer + (format.segment (..rounded_content_size size)))] (writer [[#path path #mode mode #user_id (the [#user #id] ownership) diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux index 30e75d6e6..d30f2aeee 100644 --- a/stdlib/source/library/lux/data/format/xml.lux +++ b/stdlib/source/library/lux/data/format/xml.lux @@ -46,13 +46,13 @@ (def: xml_standard_escape_char^ (Parser Text) - ($_ <>.either - (<>.after (.this "<") (<>#in "<")) - (<>.after (.this ">") (<>#in ">")) - (<>.after (.this "&") (<>#in "&")) - (<>.after (.this "'") (<>#in "'")) - (<>.after (.this """) (<>#in text.double_quote)) - )) + (all <>.either + (<>.after (.this "<") (<>#in "<")) + (<>.after (.this ">") (<>#in ">")) + (<>.after (.this "&") (<>#in "&")) + (<>.after (.this "'") (<>#in "'")) + (<>.after (.this """) (<>#in text.double_quote)) + )) (def: xml_unicode_escape_char^ (Parser Text) @@ -78,17 +78,17 @@ (def: xml_char^ (Parser Text) - (<>.either (.none_of ($_ text#composite "<>&" text.double_quote)) + (<>.either (.none_of (all text#composite "<>&" text.double_quote)) xml_escape_char^)) (def: xml_identifier (Parser Text) (.slice - ($_ .and! - (<>.either (.one_of! "_") - .alpha!) - (.some! (<>.either (.one_of! "_.-") - .alpha_num!))))) + (all .and! + (<>.either (.one_of! "_") + .alpha!) + (.some! (<>.either (.one_of! "_.-") + .alpha_num!))))) (def: namespaced_symbol^ (Parser Symbol) @@ -132,9 +132,9 @@ ..spaced^ (<>.after (.this "/")) (.enclosed ["<" ">"]))] - (<>.assertion ($_ text#composite "Close tag does not match open tag." \n - "Expected: " (symbol#encoded expected) \n - " Actual: " (symbol#encoded actual) \n) + (<>.assertion (all text#composite "Close tag does not match open tag." \n + "Expected: " (symbol#encoded expected) \n + " Actual: " (symbol#encoded actual) \n) (symbol#= expected actual)))) (def: comment^ @@ -177,24 +177,24 @@ [_ (.this "<") tag (..spaced^ tag^) attrs (..spaced^ attrs^) - .let [no_children^ ($_ <>.either - (do <>.monad - [_ (.this "/>")] - (in {#Node tag attrs (list)})) - (do <>.monad - [_ (.this ">") - _ (<>.some (<>.either .space! - ..comment^)) - _ (..close_tag^ tag)] - (in {#Node tag attrs (list)}))) + .let [no_children^ (all <>.either + (do <>.monad + [_ (.this "/>")] + (in {#Node tag attrs (list)})) + (do <>.monad + [_ (.this ">") + _ (<>.some (<>.either .space! + ..comment^)) + _ (..close_tag^ tag)] + (in {#Node tag attrs (list)}))) with_children^ (do <>.monad [_ (.this ">") children (<>.many node^) _ (..close_tag^ tag)] (in {#Node tag attrs children}))]] - ($_ <>.either - no_children^ - with_children^)) + (all <>.either + no_children^ + with_children^)) ..spaced^ (<>.before (<>.some ..comment^)) (<>.after (<>.some ..comment^)) @@ -215,7 +215,7 @@ (-> Tag Text) (case namespace "" name - _ ($_ text#composite namespace ..namespace_separator name))) + _ (all text#composite namespace ..namespace_separator name))) (def: .public attribute (-> Attribute Text) @@ -225,12 +225,12 @@ Text (let [quote (is (-> Text Text) (function (_ value) - ($_ text#composite text.double_quote value text.double_quote)))] - ($_ text#composite - ""))) + (all text#composite text.double_quote value text.double_quote)))] + (all text#composite + ""))) (implementation: .public codec (Codec Text XML) @@ -241,40 +241,40 @@ (|> attrs dictionary.entries (list#each (function (_ [key value]) - ($_ text#composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote))) + (all text#composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote))) (text.interposed " "))))] (function (_ input) - ($_ text#composite - ..xml_header text.new_line - (loop (again [prefix "" - input input]) - (case input - {#Text value} - (sanitize_value value) - - (pattern {#Node xml_tag xml_attrs (list {#Text value})}) - (let [tag (..tag xml_tag) - attrs (if (dictionary.empty? xml_attrs) - "" - ($_ text#composite " " (attributes xml_attrs)))] - ($_ text#composite - prefix "<" tag attrs ">" - (sanitize_value value) - "")) - - {#Node xml_tag xml_attrs xml_children} - (let [tag (..tag xml_tag) - attrs (if (dictionary.empty? xml_attrs) - "" - ($_ text#composite " " (attributes xml_attrs)))] - (if (list.empty? xml_children) - ($_ text#composite prefix "<" tag attrs "/>") - ($_ text#composite prefix "<" tag attrs ">" - (|> xml_children - (list#each (|>> (again (text#composite prefix text.tab)) (text#composite text.new_line))) - text.together) - text.new_line prefix ""))))) - )))) + (all text#composite + ..xml_header text.new_line + (loop (again [prefix "" + input input]) + (case input + {#Text value} + (sanitize_value value) + + (pattern {#Node xml_tag xml_attrs (list {#Text value})}) + (let [tag (..tag xml_tag) + attrs (if (dictionary.empty? xml_attrs) + "" + (all text#composite " " (attributes xml_attrs)))] + (all text#composite + prefix "<" tag attrs ">" + (sanitize_value value) + "")) + + {#Node xml_tag xml_attrs xml_children} + (let [tag (..tag xml_tag) + attrs (if (dictionary.empty? xml_attrs) + "" + (all text#composite " " (attributes xml_attrs)))] + (if (list.empty? xml_children) + (all text#composite prefix "<" tag attrs "/>") + (all text#composite prefix "<" tag attrs ">" + (|> xml_children + (list#each (|>> (again (text#composite prefix text.tab)) (text#composite text.new_line))) + text.together) + text.new_line prefix ""))))) + )))) (def: decoded (.result ..xml^))) diff --git a/stdlib/source/library/lux/data/product.lux b/stdlib/source/library/lux/data/product.lux index 6f4743a46..f516c7d97 100644 --- a/stdlib/source/library/lux/data/product.lux +++ b/stdlib/source/library/lux/data/product.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" left right} [abstract [equivalence {"+" Equivalence}] [hash {"+" Hash}]]]]) diff --git a/stdlib/source/library/lux/data/sum.lux b/stdlib/source/library/lux/data/sum.lux index c2b3d7512..5d1fe365b 100644 --- a/stdlib/source/library/lux/data/sum.lux +++ b/stdlib/source/library/lux/data/sum.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" left right} [abstract [equivalence {"+" Equivalence}] [hash {"+" Hash}]]]]) diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index 7f530a137..22ee37a50 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -122,7 +122,7 @@ (def: .public (enclosed [left right] content) (-> [Text Text] Text Text) - ($_ "lux text concat" left content right)) + (all "lux text concat" left content right)) (def: .public (enclosed' boundary content) (-> Text Text Text) @@ -182,7 +182,7 @@ (<| (maybe.else template) (do maybe.monad [[pre post] (..split_by pattern template)] - (in ($_ "lux text concat" pre replacement post))))) + (in (all "lux text concat" pre replacement post))))) (for @.js (these (macro: (defined? tokens lux) (case tokens @@ -216,7 +216,7 @@ right template]) (case (..split_by pattern right) {.#Some [pre post]} - (again ($_ "lux text concat" left pre replacement) post) + (again (all "lux text concat" left pre replacement) post) {.#None} ("lux text concat" left right)))] diff --git a/stdlib/source/library/lux/data/text/format.lux b/stdlib/source/library/lux/data/text/format.lux index ee3f8ddc5..5b719d954 100644 --- a/stdlib/source/library/lux/data/text/format.lux +++ b/stdlib/source/library/lux/data/text/format.lux @@ -49,7 +49,7 @@ (|>> f fb))) (syntax: .public (format [fragments (<>.many .any)]) - (in (.list (` ($_ "lux text concat" (~+ fragments)))))) + (in (.list (` (all "lux text concat" (~+ fragments)))))) (template [ ] [(def: .public diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index c24c0093f..1b784bebe 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -3,7 +3,7 @@ [lux {"-" pattern} ["[0]" meta] [abstract - monad] + [monad {"+" do}]] [control ["[0]" maybe] ["[0]" try] @@ -71,11 +71,11 @@ (def: (symbol^ current_module) (-> Text (Parser Symbol)) - ($_ <>.either - (<>.and (<>#in current_module) (<>.after (.this "..") symbol_part^)) - (<>.and symbol_part^ (<>.after (.this ".") symbol_part^)) - (<>.and (<>#in .prelude_module) (<>.after (.this ".") symbol_part^)) - (<>.and (<>#in "") symbol_part^))) + (all <>.either + (<>.and (<>#in current_module) (<>.after (.this "..") symbol_part^)) + (<>.and symbol_part^ (<>.after (.this ".") symbol_part^)) + (<>.and (<>#in .prelude_module) (<>.after (.this ".") symbol_part^)) + (<>.and (<>#in "") symbol_part^))) (def: (re_var^ current_module) (-> Text (Parser Code)) @@ -107,12 +107,12 @@ (Parser Code) (do <>.monad [negate? (<>.maybe (.this "^")) - parts (<>.many ($_ <>.either - re_range^ - re_options^))] + parts (<>.many (all <>.either + re_range^ + re_options^))] (in (case negate? - {.#Some _} (` ((~! .not) ($_ ((~! <>.either)) (~+ parts)))) - {.#None} (` ($_ ((~! <>.either)) (~+ parts))))))) + {.#Some _} (` ((~! .not) (all ((~! <>.either)) (~+ parts)))) + {.#None} (` (all ((~! <>.either)) (~+ parts))))))) (def: re_user_class^ (Parser Code) @@ -157,30 +157,30 @@ (Parser Code) (do <>.monad [] - ($_ <>.either - (<>.after (.this ".") (in (` (~! .any)))) - (<>.after (.this "\d") (in (` (~! .decimal)))) - (<>.after (.this "\D") (in (` ((~! .not) (~! .decimal))))) - (<>.after (.this "\s") (in (` (~! .space)))) - (<>.after (.this "\S") (in (` ((~! .not) (~! .space))))) - (<>.after (.this "\w") (in (` (~! word^)))) - (<>.after (.this "\W") (in (` ((~! .not) (~! word^))))) - - (<>.after (.this "\p{Lower}") (in (` (~! .lower)))) - (<>.after (.this "\p{Upper}") (in (` (~! .upper)))) - (<>.after (.this "\p{Alpha}") (in (` (~! .alpha)))) - (<>.after (.this "\p{Digit}") (in (` (~! .decimal)))) - (<>.after (.this "\p{Alnum}") (in (` (~! .alpha_num)))) - (<>.after (.this "\p{Space}") (in (` (~! .space)))) - (<>.after (.this "\p{HexDigit}") (in (` (~! .hexadecimal)))) - (<>.after (.this "\p{OctDigit}") (in (` (~! .octal)))) - (<>.after (.this "\p{Blank}") (in (` (~! blank^)))) - (<>.after (.this "\p{ASCII}") (in (` (~! ascii^)))) - (<>.after (.this "\p{Contrl}") (in (` (~! control^)))) - (<>.after (.this "\p{Punct}") (in (` (~! punct^)))) - (<>.after (.this "\p{Graph}") (in (` (~! graph^)))) - (<>.after (.this "\p{Print}") (in (` (~! print^)))) - ))) + (all <>.either + (<>.after (.this ".") (in (` (~! .any)))) + (<>.after (.this "\d") (in (` (~! .decimal)))) + (<>.after (.this "\D") (in (` ((~! .not) (~! .decimal))))) + (<>.after (.this "\s") (in (` (~! .space)))) + (<>.after (.this "\S") (in (` ((~! .not) (~! .space))))) + (<>.after (.this "\w") (in (` (~! word^)))) + (<>.after (.this "\W") (in (` ((~! .not) (~! word^))))) + + (<>.after (.this "\p{Lower}") (in (` (~! .lower)))) + (<>.after (.this "\p{Upper}") (in (` (~! .upper)))) + (<>.after (.this "\p{Alpha}") (in (` (~! .alpha)))) + (<>.after (.this "\p{Digit}") (in (` (~! .decimal)))) + (<>.after (.this "\p{Alnum}") (in (` (~! .alpha_num)))) + (<>.after (.this "\p{Space}") (in (` (~! .space)))) + (<>.after (.this "\p{HexDigit}") (in (` (~! .hexadecimal)))) + (<>.after (.this "\p{OctDigit}") (in (` (~! .octal)))) + (<>.after (.this "\p{Blank}") (in (` (~! blank^)))) + (<>.after (.this "\p{ASCII}") (in (` (~! ascii^)))) + (<>.after (.this "\p{Contrl}") (in (` (~! control^)))) + (<>.after (.this "\p{Punct}") (in (` (~! punct^)))) + (<>.after (.this "\p{Graph}") (in (` (~! graph^)))) + (<>.after (.this "\p{Print}") (in (` (~! print^)))) + ))) (def: re_class^ (Parser Code) @@ -206,12 +206,12 @@ (def: (re_simple^ current_module) (-> Text (Parser Code)) - ($_ <>.either - re_class^ - (re_var^ current_module) - re_back_reference^ - re_char^ - )) + (all <>.either + re_class^ + (re_var^ current_module) + re_back_reference^ + re_char^ + )) (def: (re_simple_quantified^ current_module) (-> Text (Parser Code)) @@ -241,24 +241,24 @@ (do [! <>.monad] [base (re_simple^ current_module)] (<| (.enclosed ["{" "}"]) - ($_ <>.either - (do ! - [[from to] (<>.and number^ (<>.after (.this ",") number^)) - _ (<>.assertion (exception.error ..incorrect_quantification [from to]) - (n.<= to from))] - (in (` ((~! together^) ((~! <>.between) - (~ (code.nat from)) - (~ (code.nat (n.- from to))) - (~ base)))))) - (do ! - [limit (<>.after (.this ",") number^)] - (in (` ((~! together^) ((~! <>.at_most) (~ (code.nat limit)) (~ base)))))) - (do ! - [limit (<>.before (.this ",") number^)] - (in (` ((~! together^) ((~! <>.at_least) (~ (code.nat limit)) (~ base)))))) - (do ! - [limit number^] - (in (` ((~! together^) ((~! <>.exactly) (~ (code.nat limit)) (~ base)))))))))) + (all <>.either + (do ! + [[from to] (<>.and number^ (<>.after (.this ",") number^)) + _ (<>.assertion (exception.error ..incorrect_quantification [from to]) + (n.<= to from))] + (in (` ((~! together^) ((~! <>.between) + (~ (code.nat from)) + (~ (code.nat (n.- from to))) + (~ base)))))) + (do ! + [limit (<>.after (.this ",") number^)] + (in (` ((~! together^) ((~! <>.at_most) (~ (code.nat limit)) (~ base)))))) + (do ! + [limit (<>.before (.this ",") number^)] + (in (` ((~! together^) ((~! <>.at_least) (~ (code.nat limit)) (~ base)))))) + (do ! + [limit number^] + (in (` ((~! together^) ((~! <>.exactly) (~ (code.nat limit)) (~ base)))))))))) (def: (re_quantified^ current_module) (-> Text (Parser Code)) @@ -267,9 +267,9 @@ (def: (re_complex^ current_module) (-> Text (Parser Code)) - ($_ <>.either - (re_quantified^ current_module) - (re_simple^ current_module))) + (all <>.either + (re_quantified^ current_module) + (re_simple^ current_module))) (type: Re_Group (Variant @@ -380,35 +380,35 @@ (if (list.empty? tail) (in head) (in [(list#mix n.max (product.left head) (list#each product.left tail)) - (` ($_ ((~ (if capturing? - (` (~! |||^)) - (` (~! |||_^))))) - (~ (prep_alternative head)) - (~+ (list#each prep_alternative tail))))])))) + (` (all ((~ (if capturing? + (` (~! |||^)) + (` (~! |||_^))))) + (~ (prep_alternative head)) + (~+ (list#each prep_alternative tail))))])))) (def: (re_scoped^ current_module) (-> Text (Parser [Re_Group Code])) - ($_ <>.either - (do <>.monad - [_ (.this "(?:") - [_ scoped] (re_alternative^ #0 re_scoped^ current_module) - _ (.this ")")] - (in [{#Non_Capturing} scoped])) - (do <>.monad - [complex (re_complex^ current_module)] - (in [{#Non_Capturing} complex])) - (do <>.monad - [_ (.this "(?<") - captured_symbol symbol_part^ - _ (.this ">") - [num_captures pattern] (re_alternative^ #1 re_scoped^ current_module) - _ (.this ")")] - (in [{#Capturing [{.#Some captured_symbol} num_captures]} pattern])) - (do <>.monad - [_ (.this "(") - [num_captures pattern] (re_alternative^ #1 re_scoped^ current_module) - _ (.this ")")] - (in [{#Capturing [{.#None} num_captures]} pattern])))) + (all <>.either + (do <>.monad + [_ (.this "(?:") + [_ scoped] (re_alternative^ #0 re_scoped^ current_module) + _ (.this ")")] + (in [{#Non_Capturing} scoped])) + (do <>.monad + [complex (re_complex^ current_module)] + (in [{#Non_Capturing} complex])) + (do <>.monad + [_ (.this "(?<") + captured_symbol symbol_part^ + _ (.this ">") + [num_captures pattern] (re_alternative^ #1 re_scoped^ current_module) + _ (.this ")")] + (in [{#Capturing [{.#Some captured_symbol} num_captures]} pattern])) + (do <>.monad + [_ (.this "(") + [num_captures pattern] (re_alternative^ #1 re_scoped^ current_module) + _ (.this ")")] + (in [{#Capturing [{.#None} num_captures]} pattern])))) (def: (regex^ current_module) (-> Text (Parser Code)) diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux index df7afedc8..29552979a 100644 --- a/stdlib/source/library/lux/data/text/unicode/set.lux +++ b/stdlib/source/library/lux/data/text/unicode/set.lux @@ -152,11 +152,11 @@ (def: .public character Set - ($_ ..composite - ..character/0 - ..character/1 - ..character/2 - )) + (all ..composite + ..character/0 + ..character/1 + ..character/2 + )) (def: .public non_character Set @@ -195,10 +195,10 @@ (def: .public full Set - ($_ ..composite - ..character - ..non_character - )) + (all ..composite + ..character + ..non_character + )) (def: .public start (-> Set Char) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index d5ed1cff8..e1729e2ad 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -389,58 +389,58 @@ (def: primitive_representation (Parser Representation) - (`` ($_ <>.either - (do <>.monad - [_ (.exactly Any)] - (in (function.constant "[]"))) - - (~~ (template [ ] - [(do <>.monad - [_ (.sub )] - (in (|>> (as ) )))] - - [Bit %.bit] - [Nat %.nat] - [Int %.int] - [Rev %.rev] - [Frac %.frac] - [Text %.text])) - ))) + (`` (all <>.either + (do <>.monad + [_ (.exactly Any)] + (in (function.constant "[]"))) + + (~~ (template [ ] + [(do <>.monad + [_ (.sub )] + (in (|>> (as ) )))] + + [Bit %.bit] + [Nat %.nat] + [Int %.int] + [Rev %.rev] + [Frac %.frac] + [Text %.text])) + ))) (def: (special_representation representation) (-> (Parser Representation) (Parser Representation)) - (`` ($_ <>.either - (~~ (template [ ] - [(do <>.monad - [_ (.sub )] - (in (|>> (as ) )))] - - [Ratio %.ratio] - [Symbol %.symbol] - [Location %.location] - [Type %.type] - [Code %.code] - - [Instant %.instant] - [Duration %.duration] - [Date %.date] - [Time %.time] - [Month %.month] - [Day %.day] - - [json.JSON %.json] - [XML %.xml])) - - (do <>.monad - [[_ elemT] (.applied (<>.and (.exactly List) .any)) - elemR (.local (list elemT) representation)] - (in (|>> (as (List Any)) (%.list elemR)))) - - (do <>.monad - [[_ elemT] (.applied (<>.and (.exactly Maybe) .any)) - elemR (.local (list elemT) representation)] - (in (|>> (as (Maybe Any)) - (%.maybe elemR))))))) + (`` (all <>.either + (~~ (template [ ] + [(do <>.monad + [_ (.sub )] + (in (|>> (as ) )))] + + [Ratio %.ratio] + [Symbol %.symbol] + [Location %.location] + [Type %.type] + [Code %.code] + + [Instant %.instant] + [Duration %.duration] + [Date %.date] + [Time %.time] + [Month %.month] + [Day %.day] + + [json.JSON %.json] + [XML %.xml])) + + (do <>.monad + [[_ elemT] (.applied (<>.and (.exactly List) .any)) + elemR (.local (list elemT) representation)] + (in (|>> (as (List Any)) (%.list elemR)))) + + (do <>.monad + [[_ elemT] (.applied (<>.and (.exactly Maybe) .any)) + elemR (.local (list elemT) representation)] + (in (|>> (as (Maybe Any)) + (%.maybe elemR))))))) (def: (variant_representation representation) (-> (Parser Representation) (Parser Representation)) @@ -491,27 +491,27 @@ (Parser Representation) (<>.rec (function (_ representation) - ($_ <>.either - ..primitive_representation - (..special_representation representation) - (..variant_representation representation) - (..tuple_representation representation) - - (do <>.monad - [[funcT inputsT+] (.applied (<>.and .any (<>.many .any)))] - (case (type.applied inputsT+ funcT) - {.#Some outputT} - (.local (list outputT) representation) - - {.#None} - (<>.failure ""))) - - (do <>.monad - [[name anonymous] .named] - (.local (list anonymous) representation)) - - (<>.failure "") - )))) + (all <>.either + ..primitive_representation + (..special_representation representation) + (..variant_representation representation) + (..tuple_representation representation) + + (do <>.monad + [[funcT inputsT+] (.applied (<>.and .any (<>.many .any)))] + (case (type.applied inputsT+ funcT) + {.#Some outputT} + (.local (list outputT) representation) + + {.#None} + (<>.failure ""))) + + (do <>.monad + [[name anonymous] .named] + (.local (list anonymous) representation)) + + (<>.failure "") + )))) (def: .public (representation type value) (-> Type Any (Try Text)) diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 37b462ea8..c50a1070a 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -506,35 +506,35 @@ tags (meta.tags_of name)] (with_expansions [<\n> (~! text.\n)] (macro.with_symbols [g!type] - (in (list (` ($_ ((~! md.then)) - ... Name - (<| ((~! md.heading/3)) - (~ (code.text (%.code (let [g!name (|> name product.right code.local)] - (case parameters - {.#End} - g!name - - _ - (` ((~ g!name) (~+ (list#each code.local parameters)))))))))) - ... Type - (let [(~ g!type) ("lux in-module" - (~ g!module) - (.type_of (~ (code.symbol name))))] - ((~! md.code) "clojure" - (~ (if (type#= .Type def_type) - (` (|> (~ (code.symbol name)) - (as .Type) - ((~! type.anonymous)) - ((~! ..type_definition) - (~ g!module) - [(~ (code.text (product.right name))) (list (~+ (list#each code.text parameters)))] - (.list (~+ (|> tags - (maybe.else (list)) - (list#each (|>> product.right code.text)))))) - ((~! %.format) - ((~! ..single_line_comment) ((~! ..type) (~ g!module) (~ g!type))) - <\n>))) - (` ((~! ..type) (~ g!module) (~ g!type)))))))) + (in (list (` (all ((~! md.then)) + ... Name + (<| ((~! md.heading/3)) + (~ (code.text (%.code (let [g!name (|> name product.right code.local)] + (case parameters + {.#End} + g!name + + _ + (` ((~ g!name) (~+ (list#each code.local parameters)))))))))) + ... Type + (let [(~ g!type) ("lux in-module" + (~ g!module) + (.type_of (~ (code.symbol name))))] + ((~! md.code) "clojure" + (~ (if (type#= .Type def_type) + (` (|> (~ (code.symbol name)) + (as .Type) + ((~! type.anonymous)) + ((~! ..type_definition) + (~ g!module) + [(~ (code.text (product.right name))) (list (~+ (list#each code.text parameters)))] + (.list (~+ (|> tags + (maybe.else (list)) + (list#each (|>> product.right code.text)))))) + ((~! %.format) + ((~! ..single_line_comment) ((~! ..type) (~ g!module) (~ g!type))) + <\n>))) + (` ((~! ..type) (~ g!module) (~ g!type)))))))) ))))))) (syntax: (definition_documentation @@ -542,30 +542,30 @@ description ..description examples (<>.some ..example)]) (with_expansions [<\n> (~! text.\n)] - (in (list (` ($_ ((~! md.then)) - ((~! ..minimal_definition_documentation) - ((~ (code.symbol name)) - (~+ (list#each code.local parameters)))) - ... Description - (~+ (case description - {.#Some description} - (list (` (<| ((~! md.paragraph)) - ((~! md.text)) - (~ description)))) - - {.#None} - (list))) - ... Examples - (~+ (case examples - {.#End} - (list) - - _ - (list (` (<| ((~! md.code) "clojure") - ((~! %.format) - (~+ (|> examples - (list#each (..example_documentation (product.left name))) - (list.interposed ..example_separator)))))))))) + (in (list (` (all ((~! md.then)) + ((~! ..minimal_definition_documentation) + ((~ (code.symbol name)) + (~+ (list#each code.local parameters)))) + ... Description + (~+ (case description + {.#Some description} + (list (` (<| ((~! md.paragraph)) + ((~! md.text)) + (~ description)))) + + {.#None} + (list))) + ... Examples + (~+ (case examples + {.#End} + (list) + + _ + (list (` (<| ((~! md.code) "clojure") + ((~! %.format) + (~+ (|> examples + (list#each (..example_documentation (product.left name))) + (list.interposed ..example_separator)))))))))) ))))) (type: .public Definition @@ -638,10 +638,10 @@ (list#each product.left) ..expected_format)))) ..#definitions ((~! list.together) (list (~+ definitions)))] - ($_ (# (~! list.monoid) (~' composite)) - (is (List Module) - (# (~! list.monoid) (~' identity))) - (~+ subs))))))))) + (all (# (~! list.monoid) (~' composite)) + (is (List Module) + (# (~! list.monoid) (~' identity))) + (~+ subs))))))))) (def: listing (-> (List Text) (Markdown Block)) @@ -654,51 +654,51 @@ (def: (module_documentation module) (-> Module (Markdown Block)) (let [(open "_[0]") module] - ($_ md.then - ... Name - (md.heading/1 (the #module module)) - ... Description - (case (the #description module) - "" md.empty - description (<| md.paragraph - md.text - description)) - ... Definitions - (md.heading/2 "Definitions") - (|> module - (the #definitions) - (list.only (|>> (the #definition) - (set.member? _#expected))) - ..definitions_documentation) - ... Missing documentation - (case (|> module - (the #definitions) - (list#mix (function (_ definition missing) - (set.lacks (the #definition definition) missing)) - _#expected) - set.list) - {.#End} - md.empty - - missing - ($_ md.then - (md.heading/2 "Missing documentation") - (..listing missing))) - ... Un-expected documentation - (case (|> module - (the #definitions) - (list.only (|>> (the #definition) - (set.member? _#expected) - not)) - (list#each (the #definition))) - {.#End} - md.empty - - un_expected - ($_ md.then - (md.heading/2 "Un-expected documentation") - (..listing un_expected))) - ))) + (all md.then + ... Name + (md.heading/1 (the #module module)) + ... Description + (case (the #description module) + "" md.empty + description (<| md.paragraph + md.text + description)) + ... Definitions + (md.heading/2 "Definitions") + (|> module + (the #definitions) + (list.only (|>> (the #definition) + (set.member? _#expected))) + ..definitions_documentation) + ... Missing documentation + (case (|> module + (the #definitions) + (list#mix (function (_ definition missing) + (set.lacks (the #definition definition) missing)) + _#expected) + set.list) + {.#End} + md.empty + + missing + (all md.then + (md.heading/2 "Missing documentation") + (..listing missing))) + ... Un-expected documentation + (case (|> module + (the #definitions) + (list.only (|>> (the #definition) + (set.member? _#expected) + not)) + (list#each (the #definition))) + {.#End} + md.empty + + un_expected + (all md.then + (md.heading/2 "Un-expected documentation") + (..listing un_expected))) + ))) (def: .public documentation (-> (List Module) Text) diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux index b41d45138..bca5494f8 100644 --- a/stdlib/source/library/lux/extension.lux +++ b/stdlib/source/library/lux/extension.lux @@ -29,12 +29,12 @@ (def: (declaration default) (-> Code (Parser Declaration)) - (.form ($_ <>.and - .any - .local - .local - .local - (.tuple (<>.some .any))))) + (.form (all <>.and + .any + .local + .local + .local + (.tuple (<>.some .any))))) (template [ ] [(syntax: .public ( [[name extension phase archive inputs] (..declaration (` )) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index aff9bb6e9..000d80023 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -424,7 +424,7 @@ (do <>.monad [.let [dotted_name (format "::" field_name)] [_ _ value] (.is (Parser [Any Any Code]) - (.form ($_ <>.and (.this (' :=)) (.this (code.symbol ["" dotted_name])) .any)))] + (.form (all <>.and (.this (' :=)) (.this (code.symbol ["" dotted_name])) .any)))] (in (`' ("jvm member put virtual" (~ (code.text class_name)) (~ (code.text field_name)) @@ -535,19 +535,19 @@ (def: privacy_modifier^ (Parser Privacy) (let [(open "[0]") <>.monad] - ($_ <>.or - (.this (' "public")) - (.this (' "private")) - (.this (' "protected")) - (in [])))) + (all <>.or + (.this (' "public")) + (.this (' "private")) + (.this (' "protected")) + (in [])))) (def: inheritance_modifier^ (Parser Inheritance) (let [(open "[0]") <>.monad] - ($_ <>.or - (.this (' "final")) - (.this (' "abstract")) - (in [])))) + (all <>.or + (.this (' "final")) + (.this (' "abstract")) + (in [])))) (exception: .public (class_names_cannot_contain_periods [name Text]) (exception.report @@ -582,9 +582,9 @@ (do <>.monad [.let [class_name^ (..valid_class_name type_vars)] [name parameters] (.is (Parser [External (List (Type Parameter))]) - ($_ <>.either - (<>.and class_name^ (<>#in (list))) - (.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))] + (all <>.either + (<>.and class_name^ (<>#in (list))) + (.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))] (in (jvm.class (name.safe name) parameters)))) (exception: .public (unknown_type_variable [name Text @@ -624,13 +624,13 @@ (<>.rec (function (_ _) (let [class^ (..class^' parameter^ type_vars)] - ($_ <>.either - (..type_variable type_vars) - ..wildcard^ - (upper^ class^) - (lower^ class^) - class^ - ))))) + (all <>.either + (..type_variable type_vars) + ..wildcard^ + (upper^ class^) + (lower^ class^) + class^ + ))))) (def: (itself^ type) (All (_ category) @@ -642,16 +642,16 @@ (def: primitive^ (Parser (Type Primitive)) - ($_ <>.either - (itself^ jvm.boolean) - (itself^ jvm.byte) - (itself^ jvm.short) - (itself^ jvm.int) - (itself^ jvm.long) - (itself^ jvm.float) - (itself^ jvm.double) - (itself^ jvm.char) - )) + (all <>.either + (itself^ jvm.boolean) + (itself^ jvm.byte) + (itself^ jvm.short) + (itself^ jvm.int) + (itself^ jvm.long) + (itself^ jvm.float) + (itself^ jvm.double) + (itself^ jvm.char) + )) (def: array^ (-> (Parser (Type Value)) (Parser (Type Array))) @@ -662,11 +662,11 @@ (-> (List (Type Var)) (Parser (Type Value))) (<>.rec (function (_ type^) - ($_ <>.either - ..primitive^ - (..parameter^ type_vars) - (..array^ type^) - )))) + (all <>.either + ..primitive^ + (..parameter^ type_vars) + (..array^ type^) + )))) (def: void^ (Parser (Type Void)) @@ -745,10 +745,10 @@ (def: state_modifier^ (Parser State) - ($_ <>.or - (.this (' "volatile")) - (.this (' "final")) - (# <>.monad in []))) + (all <>.or + (.this (' "volatile")) + (.this (' "final")) + (# <>.monad in []))) (def: (field_decl^ type_vars) (-> (List (Type Var)) (Parser [Member_Declaration FieldDecl])) @@ -792,10 +792,10 @@ strict_fp? (<>.parses? (.this_text "strict")) method_vars (<>.else (list) ..vars^) .let [total_vars (list#composite class_vars method_vars)] - [_ self_name arguments] (.form ($_ <>.and - (.this (' new)) - .local - (..arguments^ total_vars))) + [_ self_name arguments] (.form (all <>.and + (.this (' new)) + .local + (..arguments^ total_vars))) constructor_args (..constructor_args^ total_vars) exs (throws_decl^ total_vars) annotations ..annotations^ @@ -813,10 +813,10 @@ final? (<>.parses? (.this (' "final"))) method_vars (<>.else (list) ..vars^) .let [total_vars (list#composite class_vars method_vars)] - [name self_name arguments] (.form ($_ <>.and - .local - .local - (..arguments^ total_vars))) + [name self_name arguments] (.form (all <>.and + .local + .local + (..arguments^ total_vars))) return_type (..return^ total_vars) exs (throws_decl^ total_vars) annotations ..annotations^ @@ -834,10 +834,10 @@ method_vars (<>.else (list) ..vars^) .let [total_vars (list#composite (product.right (parser.declaration owner_class)) method_vars)] - [name self_name arguments] (.form ($_ <>.and - .local - .local - (..arguments^ total_vars))) + [name self_name arguments] (.form (all <>.and + .local + .local + (..arguments^ total_vars))) return_type (..return^ total_vars) exs (throws_decl^ total_vars) annotations ..annotations^ @@ -902,13 +902,13 @@ (def: (method_def^ class_vars) (-> (List (Type Var)) (Parser [Member_Declaration Method_Definition])) - ($_ <>.either - (..constructor_method^ class_vars) - (..virtual_method_def^ class_vars) - ..overriden_method_def^ - ..static_method_def^ - ..abstract_method_def^ - ..native_method_def^)) + (all <>.either + (..constructor_method^ class_vars) + (..virtual_method_def^ class_vars) + ..overriden_method_def^ + ..static_method_def^ + ..abstract_method_def^ + ..native_method_def^)) (def: partial_call^ (Parser Partial_Call) @@ -927,10 +927,10 @@ (def: import_member_return_flags^ (Parser [Bit Bit Bit]) - ($_ <>.and - (<>.parses? (.this (' "io"))) - (<>.parses? (.this (' "try"))) - (<>.parses? (.this (' "?"))))) + (all <>.and + (<>.parses? (.this (' "io"))) + (<>.parses? (.this (' "try"))) + (<>.parses? (.this (' "?"))))) (def: primitive_mode^ (Parser Primitive_Mode) @@ -939,65 +939,65 @@ (def: (import_member_decl^ owner_vars) (-> (List (Type Var)) (Parser Import_Member_Declaration)) - ($_ <>.either - (.form (do <>.monad - [_ (.this (' "enum")) - enum_members (<>.some .local)] - (in {#EnumDecl enum_members}))) - (.form (do <>.monad - [tvars (<>.else (list) ..vars^) - _ (.this_symbol ["" "new"]) - ?alias import_member_alias^ - .let [total_vars (list#composite owner_vars tvars)] - ?prim_mode (<>.maybe primitive_mode^) - args (..import_member_args^ total_vars) - [io? try? maybe?] import_member_return_flags^] - (in {#ConstructorDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_member_alias (maybe.else "new" ?alias) - #import_member_kind {#VirtualIMK} - #import_member_tvars tvars - #import_member_args args - #import_member_maybe? maybe? - #import_member_try? try? - #import_member_io? io?] - []]}) - )) - (.form (do <>.monad - [kind (.is (Parser ImportMethodKind) - (<>.or (.this (' "static")) - (in []))) - tvars (<>.else (list) ..vars^) - name .local - ?alias import_member_alias^ - .let [total_vars (list#composite owner_vars tvars)] - ?prim_mode (<>.maybe primitive_mode^) - args (..import_member_args^ total_vars) - [io? try? maybe?] import_member_return_flags^ - return (..return^ total_vars)] - (in {#MethodDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_member_alias (maybe.else name ?alias) - #import_member_kind kind - #import_member_tvars tvars - #import_member_args args - #import_member_maybe? maybe? - #import_member_try? try? - #import_member_io? io?] - [#import_method_name name - #import_method_return return]]}))) - (.form (do <>.monad - [static? (<>.parses? (.this (' "static"))) - name .local - ?prim_mode (<>.maybe primitive_mode^) - gtype (..type^ owner_vars) - maybe? (<>.parses? (.this (' "?"))) - setter? (<>.parses? (.this (' #!)))] - (in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_field_name name - #import_field_static? static? - #import_field_maybe? maybe? - #import_field_setter? setter? - #import_field_type gtype]}))) - )) + (all <>.either + (.form (do <>.monad + [_ (.this (' "enum")) + enum_members (<>.some .local)] + (in {#EnumDecl enum_members}))) + (.form (do <>.monad + [tvars (<>.else (list) ..vars^) + _ (.this_symbol ["" "new"]) + ?alias import_member_alias^ + .let [total_vars (list#composite owner_vars tvars)] + ?prim_mode (<>.maybe primitive_mode^) + args (..import_member_args^ total_vars) + [io? try? maybe?] import_member_return_flags^] + (in {#ConstructorDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_member_alias (maybe.else "new" ?alias) + #import_member_kind {#VirtualIMK} + #import_member_tvars tvars + #import_member_args args + #import_member_maybe? maybe? + #import_member_try? try? + #import_member_io? io?] + []]}) + )) + (.form (do <>.monad + [kind (.is (Parser ImportMethodKind) + (<>.or (.this (' "static")) + (in []))) + tvars (<>.else (list) ..vars^) + name .local + ?alias import_member_alias^ + .let [total_vars (list#composite owner_vars tvars)] + ?prim_mode (<>.maybe primitive_mode^) + args (..import_member_args^ total_vars) + [io? try? maybe?] import_member_return_flags^ + return (..return^ total_vars)] + (in {#MethodDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_member_alias (maybe.else name ?alias) + #import_member_kind kind + #import_member_tvars tvars + #import_member_args args + #import_member_maybe? maybe? + #import_member_try? try? + #import_member_io? io?] + [#import_method_name name + #import_method_return return]]}))) + (.form (do <>.monad + [static? (<>.parses? (.this (' "static"))) + name .local + ?prim_mode (<>.maybe primitive_mode^) + gtype (..type^ owner_vars) + maybe? (<>.parses? (.this (' "?"))) + setter? (<>.parses? (.this (' #!)))] + (in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_field_name name + #import_field_static? static? + #import_field_maybe? maybe? + #import_field_setter? setter? + #import_field_type gtype]}))) + )) (def: (privacy_modifier$ pm) (-> Privacy Code) diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 1888db385..fcd23b157 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -119,10 +119,10 @@ (template [ ] [(def: (All (_ a) (-> (Parser a) (Parser (Named a)))) - (|>> ($_ <>.and - - ..alias - )))] + (|>> (all <>.and + + ..alias + )))] [named .local] [anonymous (<>#in "")] @@ -160,11 +160,11 @@ (def: input (Parser Input) - ($_ <>.and - (<>#in (list)) - (.tuple (<>.some ..optional)) - (<>.parses? (.this_text "io")) - (<>.parses? (.this_text "try")))) + (all <>.and + (<>#in (list)) + (.tuple (<>.some ..optional)) + (<>.parses? (.this_text "io")) + (<>.parses? (.this_text "try")))) (type: Constructor (Named Input)) @@ -215,10 +215,10 @@ (Parser (Named Procedure)) (<| (..generalized (has [#anonymous #input #variables])) ..named - ($_ <>.and - ..input - ..optional - ))) + (all <>.and + ..input + ..optional + ))) (type: Method (Member (Named Procedure))) @@ -239,13 +239,13 @@ (`` (`` (def: sub (Parser Sub) - ($_ <>.or - (~~ (for @.lua (~~ (these)) - @.ruby (~~ (these)) - ..constructor)) - ..field - ..method - )))) + (all <>.or + (~~ (for @.lua (~~ (these)) + @.ruby (~~ (these)) + ..constructor)) + ..field + ..method + )))) (def: parameters (-> (List Optional) (List Optional)) @@ -319,14 +319,14 @@ (def: class (Parser Class) - ($_ <>.and - (<>.either (<>.and .local - (<>#in (list))) - (.form (<>.and .local - (<>.some .local)))) - ..alias - .text - (<>.some ..sub))) + (all <>.and + (<>.either (<>.and .local + (<>#in (list))) + (.form (<>.and .local + (<>.some .local)))) + ..alias + .text + (<>.some ..sub))) (type: Import (Variant @@ -336,10 +336,10 @@ (def: import (Parser Import) - ($_ <>.or - ..class - (.form ..procedure) - (.form (..named ..output)))) + (all <>.or + ..class + (.form ..procedure) + (.form (..named ..output)))) (def: (input_type input :it:) (-> Input Code Code) @@ -603,9 +603,9 @@ (for @.ruby (these) (syntax: .public (function [[self inputs] (.form - ($_ <>.and - .local - (.tuple (<>.some (<>.and .any .any))))) + (all <>.and + .local + (.tuple (<>.some (<>.and .any .any))))) type .any term .any]) (in (list (` (.<| (.as ..Function) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index 1758cb5bc..e79861b38 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -458,7 +458,7 @@ (do <>.monad [.let [dotted_name (format "::" field_name)] [_ _ value] (.is (Parser [Any Any Code]) - (.form ($_ <>.and (.this (' :=)) (.this (code.symbol ["" dotted_name])) .any)))] + (.form (all <>.and (.this (' :=)) (.this (code.symbol ["" dotted_name])) .any)))] (in (`' ((~ (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (~ value)))))) (def: (pre_walk_replace f input) @@ -554,19 +554,19 @@ (def: privacy_modifier^ (Parser Privacy) (let [(open "[0]") <>.monad] - ($_ <>.or - (.this (' "public")) - (.this (' "private")) - (.this (' "protected")) - (in [])))) + (all <>.or + (.this (' "public")) + (.this (' "private")) + (.this (' "protected")) + (in [])))) (def: inheritance_modifier^ (Parser Inheritance) (let [(open "[0]") <>.monad] - ($_ <>.or - (.this (' "final")) - (.this (' "abstract")) - (in [])))) + (all <>.or + (.this (' "final")) + (.this (' "abstract")) + (in [])))) (def: bound_kind^ (Parser BoundKind) @@ -582,46 +582,46 @@ (-> (List Type_Parameter) (Parser GenericType)) (<>.rec (function (_ again^) - ($_ <>.either - (do <>.monad - [_ (.this (' ?))] - (in {#GenericWildcard {.#None}})) - (.tuple (do <>.monad - [_ (.this (' ?)) - bound_kind bound_kind^ - bound again^] - (in {#GenericWildcard {.#Some [bound_kind bound]}}))) - (do <>.monad - [name .local - _ (no_periods_assertion name)] - (if (list.member? text.equivalence (list#each product.left type_vars) name) - (in {#GenericTypeVar name}) - (in {#GenericClass name (list)}))) - (.tuple (do <>.monad - [component again^] - (case component - (^.template [ ] - [{#GenericClass {.#End}} - (in {#GenericClass (list)})]) - (["[Z" "boolean"] - ["[B" "byte"] - ["[S" "short"] - ["[I" "int"] - ["[J" "long"] - ["[F" "float"] - ["[D" "double"] - ["[C" "char"]) - - _ - (in {#GenericArray component})))) - (.form (do <>.monad - [name .local - _ (no_periods_assertion name) - params (<>.some again^) - _ (<>.assertion (format name " cannot be a type-parameter!") - (not (list.member? text.equivalence (list#each product.left type_vars) name)))] - (in {#GenericClass name params}))) - )))) + (all <>.either + (do <>.monad + [_ (.this (' ?))] + (in {#GenericWildcard {.#None}})) + (.tuple (do <>.monad + [_ (.this (' ?)) + bound_kind bound_kind^ + bound again^] + (in {#GenericWildcard {.#Some [bound_kind bound]}}))) + (do <>.monad + [name .local + _ (no_periods_assertion name)] + (if (list.member? text.equivalence (list#each product.left type_vars) name) + (in {#GenericTypeVar name}) + (in {#GenericClass name (list)}))) + (.tuple (do <>.monad + [component again^] + (case component + (^.template [ ] + [{#GenericClass {.#End}} + (in {#GenericClass (list)})]) + (["[Z" "boolean"] + ["[B" "byte"] + ["[S" "short"] + ["[I" "int"] + ["[J" "long"] + ["[F" "float"] + ["[D" "double"] + ["[C" "char"]) + + _ + (in {#GenericArray component})))) + (.form (do <>.monad + [name .local + _ (no_periods_assertion name) + params (<>.some again^) + _ (<>.assertion (format name " cannot be a type-parameter!") + (not (list.member? text.equivalence (list#each product.left type_vars) name)))] + (in {#GenericClass name params}))) + )))) (def: type_param^ (Parser Type_Parameter) @@ -718,10 +718,10 @@ (def: state_modifier^ (Parser State) - ($_ <>.or - (.this (' "volatile")) - (.this (' "final")) - (# <>.monad in []))) + (all <>.or + (.this (' "volatile")) + (.this (' "final")) + (# <>.monad in []))) (def: (field_decl^ type_vars) (-> (List Type_Parameter) (Parser [Member_Declaration FieldDecl])) @@ -783,10 +783,10 @@ final? (<>.parses? (.this (' "final"))) method_vars ..type_params^ .let [total_vars (list#composite class_vars method_vars)] - [name this_name arg_decls] (.form ($_ <>.and - .local - .local - (..arg_decls^ total_vars))) + [name this_name arg_decls] (.form (all <>.and + .local + .local + (..arg_decls^ total_vars))) return_type (..generic_type^ total_vars) exs (..throws_decl^ total_vars) annotations ..annotations^ @@ -806,10 +806,10 @@ owner_class ..class_decl^ method_vars ..type_params^ .let [total_vars (list#composite (product.right owner_class) method_vars)] - [name this_name arg_decls] (.form ($_ <>.and - .local - .local - (..arg_decls^ total_vars))) + [name this_name arg_decls] (.form (all <>.and + .local + .local + (..arg_decls^ total_vars))) return_type (..generic_type^ total_vars) exs (..throws_decl^ total_vars) annotations ..annotations^ @@ -877,13 +877,13 @@ (def: (method_def^ class_vars) (-> (List Type_Parameter) (Parser [Member_Declaration Method_Definition])) - ($_ <>.either - (..constructor_method^ class_vars) - (..virtual_method_def^ class_vars) - ..overriden_method_def^ - ..static_method_def^ - ..abstract_method_def^ - ..native_method_def^)) + (all <>.either + (..constructor_method^ class_vars) + (..virtual_method_def^ class_vars) + ..overriden_method_def^ + ..static_method_def^ + ..abstract_method_def^ + ..native_method_def^)) (def: partial_call^ (Parser Partial_Call) @@ -901,7 +901,7 @@ (def: import_member_return_flags^ (Parser [Bit Bit Bit]) - ($_ <>.and (<>.parses? (.this (' "io"))) (<>.parses? (.this (' "try"))) (<>.parses? (.this (' "?"))))) + (all <>.and (<>.parses? (.this (' "io"))) (<>.parses? (.this (' "try"))) (<>.parses? (.this (' "?"))))) (def: primitive_mode^ (Parser Primitive_Mode) @@ -910,64 +910,64 @@ (def: (import_member_decl^ owner_vars) (-> (List Type_Parameter) (Parser Import_Member_Declaration)) - ($_ <>.either - (.form (do <>.monad - [_ (.this (' "enum")) - enum_members (<>.some .local)] - (in {#EnumDecl enum_members}))) - (.form (do <>.monad - [tvars ..type_params^ - _ (.this (' new)) - ?alias import_member_alias^ - .let [total_vars (list#composite owner_vars tvars)] - ?prim_mode (<>.maybe primitive_mode^) - args (..import_member_args^ total_vars) - [io? try? maybe?] import_member_return_flags^] - (in {#ConstructorDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_member_alias (maybe.else "new" ?alias) - #import_member_kind {#VirtualIMK} - #import_member_tvars tvars - #import_member_args args - #import_member_maybe? maybe? - #import_member_try? try? - #import_member_io? io?] - []]}))) - (.form (do <>.monad - [kind (.is (Parser ImportMethodKind) - (<>.or (.this (' "static")) - (in []))) - tvars ..type_params^ - name .local - ?alias import_member_alias^ - .let [total_vars (list#composite owner_vars tvars)] - ?prim_mode (<>.maybe primitive_mode^) - args (..import_member_args^ total_vars) - [io? try? maybe?] import_member_return_flags^ - return (..generic_type^ total_vars)] - (in {#MethodDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_member_alias (maybe.else name ?alias) - #import_member_kind kind - #import_member_tvars tvars - #import_member_args args - #import_member_maybe? maybe? - #import_member_try? try? - #import_member_io? io?] - [#import_method_name name - #import_method_return return]]}))) - (.form (do <>.monad - [static? (<>.parses? (.this (' "static"))) - name .local - ?prim_mode (<>.maybe primitive_mode^) - gtype (..generic_type^ owner_vars) - maybe? (<>.parses? (.this (' "?"))) - setter? (<>.parses? (.this (' "!")))] - (in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode) - #import_field_name name - #import_field_static? static? - #import_field_maybe? maybe? - #import_field_setter? setter? - #import_field_type gtype]}))) - )) + (all <>.either + (.form (do <>.monad + [_ (.this (' "enum")) + enum_members (<>.some .local)] + (in {#EnumDecl enum_members}))) + (.form (do <>.monad + [tvars ..type_params^ + _ (.this (' new)) + ?alias import_member_alias^ + .let [total_vars (list#composite owner_vars tvars)] + ?prim_mode (<>.maybe primitive_mode^) + args (..import_member_args^ total_vars) + [io? try? maybe?] import_member_return_flags^] + (in {#ConstructorDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_member_alias (maybe.else "new" ?alias) + #import_member_kind {#VirtualIMK} + #import_member_tvars tvars + #import_member_args args + #import_member_maybe? maybe? + #import_member_try? try? + #import_member_io? io?] + []]}))) + (.form (do <>.monad + [kind (.is (Parser ImportMethodKind) + (<>.or (.this (' "static")) + (in []))) + tvars ..type_params^ + name .local + ?alias import_member_alias^ + .let [total_vars (list#composite owner_vars tvars)] + ?prim_mode (<>.maybe primitive_mode^) + args (..import_member_args^ total_vars) + [io? try? maybe?] import_member_return_flags^ + return (..generic_type^ total_vars)] + (in {#MethodDecl [[#import_member_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_member_alias (maybe.else name ?alias) + #import_member_kind kind + #import_member_tvars tvars + #import_member_args args + #import_member_maybe? maybe? + #import_member_try? try? + #import_member_io? io?] + [#import_method_name name + #import_method_return return]]}))) + (.form (do <>.monad + [static? (<>.parses? (.this (' "static"))) + name .local + ?prim_mode (<>.maybe primitive_mode^) + gtype (..generic_type^ owner_vars) + maybe? (<>.parses? (.this (' "?"))) + setter? (<>.parses? (.this (' "!")))] + (in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode) + #import_field_name name + #import_field_static? static? + #import_field_maybe? maybe? + #import_field_setter? setter? + #import_field_type gtype]}))) + )) ... Generators (def: with_parens diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index 840fb30de..bd2176adb 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -71,19 +71,19 @@ (def: field (Parser Field) - (.form ($_ <>.and - (<>.parses? ..static!) - .local - (<>.maybe ..alias) - ..nullable))) + (.form (all <>.and + (<>.parses? ..static!) + .local + (<>.maybe ..alias) + ..nullable))) (def: constant (Parser Field) - (.form ($_ <>.and - (<>#in true) - .local - (<>.maybe ..alias) - ..nullable))) + (.form (all <>.and + (<>#in true) + .local + (<>.maybe ..alias) + ..nullable))) (type: Common_Method (Record @@ -104,13 +104,13 @@ (def: common_method (Parser Common_Method) - ($_ <>.and - .local - (<>.maybe ..alias) - (.tuple (<>.some ..nullable)) - (<>.parses? (.this (' "io"))) - (<>.parses? (.this (' "try"))) - ..nullable)) + (all <>.and + .local + (<>.maybe ..alias) + (.tuple (<>.some ..nullable)) + (<>.parses? (.this (' "io"))) + (<>.parses? (.this (' "try"))) + ..nullable)) (def: static_method (<>.after ..static! ..common_method)) @@ -127,10 +127,10 @@ (def: member (Parser Member) - ($_ <>.or - ..field - ..method - )) + (all <>.or + ..field + ..method + )) (def: input_variables (-> (List Nullable) (List [Bit Code])) @@ -175,16 +175,16 @@ (def: import (Parser Import) - ($_ <>.or - ($_ <>.and - .local - (<>.maybe ..alias) - (<>.else ["" (list)] - (.tuple (<>.and .text - (<>.some member))))) - (.form ..common_method) - ..constant - )) + (all <>.or + (all <>.and + .local + (<>.maybe ..alias) + (<>.else ["" (list)] + (.tuple (<>.and .text + (<>.some member))))) + (.form ..common_method) + ..constant + )) (syntax: .public (try [expression .any]) ... {.#doc (example (case (try (risky_computation input)) diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index 7b338dfd4..79b042679 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -71,19 +71,19 @@ (def: field (Parser Field) - (.form ($_ <>.and - (<>.parses? ..static!) - .local - (<>.maybe ..alias) - ..nilable))) + (.form (all <>.and + (<>.parses? ..static!) + .local + (<>.maybe ..alias) + ..nilable))) (def: constant (Parser Field) - (.form ($_ <>.and - (<>#in true) - .local - (<>.maybe ..alias) - ..nilable))) + (.form (all <>.and + (<>#in true) + .local + (<>.maybe ..alias) + ..nilable))) (type: Common_Method (Record @@ -96,13 +96,13 @@ (def: common_method (Parser Common_Method) - ($_ <>.and - .local - (<>.maybe ..alias) - (.tuple (<>.some ..nilable)) - (<>.parses? (.this (' "io"))) - (<>.parses? (.this (' "try"))) - ..nilable)) + (all <>.and + .local + (<>.maybe ..alias) + (.tuple (<>.some ..nilable)) + (<>.parses? (.this (' "io"))) + (<>.parses? (.this (' "try"))) + ..nilable)) (def: input_variables (-> (List Nilable) (List [Bit Code])) @@ -146,10 +146,10 @@ (def: import (Parser Import) - ($_ <>.or - (.form ..common_method) - ..constant - )) + (all <>.or + (.form ..common_method) + ..constant + )) (syntax: .public (try [expression .any]) ... {.#doc (example (case (try (risky_computation input)) diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux index ffe1daa6a..e889ad68f 100644 --- a/stdlib/source/library/lux/ffi/export.js.lux +++ b/stdlib/source/library/lux/ffi/export.js.lux @@ -42,9 +42,9 @@ (.result (<| .form (<>.after (.this_text "lux def")) (<>.before .any) - ($_ <>.and - .local - .any))) + (all <>.and + .local + .any))) meta.lifted)) (with_expansions [ (static.random (|>> %.nat (%.format "lua export ") code.text) @@ -77,9 +77,9 @@ definition (/.define (/.var name) term) export (/.when (/.not (/.= (/.string "undefined") (/.type_of $module))) (/.set (/.the name $exports) (/.var name))) - code ($_ /.then - definition - export)] + code (all /.then + definition + export)] _ (generation.execute! definition) _ (generation.save! @self {.#None} code)] (generation.log! (%.format "Export " (%.text name)))))] diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux index fa1631922..ec79f469f 100644 --- a/stdlib/source/library/lux/ffi/export.jvm.lux +++ b/stdlib/source/library/lux/ffi/export.jvm.lux @@ -21,11 +21,11 @@ (def: (api of) (All (_ of) (-> (Parser of) (Parser (API of)))) (.form - ($_ <>.and - of - .any - .any - ))) + (all <>.and + of + .any + .any + ))) (type: Constant Text) @@ -43,14 +43,14 @@ (def: function (Parser Function) (.form - ($_ <>.and - (<>.else (list) (.tuple (<>.some .local))) - .local - (.tuple (<>.some ($_ <>.and - .local - .any - ))) - ))) + (all <>.and + (<>.else (list) (.tuple (<>.some .local))) + .local + (.tuple (<>.some (all <>.and + .local + .any + ))) + ))) (type: Export (Variant @@ -59,10 +59,10 @@ (def: export (Parser Export) - ($_ <>.or - (..api ..constant) - (..api ..function) - )) + (all <>.or + (..api ..constant) + (..api ..function) + )) (syntax: .public (export: [api .local exports (<>.many ..export)]) diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index 33601347b..86365d524 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -42,9 +42,9 @@ (.result (<| .form (<>.after (.this_text "lux def")) (<>.before .any) - ($_ <>.and - .local - .any))) + (all <>.and + .local + .any))) meta.lifted)) ... [15.2 – Privacy](https://www.lua.org/pil/15.2.html) @@ -87,17 +87,17 @@ (list)) (/.var name)) export! (/.when exporting? - ($_ /.then - (/.when no_exports? - initialize_exports!) - export_definition! - ))] - _ (generation.execute! ($_ /.then - (/.set (list (/.var name)) term) - export!)) - _ (generation.save! @self {.#None} ($_ /.then - (/.local/1 (/.var name) term) - export!))] + (all /.then + (/.when no_exports? + initialize_exports!) + export_definition! + ))] + _ (generation.execute! (all /.then + (/.set (list (/.var name)) term) + export!)) + _ (generation.save! @self {.#None} (all /.then + (/.local/1 (/.var name) term) + export!))] (generation.log! (%.format "Export " (%.text name)))))] (in directive.no_requirements))) diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux index febcdaf89..08ef62188 100644 --- a/stdlib/source/library/lux/ffi/export.py.lux +++ b/stdlib/source/library/lux/ffi/export.py.lux @@ -42,9 +42,9 @@ (.result (<| .form (<>.after (.this_text "lux def")) (<>.before .any) - ($_ <>.and - .local - .any))) + (all <>.and + .local + .any))) meta.lifted)) (with_expansions [ (static.random (|>> %.nat (%.format "python export ") code.text) diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux index 59fba650f..017f40093 100644 --- a/stdlib/source/library/lux/ffi/export.rb.lux +++ b/stdlib/source/library/lux/ffi/export.rb.lux @@ -44,12 +44,12 @@ (def: sigil! (.one_of! "_")) (def: tail! - ($_ <>.either - ..upper! - ..lower! - ..decimal! - ..sigil! - )) + (all <>.either + ..upper! + ..lower! + ..decimal! + ..sigil! + )) (template [ ] [(def: @@ -80,9 +80,9 @@ (.result (<| .form (<>.after (.this_text "lux def")) (<>.before .any) - ($_ <>.and - (.then ..name .local) - .any))) + (all <>.and + (.then ..name .local) + .any))) meta.lifted)) (with_expansions [ (static.random (|>> %.nat (%.format "ruby export ") code.text) diff --git a/stdlib/source/library/lux/ffi/node_js.js.lux b/stdlib/source/library/lux/ffi/node_js.js.lux index 08e649fa9..dd83109f1 100644 --- a/stdlib/source/library/lux/ffi/node_js.js.lux +++ b/stdlib/source/library/lux/ffi/node_js.js.lux @@ -19,7 +19,7 @@ (def: .public (require module) (-> Text (Maybe Any)) (maybe#each (function.on module) - ($_ maybe#composite - ..normal_require - ..global_require - ..process_load))) + (all maybe#composite + ..normal_require + ..global_require + ..process_load))) diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux index d8e677ba6..f4b582ef6 100644 --- a/stdlib/source/library/lux/macro.lux +++ b/stdlib/source/library/lux/macro.lux @@ -97,7 +97,7 @@ [id //.seed] (in (|> id (# nat.decimal encoded) - ($_ text#composite "__gensym__" prefix) + (all text#composite "__gensym__" prefix) [""] code.symbol)))) (def: (local ast) @@ -161,7 +161,7 @@ (do //.monad [location //.location output ( token) - .let [_ ("lux io log" ($_ text#composite (symbol#encoded macro_name) " " (location.format location))) + .let [_ ("lux io log" (all text#composite (symbol#encoded macro_name) " " (location.format location))) _ (list#each (|>> code.format "lux io log") output) _ ("lux io log" "")]] diff --git a/stdlib/source/library/lux/macro/code.lux b/stdlib/source/library/lux/macro/code.lux index 4df6d86e0..e86024d13 100644 --- a/stdlib/source/library/lux/macro/code.lux +++ b/stdlib/source/library/lux/macro/code.lux @@ -104,16 +104,16 @@ (^.template [ ] [[_ { members}] - ($_ text#composite - - (list#mix (function (_ next prev) - (let [next (format next)] - (if (text#= "" prev) - next - ($_ text#composite prev " " next)))) - "" - members) - )]) + (all text#composite + + (list#mix (function (_ next prev) + (let [next (format next)] + (if (text#= "" prev) + next + (all text#composite prev " " next)))) + "" + members) + )]) ([.#Form "(" ")"] [.#Variant "{" "}"] [.#Tuple "[" "]"]) diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux index 8a3783149..9a2e566f0 100644 --- a/stdlib/source/library/lux/macro/syntax.lux +++ b/stdlib/source/library/lux/macro/syntax.lux @@ -33,9 +33,9 @@ {try.#Success [tokens output]} {try.#Failure error} - {try.#Failure ($_ text#composite - "Failed to parse: " (code.format binding) text.new_line - error)}))) + {try.#Failure (all text#composite + "Failed to parse: " (code.format binding) text.new_line + error)}))) (def: (un_paired pairs) (All (_ a) (-> (List [a a]) (List a))) @@ -46,11 +46,11 @@ (def: syntax (Parser [Code [Text (List Code)] Code]) (/export.parser - ($_ <>.and - (.form ($_ <>.and - .local - (.tuple (<>.some .any)))) - .any))) + (all <>.and + (.form (all <>.and + .local + (.tuple (<>.some .any)))) + .any))) (macro: .public (syntax: tokens) (case (.result ..syntax tokens) diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux index da0ad9ca1..da68a8f25 100644 --- a/stdlib/source/library/lux/macro/syntax/check.lux +++ b/stdlib/source/library/lux/macro/syntax/check.lux @@ -24,10 +24,10 @@ (def: .public equivalence (Equivalence Check) - ($_ product.equivalence - code.equivalence - code.equivalence - )) + (all product.equivalence + code.equivalence + code.equivalence + )) (def: .public (format (open "_[0]")) (-> Check Code) diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux index f6c92855e..be174fdd5 100644 --- a/stdlib/source/library/lux/macro/syntax/declaration.lux +++ b/stdlib/source/library/lux/macro/syntax/declaration.lux @@ -21,10 +21,10 @@ (def: .public equivalence (Equivalence Declaration) - ($_ product.equivalence - text.equivalence - (list.equivalence text.equivalence) - )) + (all product.equivalence + text.equivalence + (list.equivalence text.equivalence) + )) (def: .public parser (Parser Declaration) diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux index af8e3baf0..47b419339 100644 --- a/stdlib/source/library/lux/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/macro/syntax/definition.lux @@ -32,14 +32,14 @@ (def: .public equivalence (Equivalence Definition) - ($_ product.equivalence - text.equivalence - ($_ sum.equivalence - //check.equivalence - code.equivalence - ) - bit.equivalence - )) + (all product.equivalence + text.equivalence + (all sum.equivalence + //check.equivalence + code.equivalence + ) + bit.equivalence + )) (def: extension "lux def") @@ -73,12 +73,12 @@ (<| (.locally me_raw) .form (<>.after (.this_text ..extension)) - ($_ <>.and - .local - (<>.or //check.parser - .any) - .bit - )))) + (all <>.and + .local + (<>.or //check.parser + .any) + .bit + )))) (exception: .public (lacks_type [definition Definition]) (exception.report diff --git a/stdlib/source/library/lux/macro/syntax/input.lux b/stdlib/source/library/lux/macro/syntax/input.lux index 6d7d8c357..9e66ad43e 100644 --- a/stdlib/source/library/lux/macro/syntax/input.lux +++ b/stdlib/source/library/lux/macro/syntax/input.lux @@ -20,10 +20,10 @@ (def: .public equivalence (Equivalence Input) - ($_ product.equivalence - code.equivalence - code.equivalence - )) + (all product.equivalence + code.equivalence + code.equivalence + )) (def: .public format (-> (List Input) Code) @@ -37,7 +37,7 @@ (Parser (List Input)) (<| .tuple <>.some - ($_ <>.and - .any - .any - ))) + (all <>.and + .any + .any + ))) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index 090a25ac4..e866798bb 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -59,18 +59,18 @@ (def: (snippet module_side?) (-> Bit (Parser Text)) (.let [full_symbol (..symbol_side module_side? .symbol)] - ($_ <>.either - .text - (if module_side? - full_symbol - (<>.either .local - full_symbol)) - (<>#each bit#encoded .bit) - (<>#each nat#encoded .nat) - (<>#each int#encoded .int) - (<>#each rev#encoded .rev) - (<>#each frac#encoded .frac) - ))) + (all <>.either + .text + (if module_side? + full_symbol + (<>.either .local + full_symbol)) + (<>#each bit#encoded .bit) + (<>#each nat#encoded .nat) + (<>#each int#encoded .int) + (<>#each rev#encoded .rev) + (<>#each frac#encoded .frac) + ))) (def: (part module_side?) (-> Bit (Parser (List Text))) diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux index b5b44fc24..c7dd7efa5 100644 --- a/stdlib/source/library/lux/math/infix.lux +++ b/stdlib/source/library/lux/math/infix.lux @@ -1,22 +1,22 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["<>" parser ("[1]#[0]" functor) - ["<[0]>" code {"+" Parser}]]] - [data - ["[0]" product] - [collection - ["[0]" list ("[1]#[0]" mix)]]] - [macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - [number - ["n" nat] - ["i" int]]]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["<>" parser ("[1]#[0]" functor) + ["<[0]>" code {"+" Parser}]]] + [data + ["[0]" product] + [collection + ["[0]" list ("[1]#[0]" mix)]]] + [macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + [number + ["n" nat] + ["i" int]]]]]) (type: Infix (Rec Infix @@ -28,32 +28,32 @@ (def: literal (Parser Code) - ($_ <>.either - (<>#each code.bit .bit) - (<>#each code.nat .nat) - (<>#each code.int .int) - (<>#each code.rev .rev) - (<>#each code.frac .frac) - (<>#each code.text .text) - (<>#each code.symbol .symbol))) + (all <>.either + (<>#each code.bit .bit) + (<>#each code.nat .nat) + (<>#each code.int .int) + (<>#each code.rev .rev) + (<>#each code.frac .frac) + (<>#each code.text .text) + (<>#each code.symbol .symbol))) (def: expression (Parser Infix) (<| <>.rec (function (_ expression)) - ($_ <>.or - ..literal - (.form (<>.many .any)) - (.tuple (<>.and .any expression)) - (.tuple (do <>.monad - [init_subject expression - init_op .any - init_param expression - steps (<>.some (<>.and .any expression))] - (in (list#mix (function (_ [op param] [_subject _op _param]) - [{#Binary _subject _op _param} op param]) - [init_subject init_op init_param] - steps)))) - ))) + (all <>.or + ..literal + (.form (<>.many .any)) + (.tuple (<>.and .any expression)) + (.tuple (do <>.monad + [init_subject expression + init_op .any + init_param expression + steps (<>.some (<>.and .any expression))] + (in (list#mix (function (_ [op param] [_subject _op _param]) + [{#Binary _subject _op _param} op param]) + [init_subject init_op init_param] + steps)))) + ))) (def: (prefix infix) (-> Infix Code) diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index f23071295..6c4263f23 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -65,15 +65,15 @@ (def: (encoded modular) (let [[_ value] (representation modular)] - ($_ text#composite - (i#encoded value) - ..separator - (i#encoded (//.divisor expected))))) + (all text#composite + (i#encoded value) + ..separator + (i#encoded (//.divisor expected))))) (def: decoded (.result (do <>.monad - [[value _ actual] ($_ <>.and intL (.this ..separator) intL) + [[value _ actual] (all <>.and intL (.this ..separator) intL) _ (<>.assertion (exception.error ..incorrect_modulus [expected actual]) (i.= (//.divisor expected) actual))] (in (..modular expected value)))))) diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux index 0169ec4f5..14f6c9746 100644 --- a/stdlib/source/library/lux/math/number/frac.lux +++ b/stdlib/source/library/lux/math/number/frac.lux @@ -694,10 +694,10 @@ (//int.+ (.int ..double_bias)) (//i64.and ..exponent_mask)) mantissa_bits (..int mantissa)] - ($_ //i64.or - (//i64.left_shifted ..sign_offset sign_bit) - (//i64.left_shifted ..exponent_offset exponent_bits) - (//i64.zero ..mantissa_size mantissa_bits))) + (all //i64.or + (//i64.left_shifted ..sign_offset sign_bit) + (//i64.left_shifted ..exponent_offset exponent_bits) + (//i64.zero ..mantissa_size mantissa_bits))) ))) (template [ ] @@ -783,14 +783,14 @@ mantissa (..mantissa bits) exponent (//int.- (.int ..double_bias) (..exponent bits)) sign (..sign bits)] - ($_ "lux text concat" - (case (.nat sign) - 1 "-" - 0 "+" - _ (undefined)) - (# encoded (.nat mantissa)) - ".0E" - (# encoded exponent)))) + (all "lux text concat" + (case (.nat sign) + 1 "-" + 0 "+" + _ (undefined)) + (# encoded (.nat mantissa)) + ".0E" + (# encoded exponent)))) (def: (decoded representation) (let [negative? (text.starts_with? "-" representation) @@ -817,10 +817,10 @@ _ ("lux text concat" whole (# encoded decimal)))) .let [sign (if negative? 1 0)]] (in (..of_bits - ($_ //i64.or - (//i64.left_shifted ..sign_offset (.i64 sign)) - (//i64.left_shifted ..mantissa_size (.i64 (//int.+ (.int ..double_bias) exponent))) - (//i64.zero ..mantissa_size (.i64 mantissa)))))) + (all //i64.or + (//i64.left_shifted ..sign_offset (.i64 sign)) + (//i64.left_shifted ..mantissa_size (.i64 (//int.+ (.int ..double_bias) exponent))) + (//i64.zero ..mantissa_size (.i64 mantissa)))))) {try.#Failure ("lux text concat" representation)}))))] [binary //nat.binary //int.binary "Invalid binary syntax: "] diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux index 883e63dae..5af8853ad 100644 --- a/stdlib/source/library/lux/math/number/ratio.lux +++ b/stdlib/source/library/lux/math/number/ratio.lux @@ -132,9 +132,9 @@ (Codec Text Ratio) (def: (encoded (open "_[0]")) - ($_ text#composite - (n#encoded _#numerator) - ..separator (n#encoded _#denominator))) + (all text#composite + (n#encoded _#numerator) + ..separator (n#encoded _#denominator))) (def: (decoded input) (case (text.split_by ..separator input) diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux index c6cdd0995..e6154d42f 100644 --- a/stdlib/source/library/lux/math/number/rev.lux +++ b/stdlib/source/library/lux/math/number/rev.lux @@ -343,10 +343,10 @@ output (..digits [])]) (if (//int.< +0 (.int idx)) output - (let [raw ($_ //nat.+ - carry - (..digit idx param) - (..digit idx subject))] + (let [raw (all //nat.+ + carry + (..digit idx param) + (..digit idx subject))] (again (-- idx) (//nat./ 10 raw) (digits#put! idx (//nat.% 10 raw) output)))))) diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index f1337c481..3f6c82f27 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -123,7 +123,7 @@ {try.#Success [lux module]} _ - {try.#Failure ($_ text#composite "Unknown module: " name)}))) + {try.#Failure (all text#composite "Unknown module: " name)}))) (def: .public current_module_name (Meta Text) @@ -275,7 +275,7 @@ ((clean_type var_type) lux) {.#None} - {try.#Failure ($_ text#composite "Unknown variable: " name)})))) + {try.#Failure (all text#composite "Unknown variable: " name)})))) (def: without_lux_runtime (-> (List Text) (List Text)) @@ -285,7 +285,7 @@ (def: listing_separator Text - ($_ text#composite text.new_line " ")) + (all text#composite text.new_line " ")) (def: module_listing (-> (List Text) Text) @@ -314,52 +314,52 @@ (the .#modules) (list#each product.left) ..module_listing)] - {try.#Failure ($_ text#composite - "Unknown definition: " (symbol#encoded name) text.new_line - " Current module: " current_module text.new_line - (case (plist.value current_module (the .#modules lux)) - {.#Some this_module} - (let [candidates (|> lux - (the .#modules) - (list#each (function (_ [module_name module]) - (|> module - (the .#definitions) - (list.all (function (_ [def_name global]) - (case global - (^.or {.#Definition [exported? _]} - {.#Type [exported? _]}) - (if (and exported? - (text#= normal_short def_name)) - {.#Some (symbol#encoded [module_name def_name])} - {.#None}) - - {.#Alias _} - {.#None} - - {.#Tag _} - {.#None} - - {.#Slot _} - {.#None})))))) - list.together - (list.sorted text#<) - (text.interposed ..listing_separator)) - imports (|> this_module - (the .#imports) - ..module_listing) - aliases (|> this_module - (the .#module_aliases) - (list#each (function (_ [alias real]) ($_ text#composite alias " => " real))) - (list.sorted text#<) - (text.interposed ..listing_separator))] - ($_ text#composite - " Candidates: " candidates text.new_line - " Imports: " imports text.new_line - " Aliases: " aliases text.new_line)) - - _ - "") - " All known modules: " all_known_modules text.new_line)}))))) + {try.#Failure (all text#composite + "Unknown definition: " (symbol#encoded name) text.new_line + " Current module: " current_module text.new_line + (case (plist.value current_module (the .#modules lux)) + {.#Some this_module} + (let [candidates (|> lux + (the .#modules) + (list#each (function (_ [module_name module]) + (|> module + (the .#definitions) + (list.all (function (_ [def_name global]) + (case global + (^.or {.#Definition [exported? _]} + {.#Type [exported? _]}) + (if (and exported? + (text#= normal_short def_name)) + {.#Some (symbol#encoded [module_name def_name])} + {.#None}) + + {.#Alias _} + {.#None} + + {.#Tag _} + {.#None} + + {.#Slot _} + {.#None})))))) + list.together + (list.sorted text#<) + (text.interposed ..listing_separator)) + imports (|> this_module + (the .#imports) + ..module_listing) + aliases (|> this_module + (the .#module_aliases) + (list#each (function (_ [alias real]) (all text#composite alias " => " real))) + (list.sorted text#<) + (text.interposed ..listing_separator))] + (all text#composite + " Candidates: " candidates text.new_line + " Imports: " imports text.new_line + " Aliases: " aliases text.new_line)) + + _ + "") + " All known modules: " all_known_modules text.new_line)}))))) (def: .public (export name) (-> Symbol (Meta Definition)) @@ -370,27 +370,27 @@ (let [[exported? def_type def_value] definition] (if exported? (in definition) - (failure ($_ text#composite "Definition is not an export: " (symbol#encoded name))))) + (failure (all text#composite "Definition is not an export: " (symbol#encoded name))))) {.#Type [exported? type labels]} (if exported? (in [exported? .Type type]) - (failure ($_ text#composite "Type is not an export: " (symbol#encoded name)))) + (failure (all text#composite "Type is not an export: " (symbol#encoded name)))) {.#Alias de_aliased} - (failure ($_ text#composite - "Aliases are not considered exports: " - (symbol#encoded name))) + (failure (all text#composite + "Aliases are not considered exports: " + (symbol#encoded name))) {.#Tag _} - (failure ($_ text#composite - "Tags are not considered exports: " - (symbol#encoded name))) + (failure (all text#composite + "Tags are not considered exports: " + (symbol#encoded name))) {.#Slot _} - (failure ($_ text#composite - "Slots are not considered exports: " - (symbol#encoded name)))))) + (failure (all text#composite + "Slots are not considered exports: " + (symbol#encoded name)))))) (def: .public (definition_type name) (-> Symbol (Meta Type)) @@ -407,14 +407,14 @@ (in .Type) {.#Tag _} - (failure ($_ text#composite - "Tags have no type: " - (symbol#encoded name))) + (failure (all text#composite + "Tags have no type: " + (symbol#encoded name))) {.#Slot _} - (failure ($_ text#composite - "Slots have no type: " - (symbol#encoded name)))))) + (failure (all text#composite + "Slots have no type: " + (symbol#encoded name)))))) (def: .public (type name) (-> Symbol (Meta Type)) @@ -441,23 +441,23 @@ (type_code .Type) (type_code def_type))) (in (as Type def_value)) - (..failure ($_ text#composite "Definition is not a type: " (symbol#encoded name))))) + (..failure (all text#composite "Definition is not a type: " (symbol#encoded name))))) {.#Type [exported? type labels]} (in type) {.#Tag _} - (..failure ($_ text#composite "Tag is not a type: " (symbol#encoded name))) + (..failure (all text#composite "Tag is not a type: " (symbol#encoded name))) {.#Slot _} - (..failure ($_ text#composite "Slot is not a type: " (symbol#encoded name)))))) + (..failure (all text#composite "Slot is not a type: " (symbol#encoded name)))))) (def: .public (globals module) (-> Text (Meta (List [Text Global]))) (function (_ lux) (case (plist.value module (the .#modules lux)) {.#None} - {try.#Failure ($_ text#composite "Unknown module: " module)} + {try.#Failure (all text#composite "Unknown module: " module)} {.#Some module} {try.#Success [lux (the .#definitions module)]}))) @@ -562,11 +562,11 @@ (if (or (text#= this_module_name module) exported?) (in [idx (list#each (|>> [module]) group) type]) - (..failure ($_ text#composite "Cannot access " ": " (symbol#encoded label_name) " from module " this_module_name))) + (..failure (all text#composite "Cannot access " ": " (symbol#encoded label_name) " from module " this_module_name))) _ - (..failure ($_ text#composite - "Unknown " ": " (symbol#encoded label_name))))))] + (..failure (all text#composite + "Unknown " ": " (symbol#encoded label_name))))))] [tag .#Tag "tag"] [slot .#Slot "slot"] diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux index b1448bf9e..13bb059d3 100644 --- a/stdlib/source/library/lux/meta/location.lux +++ b/stdlib/source/library/lux/meta/location.lux @@ -35,16 +35,16 @@ (-> Location Text) (let [separator "," [file line column] it] - ($_ "lux text concat" - "@" - (`` (("lux in-module" (~~ (static .prelude_module)) .text#encoded) file)) separator - (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) line)) separator - (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) column))))) + (all "lux text concat" + "@" + (`` (("lux in-module" (~~ (static .prelude_module)) .text#encoded) file)) separator + (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) line)) separator + (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) column))))) (def: \n ("lux i64 char" +10)) (def: .public (with location error) (-> Location Text Text) - ($_ "lux text concat" (..format location) \n - error)) + (all "lux text concat" (..format location) \n + error)) diff --git a/stdlib/source/library/lux/meta/symbol.lux b/stdlib/source/library/lux/meta/symbol.lux index e745413af..15e96c352 100644 --- a/stdlib/source/library/lux/meta/symbol.lux +++ b/stdlib/source/library/lux/meta/symbol.lux @@ -48,7 +48,7 @@ (def: (encoded [module short]) (case module "" short - _ ($_ text#composite module ..separator short))) + _ (all text#composite module ..separator short))) (def: (decoded input) (case (text.all_split_by ..separator input) diff --git a/stdlib/source/library/lux/target/jvm/attribute.lux b/stdlib/source/library/lux/target/jvm/attribute.lux index 6fd6eba84..c59e77236 100644 --- a/stdlib/source/library/lux/target/jvm/attribute.lux +++ b/stdlib/source/library/lux/target/jvm/attribute.lux @@ -39,10 +39,10 @@ (All (_ about) (-> (Equivalence about) (Equivalence (Info about)))) - ($_ product.equivalence - //index.equivalence - //unsigned.equivalence - Equivalence)) + (all product.equivalence + //index.equivalence + //unsigned.equivalence + Equivalence)) (def: (info_writer writer) (All (_ about) @@ -52,7 +52,7 @@ (let [[nameS nameT] (//index.writer name) [lengthS lengthT] (//unsigned.writer/4 length) [infoS infoT] (writer info)] - [($_ n.+ nameS lengthS infoS) + [(all n.+ nameS lengthS infoS) (|>> nameT lengthT infoT)]))) (with_expansions [ (these (/code.Code Attribute))] @@ -71,19 +71,19 @@ (Equivalence Attribute) (equivalence.rec (function (_ equivalence) - ($_ sum.equivalence - (info_equivalence /constant.equivalence) - (info_equivalence (/code.equivalence equivalence)) - (info_equivalence //index.equivalence) - )))) + (all sum.equivalence + (info_equivalence /constant.equivalence) + (info_equivalence (/code.equivalence equivalence)) + (info_equivalence //index.equivalence) + )))) (def: common_attribute_length - ($_ n.+ - ... u2 attribute_name_index; - //unsigned.bytes/2 - ... u4 attribute_length; - //unsigned.bytes/4 - )) + (all n.+ + ... u2 attribute_name_index; + //unsigned.bytes/2 + ... u4 attribute_length; + //unsigned.bytes/4 + )) (def: (length attribute) (-> Attribute Nat) diff --git a/stdlib/source/library/lux/target/jvm/attribute/code.lux b/stdlib/source/library/lux/target/jvm/attribute/code.lux index 9916f97b0..5d2ed4879 100644 --- a/stdlib/source/library/lux/target/jvm/attribute/code.lux +++ b/stdlib/source/library/lux/target/jvm/attribute/code.lux @@ -31,53 +31,53 @@ (def: .public (length length code) (All (_ Attribute) (-> (-> Attribute Nat) (Code Attribute) Nat)) - ($_ n.+ - ... u2 max_stack; - ... u2 max_locals; - ///limit.length - ... u4 code_length; - ///unsigned.bytes/4 - ... u1 code[code_length]; - (binary.size (the #code code)) - ... u2 exception_table_length; - ///unsigned.bytes/2 - ... exception_table[exception_table_length]; - (|> code - (the #exception_table) - sequence.size - (n.* /exception.length)) - ... u2 attributes_count; - ///unsigned.bytes/2 - ... attribute_info attributes[attributes_count]; - (|> code - (the #attributes) - (sequence#each length) - (sequence#mix n.+ 0)))) + (all n.+ + ... u2 max_stack; + ... u2 max_locals; + ///limit.length + ... u4 code_length; + ///unsigned.bytes/4 + ... u1 code[code_length]; + (binary.size (the #code code)) + ... u2 exception_table_length; + ///unsigned.bytes/2 + ... exception_table[exception_table_length]; + (|> code + (the #exception_table) + sequence.size + (n.* /exception.length)) + ... u2 attributes_count; + ///unsigned.bytes/2 + ... attribute_info attributes[attributes_count]; + (|> code + (the #attributes) + (sequence#each length) + (sequence#mix n.+ 0)))) (def: .public (equivalence attribute_equivalence) (All (_ attribute) (-> (Equivalence attribute) (Equivalence (Code attribute)))) - ($_ product.equivalence - ///limit.equivalence - binary.equivalence - (sequence.equivalence /exception.equivalence) - (sequence.equivalence attribute_equivalence) - )) + (all product.equivalence + ///limit.equivalence + binary.equivalence + (sequence.equivalence /exception.equivalence) + (sequence.equivalence attribute_equivalence) + )) ... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3 (def: .public (writer writer code) (All (_ Attribute) (-> (Writer Attribute) (Writer (Code Attribute)))) - ($_ binaryF#composite - ... u2 max_stack; - ... u2 max_locals; - (///limit.writer (the #limit code)) - ... u4 code_length; - ... u1 code[code_length]; - (binaryF.binary_32 (the #code code)) - ... u2 exception_table_length; - ... exception_table[exception_table_length]; - ((binaryF.sequence_16 /exception.writer) (the #exception_table code)) - ... u2 attributes_count; - ... attribute_info attributes[attributes_count]; - ((binaryF.sequence_16 writer) (the #attributes code)) - )) + (all binaryF#composite + ... u2 max_stack; + ... u2 max_locals; + (///limit.writer (the #limit code)) + ... u4 code_length; + ... u1 code[code_length]; + (binaryF.binary_32 (the #code code)) + ... u2 exception_table_length; + ... exception_table[exception_table_length]; + ((binaryF.sequence_16 /exception.writer) (the #exception_table code)) + ... u2 attributes_count; + ... attribute_info attributes[attributes_count]; + ((binaryF.sequence_16 writer) (the #attributes code)) + )) diff --git a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux index 6dc9cade9..649049e0b 100644 --- a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux +++ b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux @@ -1,23 +1,23 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}]] - [data - ["[0]" product] - ["[0]" format "_" - ["[1]" binary {"+" Writer}]]] - [math - [number - ["n" nat]]]]] - ["[0]" // "_" - ["//[1]" /// "_" - [constant {"+" Class}] - ["[1][0]" index {"+" Index}] - [bytecode - ["[1][0]" address {"+" Address}]] - [encoding - ["[1][0]" unsigned {"+" U2}]]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}]] + [data + ["[0]" product] + ["[0]" format "_" + ["[1]" binary {"+" Writer}]]] + [math + [number + ["n" nat]]]]] + ["[0]" // "_" + ["//[1]" /// "_" + [constant {"+" Class}] + ["[1][0]" index {"+" Index}] + [bytecode + ["[1][0]" address {"+" Address}]] + [encoding + ["[1][0]" unsigned {"+" U2}]]]]) (type: .public Exception (Record @@ -28,32 +28,32 @@ (def: .public equivalence (Equivalence Exception) - ($_ product.equivalence - ////address.equivalence - ////address.equivalence - ////address.equivalence - ////index.equivalence - )) + (all product.equivalence + ////address.equivalence + ////address.equivalence + ////address.equivalence + ////index.equivalence + )) ... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3 (def: .public length Nat - ($_ n.+ - ... u2 start_pc; - ////unsigned.bytes/2 - ... u2 end_pc; - ////unsigned.bytes/2 - ... u2 handler_pc; - ////unsigned.bytes/2 - ... u2 catch_type; - ////unsigned.bytes/2 - )) + (all n.+ + ... u2 start_pc; + ////unsigned.bytes/2 + ... u2 end_pc; + ////unsigned.bytes/2 + ... u2 handler_pc; + ////unsigned.bytes/2 + ... u2 catch_type; + ////unsigned.bytes/2 + )) (def: .public writer (Writer Exception) - ($_ format.and - ////address.writer - ////address.writer - ////address.writer - ////index.writer - )) + (all format.and + ////address.writer + ////address.writer + ////address.writer + ////index.writer + )) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux index 3d3bb2d8d..eb98b1262 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux @@ -38,22 +38,22 @@ ) (def: .public length - ($_ n.+ - ... u2 max_stack; - /stack.length - ... u2 max_locals; - /registry.length)) + (all n.+ + ... u2 max_stack; + /stack.length + ... u2 max_locals; + /registry.length)) (def: .public equivalence (Equivalence Limit) - ($_ product.equivalence - /stack.equivalence - /registry.equivalence - )) + (all product.equivalence + /stack.equivalence + /registry.equivalence + )) (def: .public (writer limit) (Writer Limit) - ($_ format#composite - (/stack.writer (the #stack limit)) - (/registry.writer (the #registry limit)) - )) + (all format#composite + (/stack.writer (the #stack limit)) + (/registry.writer (the #registry limit)) + )) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux index 379adfd35..61201beb5 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux @@ -578,14 +578,14 @@ (-> S4 Big_Jump [Big_Jump (List Big_Jump)] Instruction)] (let [estimator (is (-> Nat Estimator) (function (_ amount_of_afterwards offset) - (|> ($_ n.+ - (///unsigned.value ..opcode_size) - (switch_padding (///unsigned.value (//address.value offset))) - (///unsigned.value ..big_jump_size) - (///unsigned.value ..integer_size) - (///unsigned.value ..integer_size) - (n.* (///unsigned.value ..big_jump_size) - (++ amount_of_afterwards))) + (|> (all n.+ + (///unsigned.value ..opcode_size) + (switch_padding (///unsigned.value (//address.value offset))) + (///unsigned.value ..big_jump_size) + (///unsigned.value ..integer_size) + (///unsigned.value ..integer_size) + (n.* (///unsigned.value ..big_jump_size) + (++ amount_of_afterwards))) ///unsigned.u2 try.trusted)))] [estimator @@ -644,12 +644,12 @@ (///unsigned.value ..big_jump_size)) estimator (is (-> Nat Estimator) (function (_ amount_of_cases offset) - (|> ($_ n.+ - (///unsigned.value ..opcode_size) - (switch_padding (///unsigned.value (//address.value offset))) - (///unsigned.value ..big_jump_size) - (///unsigned.value ..integer_size) - (n.* amount_of_cases case_size)) + (|> (all n.+ + (///unsigned.value ..opcode_size) + (switch_padding (///unsigned.value (//address.value offset))) + (///unsigned.value ..big_jump_size) + (///unsigned.value ..integer_size) + (n.* amount_of_cases case_size)) ///unsigned.u2 try.trusted)))] [estimator diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux index 8447c56de..cd459643a 100644 --- a/stdlib/source/library/lux/target/jvm/class.lux +++ b/stdlib/source/library/lux/target/jvm/class.lux @@ -58,18 +58,18 @@ (def: .public equivalence (Equivalence Class) - ($_ product.equivalence - //unsigned.equivalence - //unsigned.equivalence - //unsigned.equivalence - //pool.equivalence - //modifier.equivalence - //index.equivalence - //index.equivalence - (sequence.equivalence //index.equivalence) - (sequence.equivalence //field.equivalence) - (sequence.equivalence //method.equivalence) - (sequence.equivalence //attribute.equivalence))) + (all product.equivalence + //unsigned.equivalence + //unsigned.equivalence + //unsigned.equivalence + //pool.equivalence + //modifier.equivalence + //index.equivalence + //index.equivalence + (sequence.equivalence //index.equivalence) + (sequence.equivalence //field.equivalence) + (sequence.equivalence //method.equivalence) + (sequence.equivalence //attribute.equivalence))) (def: (install_classes this super interfaces) (-> Internal Internal (List Internal) @@ -128,23 +128,23 @@ (def: .public (writer class) (Writer Class) - (`` ($_ binaryF#composite - (~~ (template [ ] - [( (the class))] + (`` (all binaryF#composite + (~~ (template [ ] + [( (the class))] - [//magic.writer #magic] - [//version.writer #minor_version] - [//version.writer #major_version] - [//pool.writer #constant_pool] - [//modifier.writer #modifier] - [//index.writer #this] - [//index.writer #super])) - (~~ (template [ ] - [((binaryF.sequence_16 ) (the class))] + [//magic.writer #magic] + [//version.writer #minor_version] + [//version.writer #major_version] + [//pool.writer #constant_pool] + [//modifier.writer #modifier] + [//index.writer #this] + [//index.writer #super])) + (~~ (template [ ] + [((binaryF.sequence_16 ) (the class))] - [//index.writer #interfaces] - [//field.writer #fields] - [//method.writer #methods] - [//attribute.writer #attributes] - )) - ))) + [//index.writer #interfaces] + [//field.writer #fields] + [//method.writer #methods] + [//attribute.writer #attributes] + )) + ))) diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index c32ca731c..230157059 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -140,15 +140,15 @@ (template [ ] [(def: .public (Equivalence ( Any)) - ($_ product.equivalence - //index.equivalence - //index.equivalence)) + (all product.equivalence + //index.equivalence + //index.equivalence)) (def: (Writer ( Any)) - ($_ binaryF.and - //index.writer - //index.writer))] + (all binaryF.and + //index.writer + //index.writer))] [Name_And_Type name_and_type_equivalence name_and_type_writer] [Reference reference_equivalence reference_writer] @@ -201,7 +201,7 @@ _ false))) - ... ($_ sum.equivalence + ... (all sum.equivalence ... ... #UTF8 ... text.equivalence ... ... #Long diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux index 5db3ac6b0..d97951fbf 100644 --- a/stdlib/source/library/lux/target/jvm/field.lux +++ b/stdlib/source/library/lux/target/jvm/field.lux @@ -42,23 +42,23 @@ (def: .public equivalence (Equivalence Field) - ($_ product.equivalence - modifier.equivalence - //index.equivalence - //index.equivalence - (sequence.equivalence //attribute.equivalence))) + (all product.equivalence + modifier.equivalence + //index.equivalence + //index.equivalence + (sequence.equivalence //attribute.equivalence))) (def: .public (writer field) (Writer Field) - (`` ($_ binaryF#composite - (~~ (template [ ] - [( (the field))] + (`` (all binaryF#composite + (~~ (template [ ] + [( (the field))] - [modifier.writer #modifier] - [//index.writer #name] - [//index.writer #descriptor] - [(binaryF.sequence_16 //attribute.writer) #attributes])) - ))) + [modifier.writer #modifier] + [//index.writer #name] + [//index.writer #descriptor] + [(binaryF.sequence_16 //attribute.writer) #attributes])) + ))) (def: .public (field modifier name with_signature? type attributes) (-> (Modifier Field) UTF8 Bit (Type Value) (Sequence Attribute) diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux index cac656214..193bb4db8 100644 --- a/stdlib/source/library/lux/target/jvm/method.lux +++ b/stdlib/source/library/lux/target/jvm/method.lux @@ -89,21 +89,21 @@ (def: .public equivalence (Equivalence Method) - ($_ product.equivalence - //modifier.equivalence - //index.equivalence - //index.equivalence - (sequence.equivalence //attribute.equivalence) - )) + (all product.equivalence + //modifier.equivalence + //index.equivalence + //index.equivalence + (sequence.equivalence //attribute.equivalence) + )) (def: .public (writer field) (Writer Method) - (`` ($_ format#composite - (~~ (template [ ] - [( (the field))] + (`` (all format#composite + (~~ (template [ ] + [( (the field))] - [//modifier.writer #modifier] - [//index.writer #name] - [//index.writer #descriptor] - [(format.sequence_16 //attribute.writer) #attributes])) - ))) + [//modifier.writer #modifier] + [//index.writer #name] + [//index.writer #descriptor] + [(format.sequence_16 //attribute.writer) #attributes])) + ))) diff --git a/stdlib/source/library/lux/target/jvm/type/alias.lux b/stdlib/source/library/lux/target/jvm/type/alias.lux index 9c802f924..39f8aba69 100644 --- a/stdlib/source/library/lux/target/jvm/type/alias.lux +++ b/stdlib/source/library/lux/target/jvm/type/alias.lux @@ -1,28 +1,28 @@ (.using - [library - [lux {"-" Type Primitive int char type parameter} - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" maybe] - ["[0]" try] - ["[0]" exception {"+" exception:}] - ["<>" parser - ["<[0]>" text {"+" Parser}]]] - [data - ["[0]" text - ["%" format {"+" format}]] - [collection - ["[0]" dictionary {"+" Dictionary}]]]]] - ["[0]" // {"+" Type} - [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter}] - ["[1][0]" descriptor] - ["[1][0]" signature {"+" Signature}] - ["[1][0]" reflection] - ["[1][0]" parser] - ["/[1]" // "_" - [encoding - ["[1][0]" name]]]]) + [library + [lux {"-" Type Primitive int char type parameter} + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" maybe] + ["[0]" try] + ["[0]" exception {"+" exception:}] + ["<>" parser + ["<[0]>" text {"+" Parser}]]] + [data + ["[0]" text + ["%" format {"+" format}]] + [collection + ["[0]" dictionary {"+" Dictionary}]]]]] + ["[0]" // {"+" Type} + [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter}] + ["[1][0]" descriptor] + ["[1][0]" signature {"+" Signature}] + ["[1][0]" reflection] + ["[1][0]" parser] + ["/[1]" // "_" + [encoding + ["[1][0]" name]]]]) (type: .public Aliasing (Dictionary Text Text)) @@ -67,23 +67,23 @@ (<>.rec (function (_ parameter) (let [class (..class parameter)] - ($_ <>.either - (..var aliasing) - //parser.wildcard - (..lower class) - (..upper class) - class - ))))) + (all <>.either + (..var aliasing) + //parser.wildcard + (..lower class) + (..upper class) + class + ))))) (def: (value aliasing) (-> Aliasing (Parser (Type Value))) (<>.rec (function (_ value) - ($_ <>.either - //parser.primitive - (parameter aliasing) - (//parser.array' value) - )))) + (all <>.either + //parser.primitive + (parameter aliasing) + (//parser.array' value) + )))) (def: (inputs aliasing) (-> Aliasing (Parser (List (Type Value)))) @@ -93,10 +93,10 @@ (def: (return aliasing) (-> Aliasing (Parser (Type Return))) - ($_ <>.either - //parser.void - (..value aliasing) - )) + (all <>.either + //parser.void + (..value aliasing) + )) (def: (exception aliasing) (-> Aliasing (Parser (Type Class))) diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux index c608b7a94..60960123d 100644 --- a/stdlib/source/library/lux/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/target/jvm/type/lux.lux @@ -85,29 +85,29 @@ (def: primitive (Parser (Check Type)) - ($_ <>.either - ..boolean - ..byte - ..short - ..int - ..long - ..float - ..double - ..char - )) + (all <>.either + ..boolean + ..byte + ..short + ..int + ..long + ..float + ..double + ..char + )) (def: boxed_primitive (Parser (Check Type)) - ($_ <>.either - ..boxed_boolean - ..boxed_byte - ..boxed_short - ..boxed_int - ..boxed_long - ..boxed_float - ..boxed_double - ..boxed_char - )) + (all <>.either + ..boxed_boolean + ..boxed_byte + ..boxed_short + ..boxed_int + ..boxed_long + ..boxed_float + ..boxed_double + ..boxed_char + )) (def: wildcard (Parser (Check Type)) @@ -157,13 +157,13 @@ (<>.rec (function (_ parameter) (let [class (..class' parameter)] - ($_ <>.either - (..var mapping) - ..wildcard - (..lower class) - (..upper class) - class - ))))) + (all <>.either + (..var mapping) + ..wildcard + (..lower class) + (..upper class) + class + ))))) (def: .public class (-> Mapping (Parser (Check Type))) @@ -196,35 +196,35 @@ (-> Mapping (Parser (Check Type))) (<>.rec (function (_ type) - ($_ <>.either - ..primitive - (parameter mapping) - (..array type) - )))) + (all <>.either + ..primitive + (parameter mapping) + (..array type) + )))) (def: .public (boxed_type mapping) (-> Mapping (Parser (Check Type))) (<>.rec (function (_ type) - ($_ <>.either - ..boxed_primitive - (parameter mapping) - (..array type) - )))) + (all <>.either + ..boxed_primitive + (parameter mapping) + (..array type) + )))) (def: .public (return mapping) (-> Mapping (Parser (Check Type))) - ($_ <>.either - ..void - (..type mapping) - )) + (all <>.either + ..void + (..type mapping) + )) (def: .public (boxed_return mapping) (-> Mapping (Parser (Check Type))) - ($_ <>.either - ..void - (..boxed_type mapping) - )) + (all <>.either + ..void + (..boxed_type mapping) + )) (def: .public (check operation input) (All (_ a) (-> (Parser (Check a)) Text (Check a))) diff --git a/stdlib/source/library/lux/target/jvm/type/parser.lux b/stdlib/source/library/lux/target/jvm/type/parser.lux index b576c8d5b..e7c2a2c70 100644 --- a/stdlib/source/library/lux/target/jvm/type/parser.lux +++ b/stdlib/source/library/lux/target/jvm/type/parser.lux @@ -42,16 +42,16 @@ (def: .public primitive (Parser (Type Primitive)) - ($_ <>.either - ..boolean - ..byte - ..short - ..int - ..long - ..float - ..double - ..char - )) + (all <>.either + ..boolean + ..byte + ..short + ..int + ..long + ..float + ..double + ..char + )) (def: var/head (format "abcdefghijklmnopqrstuvwxyz" @@ -137,23 +137,23 @@ (<>.rec (function (_ parameter) (let [class (..class' parameter)] - ($_ <>.either - ..var - ..wildcard - (..lower parameter) - (..upper parameter) - (..array' value) - class - ))))) + (all <>.either + ..var + ..wildcard + (..lower parameter) + (..upper parameter) + (..array' value) + class + ))))) (def: .public value (Parser (Type Value)) (<>.rec (function (_ value) - ($_ <>.either - ..primitive - (..parameter' value) - )))) + (all <>.either + ..primitive + (..parameter' value) + )))) (def: .public parameter (Parser (Type Parameter)) @@ -188,9 +188,9 @@ (def: .public object (Parser (Type Object)) - ($_ <>.either - ..class - ..array)) + (all <>.either + ..class + ..array)) (def: inputs (|> (<>.some ..value) @@ -225,14 +225,14 @@ (List (Type Value)) (Type Return) (List (Type Class))]) - ($_ <>.and - (|> (<>.some (<>#each product.left ..var_declaration)) - (<>.after (.this //signature.parameters_start)) - (<>.before (.this //signature.parameters_end)) - (<>.else (list))) - ..inputs - ..return - (<>.some ..exception)))] + (all <>.and + (|> (<>.some (<>#each product.left ..var_declaration)) + (<>.after (.this //signature.parameters_start)) + (<>.before (.this //signature.parameters_end)) + (<>.else (list))) + ..inputs + ..return + (<>.some ..exception)))] (|>> //.signature //signature.signature (.result parser) diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux index 1d8bf0de5..c03676e09 100644 --- a/stdlib/source/library/lux/time.lux +++ b/stdlib/source/library/lux/time.lux @@ -139,11 +139,11 @@ utc_second ..second_parser utc_millis ..millis_parser] (in (abstraction - ($_ n.+ - (n.* utc_hour hour) - (n.* utc_minute minute) - (n.* utc_second second) - (n.* utc_millis millis))))))) + (all n.+ + (n.* utc_hour hour) + (n.* utc_minute minute) + (n.* utc_second second) + (n.* utc_millis millis))))))) ) (def: (padded value) @@ -161,10 +161,10 @@ (def: (millis_format millis) (-> Nat Text) (cond (n.= 0 millis) "" - (n.< 10 millis) ($_ text#composite ".00" (n#encoded millis)) - (n.< 100 millis) ($_ text#composite ".0" (n#encoded millis)) + (n.< 10 millis) (all text#composite ".00" (n#encoded millis)) + (n.< 100 millis) (all text#composite ".0" (n#encoded millis)) ... (n.< 1,000 millis) - ($_ text#composite "." (n#encoded millis)))) + (all text#composite "." (n#encoded millis)))) (type: .public Clock (Record @@ -189,11 +189,11 @@ (def: .public (time clock) (-> Clock (Try Time)) - (|> ($_ duration.composite - (duration.up (the #hour clock) duration.hour) - (duration.up (the #minute clock) duration.minute) - (duration.up (the #second clock) duration.second) - (duration.of_millis (.int (the #milli_second clock)))) + (|> (all duration.composite + (duration.up (the #hour clock) duration.hour) + (duration.up (the #minute clock) duration.minute) + (duration.up (the #second clock) duration.second) + (duration.of_millis (.int (the #milli_second clock)))) duration.millis .nat ..of_millis)) @@ -201,11 +201,11 @@ (def: (format time) (-> Time Text) (let [(open "_[0]") (..clock time)] - ($_ text#composite - (..padded _#hour) - ..separator (..padded _#minute) - ..separator (..padded _#second) - (..millis_format _#milli_second)))) + (all text#composite + (..padded _#hour) + ..separator (..padded _#minute) + ..separator (..padded _#second) + (..millis_format _#milli_second)))) (implementation: .public codec (Codec Text Time) diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux index c19df3444..d47ed902c 100644 --- a/stdlib/source/library/lux/time/date.lux +++ b/stdlib/source/library/lux/time/date.lux @@ -184,10 +184,10 @@ (def: (format value) (-> Date Text) - ($_ text#composite - (# //year.codec encoded (..year value)) - ..separator (..padded (|> value ..month //month.number)) - ..separator (..padded (..day_of_month value)))) + (all text#composite + (# //year.codec encoded (..year value)) + ..separator (..padded (|> value ..month //month.number)) + ..separator (..padded (..day_of_month value)))) (implementation: .public codec (Codec Text Date) diff --git a/stdlib/source/library/lux/time/day.lux b/stdlib/source/library/lux/time/day.lux index 1a5b0a10f..02926f610 100644 --- a/stdlib/source/library/lux/time/day.lux +++ b/stdlib/source/library/lux/time/day.lux @@ -153,10 +153,10 @@ (exception: .public (invalid_day [number Nat]) (exception.report "Number" (# n.decimal encoded number) - "Valid range" ($_ "lux text concat" - (# n.decimal encoded (..number {#Sunday})) - " ~ " - (# n.decimal encoded (..number {#Saturday}))))) + "Valid range" (all "lux text concat" + (# n.decimal encoded (..number {#Sunday})) + " ~ " + (# n.decimal encoded (..number {#Saturday}))))) (def: .public (by_number number) (-> Nat (Try Day)) diff --git a/stdlib/source/library/lux/time/duration.lux b/stdlib/source/library/lux/time/duration.lux index 85e271547..84588ff83 100644 --- a/stdlib/source/library/lux/time/duration.lux +++ b/stdlib/source/library/lux/time/duration.lux @@ -127,10 +127,10 @@ (def: (encoded duration) (if (# ..equivalence = ..empty duration) - ($_ text#composite - ..positive_sign - (nat#encoded 0) - ..milli_second_suffix) + (all text#composite + ..positive_sign + (nat#encoded 0) + ..milli_second_suffix) (let [signed? (negative? duration) [days time_left] [(ticks day duration) (framed day duration)] days (if signed? @@ -143,14 +143,14 @@ [minutes time_left] [(ticks minute time_left) (framed minute time_left)] [seconds time_left] [(ticks second time_left) (framed second time_left)] millis (..millis time_left)] - ($_ text#composite - (if signed? ..negative_sign ..positive_sign) - (if (i.= +0 days) "" (text#composite (nat#encoded (.nat days)) ..day_suffix)) - (if (i.= +0 hours) "" (text#composite (nat#encoded (.nat hours)) ..hour_suffix)) - (if (i.= +0 minutes) "" (text#composite (nat#encoded (.nat minutes)) ..minute_suffix)) - (if (i.= +0 seconds) "" (text#composite (nat#encoded (.nat seconds)) ..second_suffix)) - (if (i.= +0 millis) "" (text#composite (nat#encoded (.nat millis)) ..milli_second_suffix)) - )))) + (all text#composite + (if signed? ..negative_sign ..positive_sign) + (if (i.= +0 days) "" (text#composite (nat#encoded (.nat days)) ..day_suffix)) + (if (i.= +0 hours) "" (text#composite (nat#encoded (.nat hours)) ..hour_suffix)) + (if (i.= +0 minutes) "" (text#composite (nat#encoded (.nat minutes)) ..minute_suffix)) + (if (i.= +0 seconds) "" (text#composite (nat#encoded (.nat seconds)) ..second_suffix)) + (if (i.= +0 millis) "" (text#composite (nat#encoded (.nat millis)) ..milli_second_suffix)) + )))) (def: parser (Parser Duration) diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux index d32879232..5ba290670 100644 --- a/stdlib/source/library/lux/time/instant.lux +++ b/stdlib/source/library/lux/time/instant.lux @@ -123,9 +123,9 @@ (-> Instant Text) (let [[date time] (..date_time instant) time (..clock_time time)] - ($_ text#composite - (# date.codec encoded date) ..date_suffix - (# //.codec encoded time) ..time_suffix))) + (all text#composite + (# date.codec encoded date) ..date_suffix + (# //.codec encoded time) ..time_suffix))) (def: parser (Parser Instant) diff --git a/stdlib/source/library/lux/time/month.lux b/stdlib/source/library/lux/time/month.lux index 503780519..351a6ecf7 100644 --- a/stdlib/source/library/lux/time/month.lux +++ b/stdlib/source/library/lux/time/month.lux @@ -81,10 +81,10 @@ (exception: .public (invalid_month [number Nat]) (exception.report "Number" (# n.decimal encoded number) - "Valid range" ($_ "lux text concat" - (# n.decimal encoded (..number {#January})) - " ~ " - (# n.decimal encoded (..number {#December}))))) + "Valid range" (all "lux text concat" + (# n.decimal encoded (..number {#January})) + " ~ " + (# n.decimal encoded (..number {#December}))))) (def: .public (by_number number) (-> Nat (Try Month)) diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux index 4937ec9c1..ac43de9f2 100644 --- a/stdlib/source/library/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux @@ -100,13 +100,13 @@ (All (_ a) (-> (Writer a) (Writer [(module.Module a) Registry]))) - ($_ _.and - ($_ _.and - _.nat - descriptor.writer - (document.writer //)) - registry.writer - )) + (all _.and + (all _.and + _.nat + descriptor.writer + (document.writer //)) + registry.writer + )) (def: (cache_module context platform @module key format entry) (All (_ document) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux index f237ebeae..eb6cd78d7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux @@ -23,80 +23,80 @@ (def: .public writer (Writer .Module) (let [definition (is (Writer Definition) - ($_ _.and _.bit _.type _.any)) + (all _.and _.bit _.type _.any)) labels (is (Writer [Text (List Text)]) (_.and _.text (_.list _.text))) global_type (is (Writer [Bit Type (Either [Text (List Text)] [Text (List Text)])]) - ($_ _.and _.bit _.type (_.or labels labels))) + (all _.and _.bit _.type (_.or labels labels))) global_label (is (Writer .Label) - ($_ _.and _.bit _.type (_.list _.text) _.nat)) + (all _.and _.bit _.type (_.list _.text) _.nat)) alias (is (Writer Alias) (_.and _.text _.text)) global (is (Writer Global) - ($_ _.or - definition - global_type - global_label - global_label - alias))] - ($_ _.and - ... #module_hash - _.nat - ... #module_aliases - (_.list alias) - ... #definitions - (_.list (_.and _.text global)) - ... #imports - (_.list _.text) - ... #module_state - _.any))) + (all _.or + definition + global_type + global_label + global_label + alias))] + (all _.and + ... #module_hash + _.nat + ... #module_aliases + (_.list alias) + ... #definitions + (_.list (_.and _.text global)) + ... #imports + (_.list _.text) + ... #module_state + _.any))) (def: .public parser (Parser .Module) (let [definition (is (Parser Definition) - ($_ <>.and - .bit - .type - .any)) + (all <>.and + .bit + .type + .any)) labels (is (Parser [Text (List Text)]) - ($_ <>.and - .text - (.list .text))) + (all <>.and + .text + (.list .text))) global_type (is (Parser [Bit Type (Either [Text (List Text)] [Text (List Text)])]) - ($_ <>.and - .bit - .type - (.or labels labels))) - global_label (is (Parser .Label) - ($_ <>.and + (all <>.and .bit .type - (.list .text) - .nat)) + (.or labels labels))) + global_label (is (Parser .Label) + (all <>.and + .bit + .type + (.list .text) + .nat)) alias (is (Parser Alias) - ($_ <>.and - .text - .text)) + (all <>.and + .text + .text)) global (is (Parser Global) - ($_ .or - definition - global_type - global_label - global_label - alias))] - ($_ <>.and - ... #module_hash - .nat - ... #module_aliases - (.list alias) - ... #definitions - (.list (<>.and .text global)) - ... #imports - (.list .text) - ... #module_state - (# <>.monad in {.#Cached})))) + (all .or + definition + global_type + global_label + global_label + alias))] + (all <>.and + ... #module_hash + .nat + ... #module_aliases + (.list alias) + ... #definitions + (.list (<>.and .text global)) + ... #imports + (.list .text) + ... #module_state + (# <>.monad in {.#Cached})))) (def: .public key (Key .Module) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux index 738795545..f4cf115d5 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux @@ -75,14 +75,14 @@ (def: (hash value) (case value {#Variant [lefts right? value]} - ($_ n.* 2 - (# n.hash hash lefts) - (# bit.hash hash right?) - (# super hash value)) + (all n.* 2 + (# n.hash hash lefts) + (# bit.hash hash right?) + (# super hash value)) {#Tuple members} - ($_ n.* 3 - (# (list.hash super) hash members)) + (all n.* 3 + (# (list.hash super) hash members)) ))) (def: .public (format %it it) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux index 578cad62c..040298209 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux @@ -2,7 +2,7 @@ [library [lux {"-" local} [abstract - monad] + [monad {"+" do}]] [control ["[0]" maybe ("[1]#[0]" monad)] ["[0]" try] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux index 5bdfe1718..6416fbe77 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -3,7 +3,7 @@ [lux {"-" function} ["[0]" meta] [abstract - monad] + [monad {"+" do}]] [control ["[0]" maybe] ["[0]" try] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux index 6f23ba667..e5f1914ab 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux @@ -3,7 +3,7 @@ [lux "*" ["[0]" meta] [abstract - monad] + [monad {"+" do}]] [control ["[0]" exception {"+" exception:}]] [data diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux index 1d0c1f86b..39a8ef632 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux @@ -76,7 +76,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -95,7 +95,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -123,7 +123,7 @@ (def: object::new Handler (custom - [($_ <>.and .any (.tuple (<>.some .any))) + [(all <>.and .any (.tuple (<>.some .any))) (function (_ extension phase archive [constructorC inputsC]) (do [! phase.monad] [constructorA (analysis/type.expecting Any @@ -135,7 +135,7 @@ (def: object::get Handler (custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (analysis/type.expecting Any @@ -147,7 +147,7 @@ (def: object::do Handler (custom - [($_ <>.and .text .any (.tuple (<>.some .any))) + [(all <>.and .text .any (.tuple (<>.some .any))) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (analysis/type.expecting Any @@ -183,7 +183,7 @@ (def: js::apply Handler (custom - [($_ <>.and .any (.tuple (<>.some .any))) + [(all <>.and .any (.tuple (<>.some .any))) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.expecting Any @@ -206,7 +206,7 @@ (def: js::function Handler (custom - [($_ <>.and .nat .any) + [(all <>.and .nat .any) (function (_ extension phase archive [arity abstractionC]) (do phase.monad [.let [inputT (type.tuple (list.repeated arity Any))] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index 3547f8029..6a54bf8e5 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -231,7 +231,7 @@ (def: member (Parser Member) - ($_ <>.and .text .text)) + (all <>.and .text .text)) (type: Method_Signature (Record @@ -918,7 +918,7 @@ (def: (object::instance? class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension_name analyse archive [sub_class objectC]) (do phase.monad [_ (..ensure_fresh_class! class_loader sub_class) @@ -1070,7 +1070,7 @@ (def: (put::static class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..member .any) + [(all <>.and ..member .any) (function (_ extension_name analyse archive [[class field] valueC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1095,7 +1095,7 @@ (def: (get::virtual class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..member .any) + [(all <>.and ..member .any) (function (_ extension_name analyse archive [[class field] objectC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1120,7 +1120,7 @@ (def: (put::virtual class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..member .any .any) + [(all <>.and ..member .any .any) (function (_ extension_name analyse archive [[class field] valueC objectC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1516,7 +1516,7 @@ (def: (invoke::static class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..type_vars ..member ..type_vars (<>.some ..input)) + [(all <>.and ..type_vars ..member ..type_vars (<>.some ..input)) (function (_ extension_name analyse archive [class_tvars [class method] method_tvars argsTC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1534,7 +1534,7 @@ (def: (invoke::virtual class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) + [(all <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) (function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1559,7 +1559,7 @@ (def: (invoke::special class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) + [(all <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) (function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1584,7 +1584,7 @@ (def: (invoke::interface class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) + [(all <>.and ..type_vars ..member ..type_vars .any (<>.some ..input)) (function (_ extension_name analyse archive [class_tvars [class_name method] method_tvars objectC argsTC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class_name) @@ -1613,7 +1613,7 @@ (def: (invoke::constructor class_loader) (-> java/lang/ClassLoader Handler) (..custom - [($_ <>.and ..type_vars .text ..type_vars (<>.some ..input)) + [(all <>.and ..type_vars .text ..type_vars (<>.some ..input)) (function (_ extension_name analyse archive [class_tvars class method_tvars argsTC]) (do phase.monad [_ (..ensure_fresh_class! class_loader class) @@ -1781,12 +1781,12 @@ (def: .public visibility' (.Parser Visibility) - ($_ <>.or - (.this ..public_tag) - (.this ..private_tag) - (.this ..protected_tag) - (.this ..default_tag) - )) + (all <>.or + (.this ..public_tag) + (.this ..private_tag) + (.this ..protected_tag) + (.this ..default_tag) + )) (def: .public visibility (Parser Visibility) @@ -1826,14 +1826,14 @@ (Parser (Abstract_Method Code)) (<| .form (<>.after (.this_text ..abstract_tag)) - ($_ <>.and - .text - ..visibility - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - (.tuple (<>.some ..argument)) - ..return - (.tuple (<>.some ..class))))) + (all <>.and + .text + ..visibility + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + (.tuple (<>.some ..argument)) + ..return + (.tuple (<>.some ..class))))) (def: (method_mapping of_class parameters) (-> Mapping (List (Type Var)) (Check Mapping)) @@ -1888,16 +1888,16 @@ (Parser (Constructor Code)) (<| .form (<>.after (.this_text ..constructor_tag)) - ($_ <>.and - ..visibility - .bit - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - (.tuple (<>.some ..class)) - .text - (.tuple (<>.some ..argument)) - (.tuple (<>.some ..input)) - .any))) + (all <>.and + ..visibility + .bit + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + (.tuple (<>.some ..class)) + .text + (.tuple (<>.some ..argument)) + (.tuple (<>.some ..input)) + .any))) (def: .public (analyse_constructor_method analyse archive selfT mapping method) (-> Phase Archive .Type Mapping (Constructor Code) (Operation Analysis)) @@ -1968,18 +1968,18 @@ (Parser (Virtual_Method Code)) (<| .form (<>.after (.this_text ..virtual_tag)) - ($_ <>.and - .text - ..visibility - .bit - .bit - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - .text - (.tuple (<>.some ..argument)) - ..return - (.tuple (<>.some ..class)) - .any))) + (all <>.and + .text + ..visibility + .bit + .bit + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + .text + (.tuple (<>.some ..argument)) + ..return + (.tuple (<>.some ..class)) + .any))) (type: .public (Method_Declaration a) (Record @@ -1993,14 +1993,14 @@ (def: .public method_declaration (Parser (Method_Declaration Code)) (.form - ($_ <>.and - .text - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - (.tuple (<>.some ..class)) - (.tuple (<>.some ..type)) - ..return - ))) + (all <>.and + .text + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + (.tuple (<>.some ..class)) + (.tuple (<>.some ..type)) + ..return + ))) (def: .public (analyse_virtual_method analyse archive selfT mapping method) (-> Phase Archive .Type Mapping (Virtual_Method Code) (Operation Analysis)) @@ -2066,16 +2066,16 @@ (Parser (Static_Method Code)) (<| .form (<>.after (.this_text ..static_tag)) - ($_ <>.and - .text - ..visibility - .bit - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - (.tuple (<>.some ..argument)) - ..return - (.tuple (<>.some ..class)) - .any))) + (all <>.and + .text + ..visibility + .bit + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + (.tuple (<>.some ..argument)) + ..return + (.tuple (<>.some ..class)) + .any))) (def: .public (analyse_static_method analyse archive mapping method) (-> Phase Archive Mapping (Static_Method Code) (Operation Analysis)) @@ -2140,18 +2140,18 @@ (Parser (Overriden_Method Code)) (<| .form (<>.after (.this_text ..overriden_tag)) - ($_ <>.and - ..class - .text - .bit - (.tuple (<>.some ..annotation)) - (.tuple (<>.some ..var)) - .text - (.tuple (<>.some ..argument)) - ..return - (.tuple (<>.some ..class)) - .any - ))) + (all <>.and + ..class + .text + .bit + (.tuple (<>.some ..annotation)) + (.tuple (<>.some ..var)) + .text + (.tuple (<>.some ..argument)) + ..return + (.tuple (<>.some ..class)) + .any + ))) (exception: .public (unknown_super [name Text supers (List (Type Class))]) @@ -2396,9 +2396,9 @@ (try#each (|>> (format.result class.writer) [name]) (class.class version.v6_0 - ($_ modifier#composite - class.public - modifier) + (all modifier#composite + class.public + modifier) (name.internal name) {.#Some signature} (..class_name super) @@ -2409,11 +2409,11 @@ (def: constant::modifier (Modifier field.Field) - ($_ modifier#composite - field.public - field.static - field.final - )) + (all modifier#composite + field.public + field.static + field.final + )) (def: (field_definition field) (-> Field (Resource field.Field)) @@ -2484,24 +2484,24 @@ _.return {.#Left valueT} - ($_ _.composite - (mock_value valueT) - (case (jvm.primitive? valueT) - {.#Left classT} - _.areturn - - {.#Right primitiveT} - (cond (# jvm.equivalence = jvm.long primitiveT) - _.lreturn + (all _.composite + (mock_value valueT) + (case (jvm.primitive? valueT) + {.#Left classT} + _.areturn + + {.#Right primitiveT} + (cond (# jvm.equivalence = jvm.long primitiveT) + _.lreturn - (# jvm.equivalence = jvm.float primitiveT) - _.freturn + (# jvm.equivalence = jvm.float primitiveT) + _.freturn - (# jvm.equivalence = jvm.double primitiveT) - _.dreturn + (# jvm.equivalence = jvm.double primitiveT) + _.dreturn - ... jvm.boolean jvm.byte jvm.short jvm.int jvm.char - _.ireturn))))) + ... jvm.boolean jvm.byte jvm.short jvm.int jvm.char + _.ireturn))))) (def: (mock_method super method) (-> (Type Class) (Method_Definition Code) (Resource method.Method)) @@ -2509,32 +2509,32 @@ {#Constructor [privacy strict_floating_point? annotations variables exceptions self arguments constructor_arguments body]} - (method.method ($_ modifier#composite - (..method_privacy privacy) - (if strict_floating_point? - method.strict - modifier.empty)) + (method.method (all modifier#composite + (..method_privacy privacy) + (if strict_floating_point? + method.strict + modifier.empty)) ..constructor_name #0 (jvm.method [variables (list#each product.right arguments) jvm.void exceptions]) (list) - {.#Some ($_ _.composite - (_.aload 0) - (|> constructor_arguments - (list#each (|>> product.left ..mock_value)) - (monad.all _.monad)) - (|> (jvm.method [(list) (list#each product.left constructor_arguments) jvm.void (list)]) - (_.invokespecial super ..constructor_name)) - _.return - )}) + {.#Some (all _.composite + (_.aload 0) + (|> constructor_arguments + (list#each (|>> product.left ..mock_value)) + (monad.all _.monad)) + (|> (jvm.method [(list) (list#each product.left constructor_arguments) jvm.void (list)]) + (_.invokespecial super ..constructor_name)) + _.return + )}) {#Overriden_Method [super name strict_floating_point? annotations variables self arguments return exceptions body]} - (method.method ($_ modifier#composite - method.public - (if strict_floating_point? - method.strict - modifier.empty)) + (method.method (all modifier#composite + method.public + (if strict_floating_point? + method.strict + modifier.empty)) name #0 (jvm.method [variables (list#each product.right arguments) return exceptions]) (list) @@ -2543,14 +2543,14 @@ {#Virtual_Method [name privacy final? strict_floating_point? annotations variables self arguments return exceptions body]} - (method.method ($_ modifier#composite - (..method_privacy privacy) - (if strict_floating_point? - method.strict - modifier.empty) - (if final? - method.final - modifier.empty)) + (method.method (all modifier#composite + (..method_privacy privacy) + (if strict_floating_point? + method.strict + modifier.empty) + (if final? + method.final + modifier.empty)) name #0 (jvm.method [variables (list#each product.right arguments) return exceptions]) (list) @@ -2559,12 +2559,12 @@ {#Static_Method [name privacy strict_floating_point? annotations variables arguments return exceptions body]} - (method.method ($_ modifier#composite - method.static - (..method_privacy privacy) - (if strict_floating_point? - method.strict - modifier.empty)) + (method.method (all modifier#composite + method.static + (..method_privacy privacy) + (if strict_floating_point? + method.strict + modifier.empty)) name #0 (jvm.method [variables (list#each product.right arguments) return exceptions]) (list) @@ -2572,9 +2572,9 @@ {#Abstract_Method [name privacy annotations variables arguments return exceptions]} - (method.method ($_ modifier#composite - method.abstract - (..method_privacy privacy)) + (method.method (all modifier#composite + method.abstract + (..method_privacy privacy)) name #0 (jvm.method [variables (list#each product.right arguments) return exceptions]) (list) @@ -2594,12 +2594,12 @@ (def: (class::anonymous class_loader host) (-> java/lang/ClassLoader runtime.Host Handler) (..custom - [($_ <>.and - (.tuple (<>.some ..var)) - ..class - (.tuple (<>.some ..class)) - (.tuple (<>.some ..input)) - (.tuple (<>.some ..overriden_method_definition))) + [(all <>.and + (.tuple (<>.some ..var)) + ..class + (.tuple (<>.some ..class)) + (.tuple (<>.some ..input)) + (.tuple (<>.some ..overriden_method_definition))) (function (_ extension_name analyse archive [parameters super_class super_interfaces diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux index a0e5d2a1c..6f5b62016 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux @@ -88,7 +88,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -107,7 +107,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -135,7 +135,7 @@ (def: object::get Handler (custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (analysis/type.expecting ..Object @@ -147,7 +147,7 @@ (def: object::do Handler (custom - [($_ <>.and .text .any (.tuple (<>.some .any))) + [(all <>.and .text .any (.tuple (<>.some .any))) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (analysis/type.expecting ..Object @@ -204,7 +204,7 @@ (def: lua::apply Handler (custom - [($_ <>.and .any (.tuple (<>.some .any))) + [(all <>.and .any (.tuple (<>.some .any))) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.expecting ..Function @@ -216,7 +216,7 @@ (def: lua::power Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [powerC baseC]) (do [! phase.monad] [powerA (analysis/type.expecting Frac @@ -238,7 +238,7 @@ (def: lua::function Handler (custom - [($_ <>.and .nat .any) + [(all <>.and .nat .any) (function (_ extension phase archive [arity abstractionC]) (do phase.monad [.let [inputT (type.tuple (list.repeated arity Any))] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index bf2f53507..6ff97bb35 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -96,11 +96,11 @@ (def: lux::syntax_char_case! (..custom - [($_ <>.and - .any - (.tuple (<>.some (<>.and (.tuple (<>.many ..text_char)) - .any))) - .any) + [(all <>.and + .any + (.tuple (<>.some (<>.and (.tuple (<>.many ..text_char)) + .any))) + .any) (function (_ extension_name phase archive [input conditionals else]) (do [! ////.monad] [input (<| (typeA.expecting text.Char) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux index 760db788c..6d7b0d128 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux @@ -72,7 +72,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -89,7 +89,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -127,7 +127,7 @@ (def: object::new Handler (custom - [($_ <>.and .text (<>.some .any)) + [(all <>.and .text (<>.some .any)) (function (_ extension phase archive [constructor inputsC]) (do [! phase.monad] [inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC) @@ -137,7 +137,7 @@ (def: object::get Handler (custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (analysis/type.with_type ..Object @@ -149,7 +149,7 @@ (def: object::do Handler (custom - [($_ <>.and .text .any (<>.some .any)) + [(all <>.and .text .any (<>.some .any)) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (analysis/type.with_type ..Object @@ -183,7 +183,7 @@ (def: php::apply Handler (custom - [($_ <>.and .any (<>.some .any)) + [(all <>.and .any (<>.some .any)) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.with_type ..Function @@ -195,7 +195,7 @@ (def: php::pack Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [formatC dataC]) (do [! phase.monad] [formatA (analysis/type.with_type Text diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux index ceecbce4f..9156e497b 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux @@ -76,7 +76,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -95,7 +95,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -139,7 +139,7 @@ (def: object::get Handler (custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (analysis/type.expecting ..Object @@ -151,7 +151,7 @@ (def: object::do Handler (custom - [($_ <>.and .text .any (.tuple (<>.some .any))) + [(all <>.and .text .any (.tuple (<>.some .any))) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (analysis/type.expecting ..Object @@ -193,7 +193,7 @@ (def: python::apply Handler (custom - [($_ <>.and .any (.tuple (<>.some .any))) + [(all <>.and .any (.tuple (<>.some .any))) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.expecting ..Function @@ -205,7 +205,7 @@ (def: python::function Handler (custom - [($_ <>.and .nat .any) + [(all <>.and .nat .any) (function (_ extension phase archive [arity abstractionC]) (do phase.monad [.let [inputT (type.tuple (list.repeated arity Any))] @@ -218,7 +218,7 @@ (def: python::exec Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [codeC globalsC]) (do phase.monad [codeA (analysis/type.expecting Text diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux index 8af81e312..9ab5d8351 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux @@ -76,7 +76,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -95,7 +95,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@read :read:])) @@ -135,7 +135,7 @@ (def: object::get Handler (custom - [($_ <>.and .text .any) + [(all <>.and .text .any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (<| (analysis/type.expecting ..Object) @@ -147,7 +147,7 @@ (def: object::do Handler (custom - [($_ <>.and .text .any (.tuple (<>.some .any))) + [(all <>.and .text .any (.tuple (<>.some .any))) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (<| (analysis/type.expecting ..Object) @@ -180,7 +180,7 @@ (def: ruby::apply Handler (custom - [($_ <>.and .any (.tuple (<>.some .any))) + [(all <>.and .any (.tuple (<>.some .any))) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (<| (analysis/type.expecting ..Function) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux index da2c2e828..fb119ae7e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux @@ -72,7 +72,7 @@ (def: array::write Handler (custom - [($_ <>.and .any .any .any) + [(all <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -89,7 +89,7 @@ (def: array::delete Handler (custom - [($_ <>.and .any .any) + [(all <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -140,7 +140,7 @@ (def: scheme::apply Handler (custom - [($_ <>.and .any (<>.some .any)) + [(all <>.and .any (<>.some .any)) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.with_type ..Function diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux index 0906183ef..1a30f6bc6 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux @@ -111,14 +111,14 @@ (def: visibility' (.Parser (Modifier field.Field)) - (`` ($_ <>.either - (~~ (template [