From b96beb587c11fcfbce86ce2d62351600cf6cad1b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 2 Jul 2022 05:38:27 -0400 Subject: More traditional names for unquoting macros. --- documentation/bookmark/game/storytelling.md | 2 + .../source/program/licentia/license/addendum.lux | 2 +- licentia/source/program/licentia/output.lux | 16 +- lux-cl/source/program.lux | 10 +- lux-js/source/program.lux | 4 +- lux-lua/source/program.lux | 30 +- lux-mode/lux-mode.el | 4 +- lux-php/source/program.lux | 10 +- lux-python/source/program.lux | 24 +- lux-r/source/program.lux | 10 +- lux-ruby/source/program.lux | 6 +- lux-scheme/source/program.lux | 6 +- stdlib/source/documentation/lux.lux | 30 +- stdlib/source/documentation/lux/abstract.lux | 4 +- .../documentation/lux/abstract/predicate.lux | 42 -- stdlib/source/documentation/lux/control.lux | 5 +- .../documentation/lux/control/concatenative.lux | 8 +- .../source/documentation/lux/control/function.lux | 6 +- .../lux/control/function/predicate.lux | 42 ++ .../documentation/lux/control/parser/analysis.lux | 4 +- .../documentation/lux/control/parser/code.lux | 6 +- .../documentation/lux/control/parser/json.lux | 6 +- .../documentation/lux/control/parser/synthesis.lux | 4 +- .../documentation/lux/control/parser/text.lux | 6 +- .../documentation/lux/control/parser/type.lux | 2 +- .../lux/control/security/capability.lux | 51 +- .../documentation/lux/control/security/policy.lux | 122 ++--- .../documentation/lux/data/collection/array.lux | 5 +- .../documentation/lux/data/collection/bits.lux | 10 +- .../lux/data/collection/dictionary.lux | 9 +- .../lux/data/collection/dictionary/ordered.lux | 7 +- .../documentation/lux/data/collection/list.lux | 9 +- .../lux/data/collection/list/property.lux | 9 +- .../documentation/lux/data/collection/queue.lux | 8 +- .../lux/data/collection/queue/priority.lux | 8 +- .../documentation/lux/data/collection/sequence.lux | 8 +- .../documentation/lux/data/collection/stream.lux | 7 +- stdlib/source/documentation/lux/data/color.lux | 7 +- .../source/documentation/lux/data/color/named.lux | 5 +- .../source/documentation/lux/data/format/json.lux | 2 +- .../documentation/lux/data/text/encoding.lux | 2 +- .../documentation/lux/data/text/unicode/block.lux | 2 +- stdlib/source/documentation/lux/extension.lux | 3 +- stdlib/source/documentation/lux/ffi.jvm.lux | 10 +- stdlib/source/documentation/lux/ffi.old.lux | 2 +- stdlib/source/documentation/lux/macro.lux | 14 +- stdlib/source/documentation/lux/macro/syntax.lux | 2 +- stdlib/source/documentation/lux/math/number.lux | 2 +- .../source/documentation/lux/math/number/frac.lux | 6 +- .../source/documentation/lux/math/number/i64.lux | 4 +- .../source/documentation/lux/math/number/int.lux | 4 +- .../source/documentation/lux/math/number/nat.lux | 4 +- .../source/documentation/lux/math/number/rev.lux | 4 +- stdlib/source/documentation/lux/meta.lux | 10 +- stdlib/source/documentation/lux/meta/type.lux | 167 ++++++ .../source/documentation/lux/meta/type/check.lux | 79 +++ .../source/documentation/lux/meta/type/dynamic.lux | 32 ++ .../documentation/lux/meta/type/implicit.lux | 53 ++ stdlib/source/documentation/lux/meta/type/poly.lux | 26 + .../documentation/lux/meta/type/primitive.lux | 120 +++++ .../documentation/lux/meta/type/quotient.lux | 45 ++ .../documentation/lux/meta/type/refinement.lux | 54 ++ .../documentation/lux/meta/type/resource.lux | 98 ++++ stdlib/source/documentation/lux/meta/type/unit.lux | 89 ++++ .../documentation/lux/meta/type/variance.lux | 25 + stdlib/source/documentation/lux/static.lux | 4 +- stdlib/source/documentation/lux/time.lux | 2 +- stdlib/source/documentation/lux/type.lux | 167 ------ stdlib/source/documentation/lux/type/check.lux | 79 --- stdlib/source/documentation/lux/type/dynamic.lux | 32 -- stdlib/source/documentation/lux/type/implicit.lux | 53 -- stdlib/source/documentation/lux/type/poly.lux | 26 - stdlib/source/documentation/lux/type/primitive.lux | 120 ----- stdlib/source/documentation/lux/type/quotient.lux | 45 -- .../source/documentation/lux/type/refinement.lux | 54 -- stdlib/source/documentation/lux/type/resource.lux | 98 ---- stdlib/source/documentation/lux/type/unit.lux | 89 ---- stdlib/source/documentation/lux/type/variance.lux | 25 - stdlib/source/documentation/lux/world/console.lux | 4 +- stdlib/source/documentation/lux/world/file.lux | 4 +- .../source/documentation/lux/world/file/watch.lux | 8 +- .../documentation/lux/world/net/http/client.lux | 6 +- .../documentation/lux/world/net/http/status.lux | 2 +- .../lux/world/output/video/resolution.lux | 2 +- stdlib/source/documentation/lux/world/shell.lux | 4 +- stdlib/source/format/lux/data/text.lux | 4 +- stdlib/source/library/lux.lux | 328 ++++++------ stdlib/source/library/lux/abstract/comonad.lux | 20 +- stdlib/source/library/lux/abstract/enum.lux | 2 +- stdlib/source/library/lux/abstract/monad.lux | 20 +- .../source/library/lux/abstract/monad/indexed.lux | 28 +- .../source/library/lux/control/concatenative.lux | 26 +- .../library/lux/control/concurrency/async.lux | 2 +- .../library/lux/control/concurrency/atom.lux | 2 +- .../library/lux/control/concurrency/semaphore.lux | 2 +- stdlib/source/library/lux/control/continuation.lux | 2 +- stdlib/source/library/lux/control/exception.lux | 22 +- .../library/lux/control/function/contract.lux | 14 +- .../source/library/lux/control/function/inline.lux | 20 +- .../source/library/lux/control/function/mutual.lux | 72 +-- stdlib/source/library/lux/control/io.lux | 4 +- stdlib/source/library/lux/control/lazy.lux | 2 +- stdlib/source/library/lux/control/maybe.lux | 14 +- stdlib/source/library/lux/control/pipe.lux | 58 +-- stdlib/source/library/lux/control/remember.lux | 6 +- .../library/lux/control/security/capability.lux | 18 +- .../source/library/lux/control/security/policy.lux | 6 +- stdlib/source/library/lux/control/try.lux | 20 +- .../library/lux/data/collection/dictionary.lux | 2 +- .../lux/data/collection/dictionary/ordered.lux | 2 +- stdlib/source/library/lux/data/collection/list.lux | 62 +-- .../library/lux/data/collection/sequence.lux | 8 +- .../source/library/lux/data/collection/stream.lux | 8 +- stdlib/source/library/lux/data/collection/tree.lux | 4 +- .../source/library/lux/data/format/css/class.lux | 2 +- stdlib/source/library/lux/data/format/css/id.lux | 2 +- .../library/lux/data/format/css/property.lux | 4 +- .../source/library/lux/data/format/css/query.lux | 4 +- .../library/lux/data/format/css/selector.lux | 4 +- .../source/library/lux/data/format/css/value.lux | 22 +- stdlib/source/library/lux/data/format/html.lux | 2 +- stdlib/source/library/lux/data/format/json.lux | 14 +- stdlib/source/library/lux/data/format/tar.lux | 12 +- stdlib/source/library/lux/data/text.lux | 6 +- stdlib/source/library/lux/data/text/regex.lux | 114 ++-- stdlib/source/library/lux/debug.lux | 40 +- stdlib/source/library/lux/documentation.lux | 112 ++-- stdlib/source/library/lux/extension.lux | 24 +- stdlib/source/library/lux/ffi.jvm.lux | 578 ++++++++++----------- stdlib/source/library/lux/ffi.lux | 210 ++++---- stdlib/source/library/lux/ffi.old.lux | 210 ++++---- stdlib/source/library/lux/ffi.php.lux | 106 ++-- stdlib/source/library/lux/ffi.scm.lux | 56 +- stdlib/source/library/lux/ffi/export.js.lux | 2 +- stdlib/source/library/lux/ffi/export.jvm.lux | 30 +- stdlib/source/library/lux/ffi/export.lua.lux | 2 +- stdlib/source/library/lux/ffi/export.py.lux | 2 +- stdlib/source/library/lux/ffi/export.rb.lux | 4 +- stdlib/source/library/lux/locale/language.lux | 2 +- stdlib/source/library/lux/locale/territory.lux | 2 +- stdlib/source/library/lux/macro.lux | 8 +- stdlib/source/library/lux/macro/context.lux | 36 +- stdlib/source/library/lux/macro/local.lux | 8 +- stdlib/source/library/lux/macro/pattern.lux | 46 +- stdlib/source/library/lux/macro/syntax.lux | 28 +- stdlib/source/library/lux/macro/syntax/check.lux | 6 +- .../library/lux/macro/syntax/declaration.lux | 2 +- .../source/library/lux/macro/syntax/definition.lux | 14 +- stdlib/source/library/lux/macro/template.lux | 11 +- stdlib/source/library/lux/math.lux | 14 +- stdlib/source/library/lux/math/infix.lux | 4 +- stdlib/source/library/lux/math/modulus.lux | 2 +- stdlib/source/library/lux/math/number/complex.lux | 4 +- stdlib/source/library/lux/math/number/ratio.lux | 4 +- stdlib/source/library/lux/meta.lux | 4 +- stdlib/source/library/lux/meta/location.lux | 14 +- stdlib/source/library/lux/meta/type.lux | 54 +- stdlib/source/library/lux/meta/type/dynamic.lux | 16 +- stdlib/source/library/lux/meta/type/implicit.lux | 20 +- stdlib/source/library/lux/meta/type/poly.lux | 40 +- stdlib/source/library/lux/meta/type/primitive.lux | 26 +- stdlib/source/library/lux/meta/type/quotient.lux | 22 +- stdlib/source/library/lux/meta/type/refinement.lux | 22 +- stdlib/source/library/lux/meta/type/resource.lux | 38 +- stdlib/source/library/lux/meta/type/unit.lux | 10 +- stdlib/source/library/lux/meta/type/unit/scale.lux | 12 +- stdlib/source/library/lux/program.lux | 36 +- stdlib/source/library/lux/static.lux | 14 +- stdlib/source/library/lux/target/common_lisp.lux | 16 +- stdlib/source/library/lux/target/js.lux | 16 +- stdlib/source/library/lux/target/jvm/bytecode.lux | 4 +- .../lux/target/jvm/bytecode/instruction.lux | 2 +- stdlib/source/library/lux/target/jvm/class.lux | 4 +- stdlib/source/library/lux/target/jvm/constant.lux | 4 +- stdlib/source/library/lux/target/jvm/field.lux | 2 +- stdlib/source/library/lux/target/jvm/method.lux | 2 +- stdlib/source/library/lux/target/jvm/modifier.lux | 10 +- .../source/library/lux/target/jvm/reflection.lux | 4 +- stdlib/source/library/lux/target/jvm/type.lux | 4 +- .../library/lux/target/jvm/type/category.lux | 2 +- stdlib/source/library/lux/target/jvm/type/lux.lux | 2 +- .../library/lux/target/jvm/type/reflection.lux | 2 +- stdlib/source/library/lux/target/lua.lux | 8 +- stdlib/source/library/lux/target/php.lux | 8 +- stdlib/source/library/lux/target/python.lux | 8 +- stdlib/source/library/lux/target/r.lux | 8 +- stdlib/source/library/lux/target/ruby.lux | 10 +- stdlib/source/library/lux/target/scheme.lux | 14 +- stdlib/source/library/lux/test.lux | 24 +- stdlib/source/library/lux/time/instant.lux | 2 +- stdlib/source/library/lux/time/year.lux | 2 +- .../lux/tool/compiler/language/lux/analysis.lux | 6 +- .../compiler/language/lux/analysis/inference.lux | 4 +- .../lux/tool/compiler/language/lux/generation.lux | 4 +- .../tool/compiler/language/lux/phase/analysis.lux | 14 +- .../compiler/language/lux/phase/analysis/case.lux | 6 +- .../language/lux/phase/analysis/complex.lux | 2 +- .../language/lux/phase/extension/analysis/jvm.lux | 16 +- .../lux/phase/extension/declaration/jvm.lux | 12 +- .../lux/phase/extension/generation/jvm/host.lux | 6 +- .../lux/phase/generation/common_lisp/runtime.lux | 30 +- .../language/lux/phase/generation/extension.lux | 30 +- .../language/lux/phase/generation/js/runtime.lux | 38 +- .../language/lux/phase/generation/jvm/value.lux | 2 +- .../language/lux/phase/generation/lua/runtime.lux | 38 +- .../language/lux/phase/generation/php/runtime.lux | 40 +- .../lux/phase/generation/python/runtime.lux | 40 +- .../language/lux/phase/generation/r/runtime.lux | 32 +- .../language/lux/phase/generation/ruby/runtime.lux | 52 +- .../lux/phase/generation/scheme/runtime.lux | 32 +- .../lux/tool/compiler/language/lux/syntax.lux | 40 +- .../source/library/lux/tool/compiler/reference.lux | 2 +- stdlib/source/library/lux/world/console.lux | 4 +- stdlib/source/library/lux/world/db/jdbc.lux | 2 +- stdlib/source/library/lux/world/db/jdbc/input.lux | 2 +- stdlib/source/library/lux/world/db/jdbc/output.lux | 2 +- stdlib/source/library/lux/world/db/sql.lux | 2 +- stdlib/source/library/lux/world/environment.lux | 10 +- stdlib/source/library/lux/world/file.lux | 60 +-- stdlib/source/library/lux/world/shell.lux | 8 +- stdlib/source/parser/lux/data/binary.lux | 2 +- stdlib/source/parser/lux/meta/type.lux | 4 +- .../source/polytypic/lux/abstract/equivalence.lux | 98 ++-- stdlib/source/polytypic/lux/abstract/functor.lux | 40 +- stdlib/source/polytypic/lux/data/format/json.lux | 162 +++--- stdlib/source/program/aedifex.lux | 2 +- stdlib/source/program/aedifex/format.lux | 46 +- stdlib/source/program/aedifex/runtime.lux | 4 +- .../specification/compositor/analysis/type.lux | 4 +- .../specification/compositor/generation/case.lux | 2 +- .../specification/compositor/generation/common.lux | 10 +- .../compositor/generation/primitive.lux | 2 +- stdlib/source/test/aedifex/artifact/extension.lux | 2 +- stdlib/source/test/aedifex/command/build.lux | 4 +- .../source/test/aedifex/dependency/resolution.lux | 2 +- stdlib/source/test/aedifex/hash.lux | 6 +- stdlib/source/test/aedifex/runtime.lux | 2 +- stdlib/source/test/lux.lux | 60 +-- stdlib/source/test/lux/control/concatenative.lux | 6 +- stdlib/source/test/lux/control/parser.lux | 8 +- stdlib/source/test/lux/control/remember.lux | 8 +- stdlib/source/test/lux/data/binary.lux | 16 +- stdlib/source/test/lux/data/collection/list.lux | 2 +- .../source/test/lux/data/collection/set/multi.lux | 2 +- .../test/lux/data/collection/set/ordered.lux | 4 +- stdlib/source/test/lux/data/collection/tree.lux | 2 +- stdlib/source/test/lux/data/color.lux | 6 +- stdlib/source/test/lux/data/color/named.lux | 6 +- stdlib/source/test/lux/data/format/json.lux | 6 +- stdlib/source/test/lux/data/format/tar.lux | 6 +- stdlib/source/test/lux/data/format/xml.lux | 4 +- stdlib/source/test/lux/data/text.lux | 12 +- stdlib/source/test/lux/data/text/encoding.lux | 6 +- stdlib/source/test/lux/data/text/escape.lux | 4 +- stdlib/source/test/lux/data/text/regex.lux | 8 +- stdlib/source/test/lux/data/text/unicode/block.lux | 6 +- stdlib/source/test/lux/data/text/unicode/set.lux | 2 +- stdlib/source/test/lux/debug.lux | 16 +- stdlib/source/test/lux/documentation.lux | 10 +- stdlib/source/test/lux/extension.lux | 20 +- stdlib/source/test/lux/ffi.js.lux | 4 +- stdlib/source/test/lux/ffi.jvm.lux | 4 +- stdlib/source/test/lux/ffi.lua.lux | 4 +- stdlib/source/test/lux/ffi.old.lux | 8 +- stdlib/source/test/lux/ffi.py.lux | 4 +- stdlib/source/test/lux/ffi.rb.lux | 4 +- stdlib/source/test/lux/ffi/export.jvm.lux | 22 +- stdlib/source/test/lux/locale/language.lux | 6 +- stdlib/source/test/lux/locale/territory.lux | 6 +- stdlib/source/test/lux/macro.lux | 28 +- stdlib/source/test/lux/macro/local.lux | 7 +- stdlib/source/test/lux/macro/syntax.lux | 2 +- stdlib/source/test/lux/macro/template.lux | 6 +- stdlib/source/test/lux/math.lux | 8 +- stdlib/source/test/lux/math/logic/continuous.lux | 2 +- stdlib/source/test/lux/math/modular.lux | 2 +- stdlib/source/test/lux/math/number.lux | 6 +- stdlib/source/test/lux/math/number/frac.lux | 4 +- stdlib/source/test/lux/math/number/int.lux | 4 +- stdlib/source/test/lux/math/number/nat.lux | 4 +- stdlib/source/test/lux/math/number/ratio.lux | 2 +- stdlib/source/test/lux/math/number/rev.lux | 6 +- stdlib/source/test/lux/meta/code.lux | 8 +- stdlib/source/test/lux/meta/type.lux | 8 +- stdlib/source/test/lux/meta/type/check.lux | 4 +- stdlib/source/test/lux/meta/type/resource.lux | 8 +- stdlib/source/test/lux/meta/type/unit.lux | 4 +- stdlib/source/test/lux/meta/type/unit/scale.lux | 4 +- stdlib/source/test/lux/static.lux | 2 +- stdlib/source/test/lux/target/js.lux | 16 +- stdlib/source/test/lux/target/lua.lux | 10 +- stdlib/source/test/lux/target/python.lux | 40 +- stdlib/source/test/lux/target/ruby.lux | 8 +- stdlib/source/test/lux/time.lux | 2 +- stdlib/source/test/lux/time/duration.lux | 2 +- .../lux/tool/compiler/language/lux/analysis.lux | 6 +- .../compiler/language/lux/analysis/coverage.lux | 6 +- .../compiler/language/lux/analysis/inference.lux | 6 +- .../tool/compiler/language/lux/analysis/module.lux | 18 +- .../compiler/language/lux/analysis/pattern.lux | 2 +- .../tool/compiler/language/lux/phase/analysis.lux | 154 +++--- .../compiler/language/lux/phase/analysis/case.lux | 244 ++++----- .../language/lux/phase/analysis/complex.lux | 2 +- .../language/lux/phase/analysis/function.lux | 10 +- .../language/lux/phase/analysis/simple.lux | 2 +- .../language/lux/phase/extension/analysis/lux.lux | 2 +- .../compiler/language/lux/phase/synthesis/loop.lux | 8 +- .../language/lux/phase/synthesis/primitive.lux | 4 +- .../language/lux/phase/synthesis/variable.lux | 2 +- .../test/lux/tool/compiler/language/lux/syntax.lux | 2 +- .../lux/tool/compiler/language/lux/synthesis.lux | 2 +- .../lux/tool/compiler/meta/archive/registry.lux | 8 +- .../test/lux/tool/compiler/meta/cache/module.lux | 2 +- stdlib/source/test/lux/tool/compiler/meta/cli.lux | 8 +- .../source/test/lux/tool/compiler/meta/context.lux | 2 +- stdlib/source/test/lux/tool/compiler/reference.lux | 2 +- stdlib/source/test/lux/tool/compiler/version.lux | 2 +- stdlib/source/test/lux/world/input/keyboard.lux | 8 +- stdlib/source/test/lux/world/net/http/client.lux | 6 +- stdlib/source/test/lux/world/net/http/status.lux | 6 +- stdlib/source/unsafe/lux/data/binary.lux | 58 +-- stdlib/source/unsafe/lux/data/collection/array.lux | 114 ++-- 322 files changed, 3649 insertions(+), 3698 deletions(-) delete mode 100644 stdlib/source/documentation/lux/abstract/predicate.lux create mode 100644 stdlib/source/documentation/lux/control/function/predicate.lux create mode 100644 stdlib/source/documentation/lux/meta/type.lux create mode 100644 stdlib/source/documentation/lux/meta/type/check.lux create mode 100644 stdlib/source/documentation/lux/meta/type/dynamic.lux create mode 100644 stdlib/source/documentation/lux/meta/type/implicit.lux create mode 100644 stdlib/source/documentation/lux/meta/type/poly.lux create mode 100644 stdlib/source/documentation/lux/meta/type/primitive.lux create mode 100644 stdlib/source/documentation/lux/meta/type/quotient.lux create mode 100644 stdlib/source/documentation/lux/meta/type/refinement.lux create mode 100644 stdlib/source/documentation/lux/meta/type/resource.lux create mode 100644 stdlib/source/documentation/lux/meta/type/unit.lux create mode 100644 stdlib/source/documentation/lux/meta/type/variance.lux delete mode 100644 stdlib/source/documentation/lux/type.lux delete mode 100644 stdlib/source/documentation/lux/type/check.lux delete mode 100644 stdlib/source/documentation/lux/type/dynamic.lux delete mode 100644 stdlib/source/documentation/lux/type/implicit.lux delete mode 100644 stdlib/source/documentation/lux/type/poly.lux delete mode 100644 stdlib/source/documentation/lux/type/primitive.lux delete mode 100644 stdlib/source/documentation/lux/type/quotient.lux delete mode 100644 stdlib/source/documentation/lux/type/refinement.lux delete mode 100644 stdlib/source/documentation/lux/type/resource.lux delete mode 100644 stdlib/source/documentation/lux/type/unit.lux delete mode 100644 stdlib/source/documentation/lux/type/variance.lux diff --git a/documentation/bookmark/game/storytelling.md b/documentation/bookmark/game/storytelling.md index a48a67c64..2bde03394 100644 --- a/documentation/bookmark/game/storytelling.md +++ b/documentation/bookmark/game/storytelling.md @@ -1,5 +1,7 @@ # Reference +0. []() +0. [Approaching a Pedagogy of Game Writing](https://www.youtube.com/watch?v=24HHIKOA1ZA) 0. [I Beg You, Please Cripple Your Characters](https://www.youtube.com/watch?v=DGe6ehr0dxs) 0. [Press Y to Cry: Generating Emotions in Videogame Narrative](https://www.youtube.com/watch?v=_lp0libfp5M) 0. [How James Bond Can Improve Your Dungeons & Dragons Game (Ep. 213)](https://www.youtube.com/watch?v=QRJXiRbXEek) diff --git a/licentia/source/program/licentia/license/addendum.lux b/licentia/source/program/licentia/license/addendum.lux index fb8be25b6..f5dfb922b 100644 --- a/licentia/source/program/licentia/license/addendum.lux +++ b/licentia/source/program/licentia/license/addendum.lux @@ -17,7 +17,7 @@ (def .public (output value) (-> Addendum Text) - (`` (format (~~ (with_template [ <condition> <content>] + (`` (format (,, (with_template [<title> <condition> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) diff --git a/licentia/source/program/licentia/output.lux b/licentia/source/program/licentia/output.lux index 7645b2cb4..0f05937e2 100644 --- a/licentia/source/program/licentia/output.lux +++ b/licentia/source/program/licentia/output.lux @@ -47,7 +47,7 @@ (def .public (grant termination) (-> Termination Text) - (`` (format (~~ (with_template [<title> <content>] + (`` (format (,, (with_template [<title> <content>] [($.block ($.section [#$.title <title> #$.content <content>]))] @@ -69,7 +69,7 @@ (def .public limitation Text - (`` (format (~~ (with_template [<title> <content>] + (`` (format (,, (with_template [<title> <content>] [($.block ($.section [#$.title <title> #$.content <content>]))] @@ -84,7 +84,7 @@ (def .public assurance Text - (`` (format (~~ (with_template [<title> <content>] + (`` (format (,, (with_template [<title> <content>] [($.block ($.section [#$.title <title> #$.content <content>]))] @@ -96,7 +96,7 @@ (def .public (liability value) (-> Liability Text) - (`` (format (~~ (with_template [<title> <condition> <content>] + (`` (format (,, (with_template [<title> <condition> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) @@ -124,7 +124,7 @@ (def .public (distribution distribution) (-> Distribution Text) - (`` (format (~~ (with_template [<title> <condition> <content>] + (`` (format (,, (with_template [<title> <condition> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) @@ -145,7 +145,7 @@ (def .public (commercial value) (-> Commercial Text) - (`` (format (~~ (with_template [<title> <condition> <content>] + (`` (format (,, (with_template [<title> <condition> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) @@ -172,7 +172,7 @@ {.#None} [false ""])] - (`` (format (~~ (with_template [<condition> <title> <content>] + (`` (format (,, (with_template [<condition> <title> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) @@ -214,7 +214,7 @@ (def .public (miscellaneous identified?) (-> Bit Text) - (`` (format (~~ (with_template [<title> <condition> <content>] + (`` (format (,, (with_template [<title> <condition> <content>] [(if <condition> ($.block ($.section [#$.title <title> #$.content <content>])) diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux index ea7d96647..1d145eded 100644 --- a/lux-cl/source/program.lux +++ b/lux-cl/source/program.lux @@ -172,10 +172,10 @@ (let [to_sub (is (-> Any org/armedbear/lisp/LispObject) (function (_ sub_value) (let [sub_value (as java/lang/Object sub_value)] - (`` (<| (~~ (with_template [<type> <then>] + (`` (<| (,, (with_template [<type> <then>] [(case (ffi.is <type> sub_value) {.#Some sub_value} - (`` (|> sub_value (~~ (template.splice <then>)))) + (`` (|> sub_value (,, (template.splice <then>)))) {.#None})] @@ -204,7 +204,7 @@ (as java/lang/Long) java/lang/Number::intValue)) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(org/armedbear/lisp/LispObject [] (<name> self [idx int]) org/armedbear/lisp/LispObject @@ -254,10 +254,10 @@ (def (read host_object) (Reader org/armedbear/lisp/LispObject) - (`` (<| (~~ (with_template [<class> <post_processing>] + (`` (<| (,, (with_template [<class> <post_processing>] [(case (ffi.is <class> host_object) {.#Some host_object} - (`` (|> host_object (~~ (template.splice <post_processing>)))) + (`` (|> host_object (,, (template.splice <post_processing>)))) {.#None})] diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 72e08d9f5..6d13abf41 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -400,7 +400,7 @@ (exception.except ..undefined_has_no_lux_representation []) {.#None}) - (~~ (with_template [<class>] + (,, (with_template [<class>] [(case (ffi.is <class> js_object) {.#Some js_object} {try.#Success js_object} @@ -408,7 +408,7 @@ {.#None})] [java/lang/Boolean] [java/lang/String])) - (~~ (with_template [<class> <method>] + (,, (with_template [<class> <method>] [(case (ffi.is <class> js_object) {.#Some js_object} {try.#Success (<method> js_object)} diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index f904a2416..7b13d2d9d 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -230,7 +230,7 @@ Translator (`` (<| (if (ffi.null? host_object) (exception.except ..nil_has_no_lux_representation [])) - (~~ (with_template [<class> <post_processing>] + (,, (with_template [<class> <post_processing>] [(case (ffi.as <class> host_object) {.#Some typed_object} (|> typed_object <post_processing>) @@ -266,7 +266,7 @@ (def (function/* arity) (-> Nat Code) - (` (.-> (~+ (list.repeated arity (` .Any))) + (` (.-> (,* (list.repeated arity (` .Any))) .Any))) (def input/* @@ -285,7 +285,7 @@ (-> Nat (List Code)) (|>> ..input/* (list#each (function (_ $input) - (list $input (` (..read (~ $input)))))) + (list $input (` (..read (, $input)))))) list#conjoint)) (def (apply/* to_host self parameters abstraction) @@ -299,11 +299,11 @@ (pattern (list)) (in self) - (~~ (with_template [<arity>] - [(pattern (list (~~ (static.literals function.identity (..input/* <arity>))))) - (in (to_host ((as (~~ (static.literal function.identity (..function/* <arity>))) + (,, (with_template [<arity>] + [(pattern (list (,, (static.literals function.identity (..input/* <arity>))))) + (in (to_host ((as (,, (static.literal function.identity (..function/* <arity>))) lux_function) - (~~ (static.literals function.identity (..input/* <arity>))))))] + (,, (static.literals function.identity (..input/* <arity>))))))] [1] [2] @@ -312,10 +312,10 @@ [5] )) - (pattern (list.partial (~~ (static.literals function.identity (..input/* 5))) input/+)) - (again ((as (~~ (static.literal function.identity (..function/* 5))) + (pattern (list.partial (,, (static.literals function.identity (..input/* 5))) input/+)) + (again ((as (,, (static.literal function.identity (..function/* 5))) lux_function) - (~~ (static.literals function.identity (..input/* 5)))) + (,, (static.literals function.identity (..input/* 5)))) input/+) ))))))) @@ -336,16 +336,16 @@ (<| (..return %) self)) - (~~ (with_template [<arity>] + (,, (with_template [<arity>] [(net/sandius/rembulan/runtime/LuaFunction [] (invoke self [% net/sandius/rembulan/runtime/ExecutionContext - (~~ (static.literals function.identity (..declaration/* <arity>)))]) + (,, (static.literals function.identity (..declaration/* <arity>)))]) void "throws" [net/sandius/rembulan/runtime/ResolvedControlThrowable] (<| (..return %) (apply/* to_host (ffi.is net/sandius/rembulan/runtime/LuaFunction self) - (list (~~ (static.literals function.identity (..input/* <arity>)))) + (list (,, (static.literals function.identity (..input/* <arity>)))) lux_function)))] [1] @@ -782,7 +782,7 @@ (with_expansions [<jvm> (these (def (to_host it) (-> Any java/lang/Object) - (`` (<| (~~ (with_template [<jvm> <lua>] + (`` (<| (,, (with_template [<jvm> <lua>] [(case (ffi.as <jvm> (as java/lang/Object it)) {.#Some it} (as java/lang/Object @@ -884,7 +884,7 @@ (`` (program: [service cli.service] (let [context (context.lua (cli.target service))] (do io.monad - [(~~ (for @.old [baggage platform] + [(,, (for @.old [baggage platform] @.jvm [baggage platform] @.lua platform)) ..platform] diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index f3b36dd27..00ed0293f 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -384,8 +384,8 @@ Called by `imenu--generic-function'." (data//implicit (altRE "implicitly" "a/an" "a" "an")) (data//collection (altRE "list" "sequence" "tree")) ;; Code - (code//quotation (altRE "`" "`'" "'" "~" "~\\+" "~!" "~'")) - (code//super-quotation (altRE "``" "~~")) + (code//quotation (altRE "`" "`'" "'" "," ",\\*" ",!" ",'")) + (code//super-quotation (altRE "``" ",,")) (code//template (altRE "with_template" "template")) ;; Miscellaneous (jvm-host (altRE "import" "export" "class" "interface" "object" "do_to" "synchronized" "class_for")) diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index 88ac83d11..64cdb5d4b 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -170,7 +170,7 @@ [(ffi.interface <name> (getValue [] java/lang/Object)) - (`` (ffi.import (~~ (template.symbol ["program/" <name>])) + (`` (ffi.import (,, (template.symbol ["program/" <name>])) "[1]::[0]" (getValue [] java/lang/Object)))] @@ -246,7 +246,7 @@ [] (valueOfIndex self [trace php/runtime/env/TraceInfo index php/runtime/Memory]) php/runtime/Memory - (`` (<| (~~ (with_template [<class> <method> <extractor>] + (`` (<| (,, (with_template [<class> <method> <extractor>] [(case (ffi.as <class> index) {.#Some index} (<method> trace (<extractor> index) self) @@ -379,7 +379,7 @@ (def (read host_object) Reader - (`` (<| (~~ (with_template [<class> <constant>] + (`` (<| (,, (with_template [<class> <constant>] [(case (ffi.as <class> host_object) {.#Some _} {try.#Success <constant>} @@ -389,10 +389,10 @@ [php/runtime/memory/FalseMemory false] [php/runtime/memory/TrueMemory true] )) - (~~ (with_template [<class> <post>] + (,, (with_template [<class> <post>] [(case (ffi.as <class> host_object) {.#Some value} - (`` (|> value (~~ (template.splice <post>)))) + (`` (|> value (,, (template.splice <post>)))) {.#None})] diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux index 029d9d4f0..bafdc790a 100644 --- a/lux-python/source/program.lux +++ b/lux-python/source/program.lux @@ -208,10 +208,10 @@ (def (read host_object) Translator - (`` (<| (~~ (with_template [<class> <processing>] + (`` (<| (,, (with_template [<class> <processing>] [(case (ffi.as <class> (as <class> host_object)) {.#Some host_object} - {try.#Success (`` (|> host_object (~~ (template.spliced <processing>))))} + {try.#Success (`` (|> host_object (,, (template.spliced <processing>))))} _)] @@ -230,7 +230,7 @@ [org/python/core/PyArray [org/python/core/PyArray::getArray]] [[java/lang/Object] [(|>)]] )) - (~~ (with_template [<class> <processing>] + (,, (with_template [<class> <processing>] [(case (ffi.as <class> host_object) {.#Some host_object} (<| <processing> (as org/python/core/PyObject) host_object) @@ -245,7 +245,7 @@ (def (function/? arity) (-> Nat Code) - (` (.-> (~+ (list.repeated arity (` .Any))) .Any))) + (` (.-> (,* (list.repeated arity (` .Any))) .Any))) (def (inputs/? arity) (-> Nat (List Text)) @@ -273,10 +273,10 @@ (pattern (list)) (as org/python/core/PyObject self) - (~~ (with_template [<arity>] - [(pattern (list (~~ (static.literals code.local (inputs/? <arity>))))) - (to_host ((as (~~ (static.literal function.identity (function/? <arity>))) it) - (~~ (static.literals code.local (inputs/? <arity>)))))] + (,, (with_template [<arity>] + [(pattern (list (,, (static.literals code.local (inputs/? <arity>))))) + (to_host ((as (,, (static.literal function.identity (function/? <arity>))) it) + (,, (static.literals code.local (inputs/? <arity>)))))] [1] [2] @@ -287,10 +287,10 @@ [7] [8])) - (pattern (list.partial (~~ (static.literals code.local (inputs/? 8))) + (pattern (list.partial (,, (static.literals code.local (inputs/? 8))) input/+)) - (again ((as (~~ (static.literal function.identity (function/? 8))) it) - (~~ (static.literals code.local (inputs/? 8)))) + (again ((as (,, (static.literal function.identity (function/? 8))) it) + (,, (static.literals code.local (inputs/? 8)))) input/+)))))))))))) (def object_class @@ -337,7 +337,7 @@ (def (to_host it) (-> Any org/python/core/PyObject) - (`` (<| (~~ (with_template [<jvm> <python>] + (`` (<| (,, (with_template [<jvm> <python>] [(case (ffi.as <jvm> (as java/lang/Object it)) {.#Some it} (as org/python/core/PyObject diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux index 7b379d027..376b2a598 100644 --- a/lux-r/source/program.lux +++ b/lux-r/source/program.lux @@ -194,10 +194,10 @@ (let [... to_sub (is (-> Any org/armedbear/lisp/LispObject) ... (function (_ sub_value) ... (let [sub_value (as java/lang/Object sub_value)] - ... (`` (<| (~~ (with_template [<type> <then>] + ... (`` (<| (,, (with_template [<type> <then>] ... [(case (ffi.as <type> sub_value) ... {.#Some sub_value} - ... (`` (|> sub_value (~~ (template.splice <then>)))) + ... (`` (|> sub_value (,, (template.splice <then>)))) ... {.#None})] ... [[java/lang/Object] [host_value]] @@ -262,7 +262,7 @@ ... ("lux io log" (..%%code <call>)) _jvm_this)) - (~~ (with_template [<call> <output>] + (,, (with_template [<call> <output>] [(org/renjin/sexp/ListVector ... org/renjin/sexp/AbstractSEXP ... org/renjin/sexp/SEXP @@ -433,10 +433,10 @@ (..read_tuple read host_object)) {.#None}) - (~~ (with_template [<class> <post_processing>] + (,, (with_template [<class> <post_processing>] [(case (ffi.as <class> host_object) {.#Some host_object} - (`` (|> host_object (~~ (template.splice <post_processing>)))) + (`` (|> host_object (,, (template.splice <post_processing>)))) {.#None})] diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index b145ca59d..932e48f80 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -286,10 +286,10 @@ Translator (`` (<| (if (ffi.null? host_object) (exception.except ..nil_has_no_lux_representation [])) - (~~ (with_template [<class> <post_processing>] + (,, (with_template [<class> <post_processing>] [(case (ffi.as <class> host_object) {.#Some typed_object} - (`` (|> typed_object (~~ (template.spliced <post_processing>)))) + (`` (|> typed_object (,, (template.spliced <post_processing>)))) _)] @@ -326,7 +326,7 @@ (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject) (-> java/lang/Object org/jruby/runtime/builtin/IRubyObject)) (function (again value) - (`` (<| (~~ (with_template [<when> <then>] + (`` (<| (,, (with_template [<when> <then>] [(case (ffi.as <when> value) {.#Some value} (|> value diff --git a/lux-scheme/source/program.lux b/lux-scheme/source/program.lux index 581145301..da6c1a943 100644 --- a/lux-scheme/source/program.lux +++ b/lux-scheme/source/program.lux @@ -163,7 +163,7 @@ [(ffi.interface <name> (getValue [] java/lang/Object)) - (`` (ffi.import (~~ (template.symbol ["program/" <name>])) + (`` (ffi.import (,, (template.symbol ["program/" <name>])) "[1]::[0]" (getValue [] java/lang/Object)))] @@ -301,7 +301,7 @@ (def (read host_object) (Reader java/lang/Object) - (`` (<| (~~ (with_template [<class>] + (`` (<| (,, (with_template [<class>] [(case (ffi.as <class> host_object) {.#Some host_object} {try.#Success host_object} @@ -311,7 +311,7 @@ [java/lang/Boolean] [java/lang/Long] [java/lang/Double] [java/lang/String] [gnu/mapping/Procedure] [gnu/lists/U8Vector] )) - (~~ (with_template [<class> <processing>] + (,, (with_template [<class> <processing>] [(case (ffi.as <class> host_object) {.#Some host_object} {try.#Success (<| <processing> host_object)} diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 0b0e815a7..7be9e1622 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -34,7 +34,6 @@ ["[1][0]" test] ["[1][0]" time] ["[1][0]" tool] ... TODO: Documentation for this - ["[1][0]" type] ["[1][0]" world]]) (.`` (.def .public documentation @@ -235,18 +234,18 @@ ($.documentation /.` (format "Hygienic quasi-quotation as a macro." - \n "Unquote (~) and unquote-splice (~+) must also be used as forms." + \n "Unquote (,) and unquote-splice (,*) must also be used as forms." \n "All unprefixed macros will receive their parent module's prefix if imported; otherwise will receive the prefix of the module on which the quasi-quote is being used.") - [(` (def (~ name) - (function ((~' _) (~+ args)) - (~ body))))]) + [(` (def (, name) + (function ((,' _) (,* args)) + (, body))))]) ($.documentation /.`' (format "Unhygienic quasi-quotation as a macro." - \n "Unquote (~) and unquote-splice (~+) must also be used as forms.") - [(`' (def (~ name) - (function (_ (~+ args)) - (~ body))))]) + \n "Unquote (,) and unquote-splice (,*) must also be used as forms.") + [(`' (def (, name) + (function (_ (,* args)) + (, body))))]) ($.documentation /.' "Quotation as a macro." @@ -430,7 +429,7 @@ (case tokens (^with_template [<tag>] [(pattern (list [_ {<tag> [module name]}])) - (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) + (in (list (` [(, (text$ module)) (, (text$ name))])))]) ([#Symbol]) _ @@ -502,7 +501,7 @@ (is (-> a a Bit) <)))]) - (.~~ (.with_template [<name>] + (.,, (.with_template [<name>] [($.documentation <name> "Safe type-casting for I64 values.")] @@ -655,7 +654,7 @@ ... type ... ))]) - (.~~ (.with_template [<name> <doc>] + (.,, (.with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -846,15 +845,15 @@ ($.documentation /.`` (format "Delimits a controlled (spliced) macro-expansion." - \n "Uses a (~~) special form to specify where to expand.") + \n "Uses a (,,) special form to specify where to expand.") [(`` (some expression - (~~ (some macro which may yield 0 or more results))))]) + (,, (some macro which may yield 0 or more results))))]) ... ($.documentation /.^code ... "Generates pattern-matching code for Code values in a way that looks like code-templating." ... [(is (Maybe Nat) ... (case (` (#0 123 +456.789)) - ... (^code (#0 (~ [_ {.#Nat number}]) +456.789)) + ... (^code (#0 (, [_ {.#Nat number}]) +456.789)) ... {.#Some number} ... _ @@ -908,7 +907,6 @@ /test.documentation /time.documentation /tool.documentation - /type.documentation /world.documentation]))) (program: inputs diff --git a/stdlib/source/documentation/lux/abstract.lux b/stdlib/source/documentation/lux/abstract.lux index 52febba83..9e4d591ec 100644 --- a/stdlib/source/documentation/lux/abstract.lux +++ b/stdlib/source/documentation/lux/abstract.lux @@ -17,8 +17,7 @@ ["[1][0]" interval] ["[1][0]" monad] ["[1][0]" monoid] - ["[1][0]" order] - ["[1][0]" predicate]]) + ["[1][0]" order]]) (.def .public documentation (.List $.Module) @@ -35,5 +34,4 @@ /monad.documentation /monoid.documentation /order.documentation - /predicate.documentation ))) diff --git a/stdlib/source/documentation/lux/abstract/predicate.lux b/stdlib/source/documentation/lux/abstract/predicate.lux deleted file mode 100644 index e8507ce02..000000000 --- a/stdlib/source/documentation/lux/abstract/predicate.lux +++ /dev/null @@ -1,42 +0,0 @@ -(.require - [library - [lux - ["$" documentation] - [data - [text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.union) - ($.default /.intersection) - ($.default /.functor) - - ($.documentation (/.Predicate it) - "A question that can be asked of a value, yield either false (#0) or true (#1).") - - ($.documentation /.none - "A predicate that always fails.") - - ($.documentation /.or - "A predicate that meets either predecessor.") - - ($.documentation /.all - "A predicate that always succeeds.") - - ($.documentation /.and - "A predicate that meets both predecessors.") - - ($.documentation /.complement - "The opposite of a predicate.") - - ($.documentation /.difference - "A predicate that meeds 'base', but not 'sub'.") - - ($.documentation /.rec - "Ties the knot for a recursive predicate.")] - [])) diff --git a/stdlib/source/documentation/lux/control.lux b/stdlib/source/documentation/lux/control.lux index e4bfc0433..94b5981ee 100644 --- a/stdlib/source/documentation/lux/control.lux +++ b/stdlib/source/documentation/lux/control.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]] @@ -25,8 +25,7 @@ ["[1][0]" state] ["[1][0]" thread] ["[1][0]" try] - ["[1][0]" writer] - ]) + ["[1][0]" writer]]) (.def .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/control/concatenative.lux b/stdlib/source/documentation/lux/control/concatenative.lux index 2f553ce34..d300fd7fd 100644 --- a/stdlib/source/documentation/lux/control/concatenative.lux +++ b/stdlib/source/documentation/lux/control/concatenative.lux @@ -41,7 +41,7 @@ [(is (=> [Nat] [Nat]) ((apply 1) ++))]) - (~~ (with_template [<arity>] + (,, (with_template [<arity>] [(with_expansions [<name> (template.symbol [/._] ["apply_" <arity>]) <doc> (template.text ["Lift a function of arity " <arity> " into a concatenative function of arity " <arity> "."])] @@ -82,9 +82,9 @@ ($.documentation /.right "Right-injects the top into sum.") - (~~ (with_template [<input> <word> <func>] - [(`` ($.documentation (~~ (template.symbol [/._] [<word>])) - (~~ (template.text [<func> " for " <input> " arithmetic."]))))] + (,, (with_template [<input> <word> <func>] + [(`` ($.documentation (,, (template.symbol [/._] [<word>])) + (,, (template.text [<func> " for " <input> " arithmetic."]))))] [Nat n/+ n.+] [Nat n/- n.-] diff --git a/stdlib/source/documentation/lux/control/function.lux b/stdlib/source/documentation/lux/control/function.lux index 4d73ff69b..ed276e3f4 100644 --- a/stdlib/source/documentation/lux/control/function.lux +++ b/stdlib/source/documentation/lux/control/function.lux @@ -13,7 +13,8 @@ ["[1][0]" contract] ["[1][0]" memo] ["[1][0]" mixin] - ["[1][0]" mutual]]) + ["[1][0]" mutual] + ["[1][0]" predicate]]) (.def .public documentation (.List $.Module) @@ -48,4 +49,5 @@ [/contract.documentation /memo.documentation /mixin.documentation - /mutual.documentation])) + /mutual.documentation + /predicate.documentation])) diff --git a/stdlib/source/documentation/lux/control/function/predicate.lux b/stdlib/source/documentation/lux/control/function/predicate.lux new file mode 100644 index 000000000..e8507ce02 --- /dev/null +++ b/stdlib/source/documentation/lux/control/function/predicate.lux @@ -0,0 +1,42 @@ +(.require + [library + [lux + ["$" documentation] + [data + [text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.union) + ($.default /.intersection) + ($.default /.functor) + + ($.documentation (/.Predicate it) + "A question that can be asked of a value, yield either false (#0) or true (#1).") + + ($.documentation /.none + "A predicate that always fails.") + + ($.documentation /.or + "A predicate that meets either predecessor.") + + ($.documentation /.all + "A predicate that always succeeds.") + + ($.documentation /.and + "A predicate that meets both predecessors.") + + ($.documentation /.complement + "The opposite of a predicate.") + + ($.documentation /.difference + "A predicate that meeds 'base', but not 'sub'.") + + ($.documentation /.rec + "Ties the knot for a recursive predicate.")] + [])) diff --git a/stdlib/source/documentation/lux/control/parser/analysis.lux b/stdlib/source/documentation/lux/control/parser/analysis.lux index d0f1d3012..14ff24f04 100644 --- a/stdlib/source/documentation/lux/control/parser/analysis.lux +++ b/stdlib/source/documentation/lux/control/parser/analysis.lux @@ -28,9 +28,9 @@ (with_template [<query> <assertion>] [(`` (these (`` (documentation: <query> - (format "Queries for a " (~~ (template.text [<query>])) " value."))) + (format "Queries for a " (,, (template.text [<query>])) " value."))) (`` (documentation: <assertion> - (format "Assert a specific " (~~ (template.text [<query>])) " value.")))))] + (format "Assert a specific " (,, (template.text [<query>])) " value.")))))] [/.bit /.this_bit] [/.nat /.this_nat] diff --git a/stdlib/source/documentation/lux/control/parser/code.lux b/stdlib/source/documentation/lux/control/parser/code.lux index e4b75bce8..0840fd16d 100644 --- a/stdlib/source/documentation/lux/control/parser/code.lux +++ b/stdlib/source/documentation/lux/control/parser/code.lux @@ -18,9 +18,9 @@ (with_template [<query> <check>] [(`` (documentation: <query> - (format "Parses the next " (~~ (template.text [<query>])) " input."))) + (format "Parses the next " (,, (template.text [<query>])) " input."))) (`` (documentation: <check> - (format "Checks for a specific " (~~ (template.text [<query>])) " input.")))] + (format "Checks for a specific " (,, (template.text [<query>])) " input.")))] [/.bit /.this_bit] [/.nat /.this_nat] @@ -46,7 +46,7 @@ (with_template [<name>] [(`` (documentation: <name> - (format "Parses the contents of a " (~~ (template.text [<name>])) ".")))] + (format "Parses the contents of a " (,, (template.text [<name>])) ".")))] [/.form] [/.variant] diff --git a/stdlib/source/documentation/lux/control/parser/json.lux b/stdlib/source/documentation/lux/control/parser/json.lux index af4d3ed00..ed4068800 100644 --- a/stdlib/source/documentation/lux/control/parser/json.lux +++ b/stdlib/source/documentation/lux/control/parser/json.lux @@ -23,7 +23,7 @@ (with_template [<name>] [(`` (documentation: <name> - (format "Reads a JSON value as " (~~ (template.text [<name>])) ".")))] + (format "Reads a JSON value as " (,, (template.text [<name>])) ".")))] [/.null] [/.boolean] @@ -33,9 +33,9 @@ (with_template [<test> <check> <read>] [(`` (documentation: <test> - (format "Asks whether a JSON value is a " (~~ (template.text [<read>])) "."))) + (format "Asks whether a JSON value is a " (,, (template.text [<read>])) "."))) (`` (documentation: <check> - (format "Ensures a JSON value is a " (~~ (template.text [<read>])) ".")))] + (format "Ensures a JSON value is a " (,, (template.text [<read>])) ".")))] [/.boolean? /.this_boolean ..boolean] [/.number? /.this_number ..number] diff --git a/stdlib/source/documentation/lux/control/parser/synthesis.lux b/stdlib/source/documentation/lux/control/parser/synthesis.lux index f0187c4f7..b55bb6061 100644 --- a/stdlib/source/documentation/lux/control/parser/synthesis.lux +++ b/stdlib/source/documentation/lux/control/parser/synthesis.lux @@ -29,9 +29,9 @@ (with_template [<query> <assertion>] [(`` (documentation: <query> - (format "Queries for a " (~~ (template.text [<query>])) " synthesis node."))) + (format "Queries for a " (,, (template.text [<query>])) " synthesis node."))) (`` (documentation: <assertion> - (format "Checks for a specific " (~~ (template.text [<query>])) " synthesis node.")))] + (format "Checks for a specific " (,, (template.text [<query>])) " synthesis node.")))] [/.bit /.this_bit] [/.i64 /.this_i64] diff --git a/stdlib/source/documentation/lux/control/parser/text.lux b/stdlib/source/documentation/lux/control/parser/text.lux index 7e13643b1..4b35bc626 100644 --- a/stdlib/source/documentation/lux/control/parser/text.lux +++ b/stdlib/source/documentation/lux/control/parser/text.lux @@ -35,7 +35,7 @@ (with_template [<name> <caveat>] [(`` (documentation: <name> - (format "Produce a character" (~~ (template.text [<caveat>])) " if the parser fails.")))] + (format "Produce a character" (,, (template.text [<caveat>])) " if the parser fails.")))] [/.not ""] [/.not! " (as a slice)"] @@ -110,9 +110,9 @@ (with_template [<text> <slice>] [(`` (documentation: <text> - (format "Yields " (~~ (template.text [<name>])) " characters as a single continuous text."))) + (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text."))) (`` (documentation: <slice> - (format "Yields " (~~ (template.text [<name>])) " characters as a single continuous text (as a slice).")))] + (format "Yields " (,, (template.text [<name>])) " characters as a single continuous text (as a slice).")))] [/.some /.some!] [/.many /.many!] diff --git a/stdlib/source/documentation/lux/control/parser/type.lux b/stdlib/source/documentation/lux/control/parser/type.lux index 52e9a0fbb..171db7456 100644 --- a/stdlib/source/documentation/lux/control/parser/type.lux +++ b/stdlib/source/documentation/lux/control/parser/type.lux @@ -43,7 +43,7 @@ (with_template [<name>] [(`` (documentation: <name> - (format "Parses the contents of a " (~~ (template.text [<name>])) " type.")))] + (format "Parses the contents of a " (,, (template.text [<name>])) " type.")))] [/.variant] [/.tuple] diff --git a/stdlib/source/documentation/lux/control/security/capability.lux b/stdlib/source/documentation/lux/control/security/capability.lux index ba9e3a80a..920f9c439 100644 --- a/stdlib/source/documentation/lux/control/security/capability.lux +++ b/stdlib/source/documentation/lux/control/security/capability.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,35 +10,30 @@ [\\library ["[0]" /]]) -(documentation: (/.Capability brand input output) - (format "Represents the capability to perform an operation." - \n "This operation is assumed to have security implications.")) - -(documentation: /.use - "Applies a capability against its required input." - [(use capability input)]) - -(documentation: /.capability: - "Defines a capability as a unique type, and a constructor for instances." - [(capability: (Can_Duplicate a) - (can_duplicate a [a a])) - - (let [capability (can_duplicate - (function (_ value) - [value value])) - [left right] (..use capability 123)] - (same? left right))]) - -(documentation: /.async - "Converts a synchronous I/O-based capability into an asynchronous capability." - [(async capability)]) - (.def .public documentation (.List $.Module) ($.module /._ "" - [..Capability - ..use - ..capability: - ..async] + [($.documentation (/.Capability brand input output) + (format "Represents the capability to perform an operation." + \n "This operation is assumed to have security implications.")) + + ($.documentation /.use + "Applies a capability against its required input." + [(use capability input)]) + + ($.documentation /.capability: + "Defines a capability as a unique type, and a constructor for instances." + [(capability: (Can_Duplicate a) + (can_duplicate a [a a])) + + (let [capability (can_duplicate + (function (_ value) + [value value])) + [left right] (..use capability 123)] + (same? left right))]) + + ($.documentation /.async + "Converts a synchronous I/O-based capability into an asynchronous capability." + [(async capability)])] [])) diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux index a2da0b92f..d693c8c50 100644 --- a/stdlib/source/documentation/lux/control/security/policy.lux +++ b/stdlib/source/documentation/lux/control/security/policy.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,81 +10,71 @@ [\\library ["[0]" /]]) -(documentation: (/.Policy brand value %) - "A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.functor) + ($.default /.apply) + ($.default /.monad) + ($.default /.Private) + ($.default /.Can_Conceal) + ($.default /.Can_Reveal) + ($.default /.Safe) + ($.default /.Can_Trust) + ($.default /.Can_Distrust) -(documentation: (/.Can_Upgrade brand % value) - "Represents the capacity to 'upgrade' a value.") + ($.documentation (/.Policy brand value %) + "A security policy encoded as the means to 'upgrade' or 'downgrade' in a secure context.") -(documentation: (/.Can_Downgrade brand % value) - "Represents the capacity to 'downgrade' a value.") + ($.documentation (/.Can_Upgrade brand % value) + "Represents the capacity to 'upgrade' a value.") -(documentation: (/.Privilege brand %) - "Represents the privilege to both 'upgrade' and 'downgrade' a value.") + ($.documentation (/.Can_Downgrade brand % value) + "Represents the capacity to 'downgrade' a value.") -(documentation: (/.Delegation brand %from %to) - "Represents the act of delegating policy capacities.") + ($.documentation (/.Privilege brand %) + "Represents the privilege to both 'upgrade' and 'downgrade' a value.") -(documentation: /.delegation - "Delegating policy capacities." - [(delegation downgrade upgrade)]) + ($.documentation (/.Delegation brand %from %to) + "Represents the act of delegating policy capacities.") -(documentation: (/.Context brand scope %) - "A computational context with an associated policy privilege.") + ($.documentation /.delegation + "Delegating policy capacities." + [(delegation downgrade upgrade)]) -(documentation: /.with_policy - "Activates a security context with the priviledge to enforce it's policy." - [(type Password - (Private Text)) + ($.documentation (/.Context brand scope %) + "A computational context with an associated policy privilege.") - (type (Policy %) - (Interface - (is (-> Text (Password %)) - password) - (is (-> (Password %) Text) - unsafe))) + ($.documentation /.with_policy + "Activates a security context with the priviledge to enforce it's policy." + [(type Password + (Private Text)) - (def (policy _) - (Ex (_ %) (-> Any (Policy %))) - (with_policy - (is (Context Privacy Policy) - (function (_ (open "%::.")) - (implementation - (def (password value) - (%::can_upgrade value)) - (def (unsafe password) - (%::can_downgrade password)))))))] - [(with_policy context)]) + (type (Policy %) + (Interface + (is (-> Text (Password %)) + password) + (is (-> (Password %) Text) + unsafe))) -(documentation: /.Privacy - (format "A security context for privacy." - \n "Private data is data which cannot be allowed to leak outside of the programmed.")) + (def (policy _) + (Ex (_ %) (-> Any (Policy %))) + (with_policy + (is (Context Privacy Policy) + (function (_ (open "%::.")) + (implementation + (def (password value) + (%::can_upgrade value)) + (def (unsafe password) + (%::can_downgrade password)))))))] + [(with_policy context)]) -(documentation: /.Safety - (format "A security context for safety." - \n "Safe data is data coming from outside the program which can be trusted to be properly formatted and lacking injections.")) + ($.documentation /.Privacy + (format "A security context for privacy." + \n "Private data is data which cannot be allowed to leak outside of the programmed.")) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Policy - ..Can_Upgrade - ..Can_Downgrade - ..Privilege - ..Delegation - ..delegation - ..Context - ..with_policy - ..Privacy - ..Safety - ($.default /.functor) - ($.default /.apply) - ($.default /.monad) - ($.default /.Private) - ($.default /.Can_Conceal) - ($.default /.Can_Reveal) - ($.default /.Safe) - ($.default /.Can_Trust) - ($.default /.Can_Distrust)] + ($.documentation /.Safety + (format "A security context for safety." + \n "Safe data is data coming from outside the program which can be trusted to be properly formatted and lacking injections."))] [])) diff --git a/stdlib/source/documentation/lux/data/collection/array.lux b/stdlib/source/documentation/lux/data/collection/array.lux index b6bc74a63..29416d649 100644 --- a/stdlib/source/documentation/lux/data/collection/array.lux +++ b/stdlib/source/documentation/lux/data/collection/array.lux @@ -6,8 +6,9 @@ ["[0]" text (.only \n) ["%" \\format (.only format)]]] [macro - ["[0]" code] - ["[0]" template]]]] + ["[0]" template]] + [meta + ["[0]" code]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/collection/bits.lux b/stdlib/source/documentation/lux/data/collection/bits.lux index 55d0354b0..522f7eccd 100644 --- a/stdlib/source/documentation/lux/data/collection/bits.lux +++ b/stdlib/source/documentation/lux/data/collection/bits.lux @@ -1,13 +1,7 @@ (.require [library - [lux (.except or and not) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + [lux (.except) + ["$" documentation]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/collection/dictionary.lux b/stdlib/source/documentation/lux/data/collection/dictionary.lux index 342d79f15..99f6342b4 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary.lux @@ -1,13 +1,10 @@ (.require [library - [lux (.except has revised) + [lux (.except) ["$" documentation] [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + [text (.only \n) + ["%" \\format (.only format)]]]]] [\\library ["[0]" /]] ["[0]" / diff --git a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux index a946434d6..74381c580 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary/ordered.lux @@ -3,10 +3,9 @@ [lux (.except has revised) ["$" documentation] [data - ["[0]" text (.only \n) + [text ["%" \\format (.only format)]]] [macro - ["[0]" code] ["[0]" template]]]] [\\library ["[0]" /]]) @@ -36,9 +35,9 @@ "" [(key? dict key)]) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(`` ($.documentation <name> - (format "Yields value under the " (~~ (template.text [<name>])) "imum key.")))] + (format "Yields value under the " (,, (template.text [<name>])) "imum key.")))] [/.min] [/.max] diff --git a/stdlib/source/documentation/lux/data/collection/list.lux b/stdlib/source/documentation/lux/data/collection/list.lux index d3fb2c080..60c60b480 100644 --- a/stdlib/source/documentation/lux/data/collection/list.lux +++ b/stdlib/source/documentation/lux/data/collection/list.lux @@ -3,11 +3,8 @@ [lux (.except all) ["$" documentation] [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + [text (.only \n) + ["%" \\format (.only format)]]]]] [\\library ["[0]" /]] ["[0]" / @@ -111,7 +108,7 @@ "" [(member? eq xs x)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/data/collection/list/property.lux b/stdlib/source/documentation/lux/data/collection/list/property.lux index 99e2faf06..b94d44263 100644 --- a/stdlib/source/documentation/lux/data/collection/list/property.lux +++ b/stdlib/source/documentation/lux/data/collection/list/property.lux @@ -1,13 +1,10 @@ (.require [library - [lux (.except has revised) + [lux (.except) ["$" documentation] [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + [text (.only \n) + ["%" \\format (.only format)]]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/collection/queue.lux b/stdlib/source/documentation/lux/data/collection/queue.lux index 963776aa5..935b0dfc3 100644 --- a/stdlib/source/documentation/lux/data/collection/queue.lux +++ b/stdlib/source/documentation/lux/data/collection/queue.lux @@ -1,13 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + ["$" documentation]]] [\\library ["[0]" /]] ["[0]" / diff --git a/stdlib/source/documentation/lux/data/collection/queue/priority.lux b/stdlib/source/documentation/lux/data/collection/queue/priority.lux index 4952a6954..4c6303902 100644 --- a/stdlib/source/documentation/lux/data/collection/queue/priority.lux +++ b/stdlib/source/documentation/lux/data/collection/queue/priority.lux @@ -1,13 +1,7 @@ (.require [library [lux (.except list) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + ["$" documentation]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/collection/sequence.lux b/stdlib/source/documentation/lux/data/collection/sequence.lux index 283eca310..9bc09f736 100644 --- a/stdlib/source/documentation/lux/data/collection/sequence.lux +++ b/stdlib/source/documentation/lux/data/collection/sequence.lux @@ -1,13 +1,7 @@ (.require [library [lux (.except list has revised) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + ["$" documentation]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/collection/stream.lux b/stdlib/source/documentation/lux/data/collection/stream.lux index 5a5021150..393765c2f 100644 --- a/stdlib/source/documentation/lux/data/collection/stream.lux +++ b/stdlib/source/documentation/lux/data/collection/stream.lux @@ -3,11 +3,8 @@ [lux (.except list pattern) ["$" documentation] [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]]]] + [text (.only \n) + ["%" \\format (.only format)]]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux index fade67993..c76cf4c45 100644 --- a/stdlib/source/documentation/lux/data/color.lux +++ b/stdlib/source/documentation/lux/data/color.lux @@ -7,7 +7,8 @@ ["%" \\format (.only format)]]] [macro [syntax (.only syntax)] - ["[0]" template] + ["[0]" template]] + [meta ["[0]" code (.only) ["<[1]>" \\parser]]]]] [\\library @@ -91,10 +92,10 @@ ($.documentation /.Pigment "A color with some degree of transparency.") - (~~ (with_template [<name>] + (,, (with_template [<name>] [(`` ($.documentation <name> (format "A " - (text.replaced "_" "-" (~~ (template.text [<name>]))) + (text.replaced "_" "-" (,, (template.text [<name>]))) " color scheme.")))] [/.triad] diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux index 94f5df07b..f7da245b1 100644 --- a/stdlib/source/documentation/lux/data/color/named.lux +++ b/stdlib/source/documentation/lux/data/color/named.lux @@ -5,9 +5,6 @@ [data ["[0]" text (.only) ["%" \\format (.only format)]]] - [macro - ["[0]" code] - ["[0]" template]] [math [number ["[0]" nat (.use "hex#[0]" hex)]]]]] @@ -19,7 +16,7 @@ (.List $.Module) ($.module /._ "" - [(~~ (with_template [<name>] + [(,, (with_template [<name>] [($.documentation <name> (let [[red green blue] (//.rgb <name>) [_ name] (symbol <name>)] diff --git a/stdlib/source/documentation/lux/data/format/json.lux b/stdlib/source/documentation/lux/data/format/json.lux index 2051ee55c..ccf18365e 100644 --- a/stdlib/source/documentation/lux/data/format/json.lux +++ b/stdlib/source/documentation/lux/data/format/json.lux @@ -55,7 +55,7 @@ "A JSON object field setter." [(has key value json)]) - (~~ (with_template [<name> <desc>] + (,, (with_template [<name> <desc>] [($.documentation <name> (format "A JSON object field getter for " <desc> "."))] diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux index 6a8652b67..42b3ff87e 100644 --- a/stdlib/source/documentation/lux/data/text/encoding.lux +++ b/stdlib/source/documentation/lux/data/text/encoding.lux @@ -21,7 +21,7 @@ ($.documentation /.Encoding "Encoding formats for text.") - (~~ (with_template [<name>] + (,, (with_template [<name>] [($.documentation <name> (format "'" (/.name <name>) "' text encoding. "))] diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux index 0ee609dd9..2021ce0d1 100644 --- a/stdlib/source/documentation/lux/data/text/unicode/block.lux +++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux @@ -35,7 +35,7 @@ "" [(within? block char)]) - (~~ (with_template [<name>] + (,, (with_template [<name>] [($.documentation <name> (let [[_ name] (symbol <name>)] (format (hex#encoded (/.start <name>)) diff --git a/stdlib/source/documentation/lux/extension.lux b/stdlib/source/documentation/lux/extension.lux index 729abbec5..35b5fbd72 100644 --- a/stdlib/source/documentation/lux/extension.lux +++ b/stdlib/source/documentation/lux/extension.lux @@ -9,7 +9,8 @@ [collection ["[0]" sequence]]] [macro - ["[0]" template] + ["[0]" template]] + [meta ["[0]" code ["<[1]>" \\parser]]] [tool diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux index 436c252b6..760a625f0 100644 --- a/stdlib/source/documentation/lux/ffi.jvm.lux +++ b/stdlib/source/documentation/lux/ffi.jvm.lux @@ -22,9 +22,9 @@ ($.default /.cannot_convert_to_jvm_type) ($.default /.cannot_cast_to_non_object) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(`` ($.documentation <name> - (format "The type of a (boxed) " (~~ (template.text [<name>])) " object.")))] + (format "The type of a (boxed) " (,, (template.text [<name>])) " object.")))] [/.Boolean] [/.Byte] @@ -36,9 +36,9 @@ [/.Character] )) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(`` ($.documentation <name> - (format "The type of an (unboxed) " (~~ (template.text [<name>])) " value.")))] + (format "The type of an (unboxed) " (,, (template.text [<name>])) " value.")))] [/.boolean] [/.byte] @@ -50,7 +50,7 @@ [/.char] )) - (~~ (with_template [<name> <from> <to>] + (,, (with_template [<name> <from> <to>] [(`` ($.documentation <name> "Type converter."))] diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux index 460e8512e..ce7eb423e 100644 --- a/stdlib/source/documentation/lux/ffi.old.lux +++ b/stdlib/source/documentation/lux/ffi.old.lux @@ -18,7 +18,7 @@ ($.default /.State) ($.default /.Inheritance) - (~~ (with_template [<name> <from> <to>] + (,, (with_template [<name> <from> <to>] [($.documentation <name> "Type converter.")] diff --git a/stdlib/source/documentation/lux/macro.lux b/stdlib/source/documentation/lux/macro.lux index 7e6c34963..da66da131 100644 --- a/stdlib/source/documentation/lux/macro.lux +++ b/stdlib/source/documentation/lux/macro.lux @@ -8,7 +8,6 @@ [collection ["[0]" list]]]]] ["[0]" / - ["[1][0]" code] ["[1][0]" local] ["[1][0]" syntax] ["[1][0]" template]] @@ -47,11 +46,11 @@ (syntax (_ [lock any body any]) (with_symbols [g!lock g!body g!_] - (in (list (` (let [(~ g!lock) (~ lock) - (~ g!_) ("jvm monitorenter" (~ g!lock)) - (~ g!body) (~ body) - (~ g!_) ("jvm monitorexit" (~ g!lock))] - (~ g!body))))))))]) + (in (list (` (let [(, g!lock) (, lock) + (, g!_) ("jvm monitorenter" (, g!lock)) + (, g!body) (, body) + (, g!_) ("jvm monitorexit" (, g!lock))] + (, g!body))))))))]) ($.documentation /.one_expansion "Works just like expand, except that it ensures that the output is a single Code token." @@ -95,7 +94,6 @@ (def (foo bar baz) (-> Int Int Int) (int.+ bar baz)))])] - [/code.documentation - /local.documentation + [/local.documentation /syntax.documentation /template.documentation])) diff --git a/stdlib/source/documentation/lux/macro/syntax.lux b/stdlib/source/documentation/lux/macro/syntax.lux index fc7675a8c..30dd6b08a 100644 --- a/stdlib/source/documentation/lux/macro/syntax.lux +++ b/stdlib/source/documentation/lux/macro/syntax.lux @@ -39,7 +39,7 @@ (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)))))))))])] + (in (list (` ((, (code.text def_code)))))))))])] [/check.documentation /declaration.documentation /definition.documentation diff --git a/stdlib/source/documentation/lux/math/number.lux b/stdlib/source/documentation/lux/math/number.lux index c63a71371..2420d347a 100644 --- a/stdlib/source/documentation/lux/math/number.lux +++ b/stdlib/source/documentation/lux/math/number.lux @@ -25,7 +25,7 @@ (.List $.Module) ($.module /._ "" - [(~~ (with_template [<name> <encoding> <no_commas> <with_commas>] + [(,, (with_template [<name> <encoding> <no_commas> <with_commas>] [($.documentation <name> (format "Given syntax for a " <encoding> " number, generates a Nat, an Int, a Rev or a Frac.") [<no_commas>] diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux index 9fd4f06ce..8ae35ef2e 100644 --- a/stdlib/source/documentation/lux/math/number/frac.lux +++ b/stdlib/source/documentation/lux/math/number/frac.lux @@ -88,7 +88,7 @@ "Frac(tion) greater-than or equal." [(>= reference sample)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -103,7 +103,7 @@ "" [(/% param subject)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -111,7 +111,7 @@ [/.max "Frac(tion) minimum."] )) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/math/number/i64.lux b/stdlib/source/documentation/lux/math/number/i64.lux index b11806f7d..0a6cef889 100644 --- a/stdlib/source/documentation/lux/math/number/i64.lux +++ b/stdlib/source/documentation/lux/math/number/i64.lux @@ -27,7 +27,7 @@ ($.default /.left_rotated) ($.default /.right_rotated) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -60,7 +60,7 @@ "Count the number of 1s in a bit-map." [(ones it)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/math/number/int.lux b/stdlib/source/documentation/lux/math/number/int.lux index 088f8e87f..70cec4be4 100644 --- a/stdlib/source/documentation/lux/math/number/int.lux +++ b/stdlib/source/documentation/lux/math/number/int.lux @@ -55,7 +55,7 @@ "Int(eger) greater-than or equal." [(>= reference sample)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -63,7 +63,7 @@ [/.max "Int(eger) maximum."] )) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/math/number/nat.lux b/stdlib/source/documentation/lux/math/number/nat.lux index 5bf379bba..62c72b8b8 100644 --- a/stdlib/source/documentation/lux/math/number/nat.lux +++ b/stdlib/source/documentation/lux/math/number/nat.lux @@ -32,7 +32,7 @@ ($.default /.decimal) ($.default /.hash) - (~~ (with_template [<name> <documentation>] + (,, (with_template [<name> <documentation>] [($.documentation <name> <documentation>)] @@ -49,7 +49,7 @@ [/.% "Nat(ural) remainder."] )) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/math/number/rev.lux b/stdlib/source/documentation/lux/math/number/rev.lux index 5450725b8..d93c8e3c5 100644 --- a/stdlib/source/documentation/lux/math/number/rev.lux +++ b/stdlib/source/documentation/lux/math/number/rev.lux @@ -62,7 +62,7 @@ "Rev(olution) greater-than or equal." [(>= reference sample)]) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] @@ -70,7 +70,7 @@ [/.max "Rev(olution) maximum."] )) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux index dfe0b27bd..72315f3d2 100644 --- a/stdlib/source/documentation/lux/meta.lux +++ b/stdlib/source/documentation/lux/meta.lux @@ -10,8 +10,10 @@ [\\library ["[0]" /]] ["[0]" / + ["[1][0]" code] ["[1][0]" location] - ["[1][0]" symbol]]) + ["[1][0]" symbol] + ["[1][0]" type]]) (.def .public documentation (.List $.Module) @@ -162,5 +164,7 @@ ($.documentation /.eval "" [(eval type code)])] - [/location.documentation - /symbol.documentation])) + [/code.documentation + /location.documentation + /symbol.documentation + /type.documentation])) diff --git a/stdlib/source/documentation/lux/meta/type.lux b/stdlib/source/documentation/lux/meta/type.lux new file mode 100644 index 000000000..e4b93f034 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type.lux @@ -0,0 +1,167 @@ +(.require + [library + [lux (.except function as let) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]] + ["[0]" / + ["[1][0]" primitive] + ["[1][0]" check] + ["[1][0]" dynamic] + ["[1][0]" implicit] + ["[1][0]" poly] + ["[1][0]" quotient] + ["[1][0]" refinement] + ["[1][0]" resource] + ["[1][0]" unit] + ["[1][0]" variance]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "Basic functionality for working with types." + [($.default /.equivalence) + + (,, (with_template [<name>] + [($.documentation <name> + "The number of parameters, and the body, of a quantified type.")] + + [/.flat_univ_q] + [/.flat_ex_q] + )) + + ($.documentation /.flat_function + "The input, and the output of a function type." + [(flat_function type)]) + + ($.documentation /.flat_application + "The quantified type, and its parameters, for a type-application." + [(flat_application type)]) + + (,, (with_template [<name>] + [($.documentation <name> + "The members of a composite type.")] + + [/.flat_variant] + [/.flat_tuple] + )) + + ($.documentation /.format + "A (readable) textual representable of a type." + [(format type)]) + + ($.documentation /.applied + "To the extend possible, applies a quantified type to the given parameters." + [(applied params func)]) + + ($.documentation /.code + (%.format "A representation of a type as code." + \n "The code is such that evaluating it would yield the type value.") + [(code type)]) + + ($.documentation /.de_aliased + "A (potentially named) type that does not have its name shadowed by other names." + [(de_aliased type)]) + + ($.documentation /.anonymous + "A type without any names covering it." + [(anonymous type)]) + + (,, (with_template [<name>] + [($.documentation <name> + "A composite type, constituted by the given member types.")] + + [/.variant] + [/.tuple] + )) + + ($.documentation /.function + "A function type, with the given inputs and output." + [(function inputs output)]) + + ($.documentation /.application + "An un-evaluated type application, with the given quantified type, and parameters." + [(application params quant)]) + + (,, (with_template [<name>] + [($.documentation <name> + "A quantified type, with the given number of parameters, and body.")] + + [/.univ_q] + [/.ex_q] + )) + + ($.documentation /.quantified? + "Only yields #1 for universally or existentially quantified types." + [(quantified? type)]) + + ($.documentation /.array + "An array type, with the given level of nesting/depth, and the given element type." + [(array depth element_type)]) + + ($.documentation /.flat_array + "The level of nesting/depth and element type for an array type." + [(flat_array type)]) + + ($.documentation /.array? + "Is a type an array type?") + + ($.documentation /.log! + "Logs to the console/terminal the type of an expression." + [(log! (is Foo (foo expression))) + "=>" + "Expression: (foo expression)" + " Type: Foo" + (foo expression)]) + + ($.documentation /.as + (%.format "Casts a value to a specific type." + \n "The specified type can depend on type variables of the original type of the value." + \n "NOTE: Careless use of type-casts is an easy way to introduce bugs. USE WITH CAUTION.") + [(is (Bar Bit Nat Text) + (as [a b c] + (Foo a [b c]) + (Bar a b c) + (is (Foo Bit [Nat Text]) + (foo expression))))]) + + ($.documentation /.sharing + "Allows specifing the type of an expression as sharing type-variables with the type of another expression." + [(is (Bar Bit Nat Text) + (sharing [a b c] + (is (Foo a [b c]) + (is (Foo Bit [Nat Text]) + (foo expression))) + (is (Bar a b c) + (bar expression))))]) + + ($.documentation /.by_example + "Constructs a type that shares type-variables with an expression of some other type." + [(is Type + (by_example [a b c] + (is (Foo a [b c]) + (is (Foo Bit [Nat Text]) + (foo expression))) + (Bar a b c))) + "=>" + (.type_literal (Bar Bit Nat Text))]) + + ($.documentation /.let + "Local bindings for types." + [(let [side (Either Int Frac)] + (List [side side]))])] + [/primitive.documentation + /check.documentation + /dynamic.documentation + /implicit.documentation + /poly.documentation + /quotient.documentation + /refinement.documentation + /resource.documentation + /unit.documentation + /variance.documentation]))) diff --git a/stdlib/source/documentation/lux/meta/type/check.lux b/stdlib/source/documentation/lux/meta/type/check.lux new file mode 100644 index 000000000..e5a7130cf --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/check.lux @@ -0,0 +1,79 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "Type-checking functionality." + [($.default /.unknown_type_var) + ($.default /.unbound_type_var) + ($.default /.invalid_type_application) + ($.default /.cannot_rebind_var) + ($.default /.type_check_failed) + ($.default /.functor) + ($.default /.apply) + ($.default /.monad) + ($.default /.bound?) + ($.default /.peek) + ($.default /.read) + + ($.documentation /.Var + "The ID for a type-variable in a type-checking context.") + + ($.documentation (/.Check it) + "A type-checking computation which may fail or yield a value.") + + ($.documentation /.result + "" + [(result context proc)]) + + ($.documentation /.failure + "" + [(failure message)]) + + ($.documentation /.assertion + "" + [(assertion message test)]) + + ($.documentation /.except + "" + [(except exception message)]) + + ($.documentation /.existential + "A brand-new existential type.") + + ($.documentation /.bind + (format "Attemmpts to buy a type-variable." + \n "Fails if the variable has been bound already.") + [(bind type id)]) + + ($.documentation /.var + "A brand-new (unbound) type-variable.") + + ($.documentation /.fresh_context + "An empty/un-used type-checking context.") + + ($.documentation /.check + "Type-check to ensure that the 'expected' type subsumes the 'actual' type." + [(check expected actual)]) + + ($.documentation /.subsumes? + "A simple type-checking function that just returns a yes/no answer." + [(subsumes? expected actual)]) + + ($.documentation /.context + "The current state of the type-checking context.") + + ($.documentation /.clean + "Resolves every bound type-variable to yield a new type that is as resolved as possible." + [(clean inputT)])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/dynamic.lux b/stdlib/source/documentation/lux/meta/type/dynamic.lux new file mode 100644 index 000000000..861d7143f --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/dynamic.lux @@ -0,0 +1,32 @@ +(.require + [library + [lux (.except static) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.wrong_type) + ($.default /.format) + + ($.documentation /.Dynamic + "A value coupled with its type, so it can be checked later.") + + ($.documentation /.dynamic + "" + [(is Dynamic + (dynamic 123))]) + + ($.documentation /.static + "" + [(is (try.Try Nat) + (static Nat (dynamic 123)))])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/implicit.lux b/stdlib/source/documentation/lux/meta/type/implicit.lux new file mode 100644 index 000000000..9490d4aee --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/implicit.lux @@ -0,0 +1,53 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.documentation /.a/an + (format "Automatic implementation selection (for type-class style polymorphism)." + \n "This feature layers type-class style polymorphism on top of Lux's signatures and implementations." + \n "When calling a polymorphic function, or using a polymorphic constant," + \n "this macro will check the types of the arguments, and the expected type for the whole expression" + \n "and it will search in the local scope, the module's scope and the imports' scope" + \n "in order to find suitable implementations to satisfy those requirements." + \n "If a single alternative is found, that one will be used automatically." + \n "If no alternative is found, or if more than one alternative is found (ambiguity)" + \n "a compile-time error will be raised, to alert the user." + \n \n "Caveat emptor: You need to make sure to import the module of any implementation you want to use." + \n "Otherwise, this macro will not find it.") + ["Nat equivalence" + (at number.equivalence = x y) + (a/an = x y)] + ["Can optionally add the prefix of the module where the signature was defined." + (a/an equivalence.= x y)] + ["(List Nat) equivalence" + (a/an = + (list.indices 10) + (list.indices 10))] + ["(Functor List) each" + (a/an each ++ (list.indices 10))]) + + ($.documentation /.with + "Establish lexical bindings for implementations that will be prioritized over non-lexically-bound implementations." + [(with [n.addition] + (n.= (at n.addition composite left right) + (a/an composite left right)))]) + + ($.documentation /.implicitly + "Establish local definitions for implementations that will be prioritized over foreign definitions." + [(implicitly n.multiplication) + + (n.= (at n.multiplication composite left right) + (a/an composite left right))])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/poly.lux b/stdlib/source/documentation/lux/meta/type/poly.lux new file mode 100644 index 000000000..979ae2899 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/poly.lux @@ -0,0 +1,26 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [abstract + [\\specification + ["$[0]" equivalence] + ["$[0]" codec]]] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.polytypic) + + ($.documentation /.code + "" + [(code env type)])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/primitive.lux b/stdlib/source/documentation/lux/meta/type/primitive.lux new file mode 100644 index 000000000..d531ffb98 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/primitive.lux @@ -0,0 +1,120 @@ +(.require + [library + [lux (.except) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.documentation /.Frame + "Meta-data about an abstract/nominal type in a stack of them.") + + ($.documentation /.current + "The currently-being-defined abstract/nominal type.") + + ($.documentation /.specific + "A specific abstract/nominal type still being defined somewhere in the scope." + [(specific name)]) + + (,, (with_template [<name> <from> <$> <to>] + [($.documentation <name> + "Type-casting macro for abstract/nominal types." + [(|> value + (is <from>) + <$> + (is <to>))])] + + [/.abstraction Representation abstraction Abstraction] + [/.representation Abstraction representation Representation] + )) + + ($.documentation /.primitive + (format "Define abstract/nominal types which hide their representation details." + \n "You can convert between the abstraction and its representation selectively to access the value, while hiding it from others.") + [(primitive String + Text + + (def (string value) + (-> Text String) + (abstraction value)) + + (def (text value) + (-> String Text) + (representation value)))] + ["Type-parameters are optional." + (primitive (Duplicate a) + [a a] + + (def (duplicate value) + (All (_ a) (-> a (Duplicate a))) + (abstraction [value value])))] + ["Definitions can be nested." + (primitive (Single a) + a + + (def (single value) + (All (_ a) (-> a (Single a))) + (abstraction value)) + + (primitive (Double a) + [a a] + + (def (double value) + (All (_ a) (-> a (Double a))) + (abstraction [value value])) + + (def (single' value) + (All (_ a) (-> a (Single a))) + (abstraction Single [value value])) + + (let [value 0123] + (same? value + (|> value + single' + (representation Single) + double + representation)))))] + ["Type-parameters do not necessarily have to be used in the representation type." + "If they are not used, they become phantom types and can be used to customize types without changing the representation." + (primitive (JavaScript a) + Text + + (primitive Expression Any) + (primitive Statement Any) + + (def (+ x y) + (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression)) + (abstraction + (format "(" (representation x) "+" (representation y) ")"))) + + (def (while test body) + (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement)) + (abstraction + (format "while(" (representation test) ") {" + (representation body) + "}"))))]) + + ($.documentation /.transmutation + "Transmutes an abstract/nominal type's phantom types." + [(primitive (JavaScript a) + Text + + (primitive Expression Any) + (primitive Statement Any) + + (def (statement expression) + (-> (JavaScript Expression) (JavaScript Statement)) + (transmutation expression)) + + (def (statement' expression) + (-> (JavaScript Expression) (JavaScript Statement)) + (transmutation JavaScript expression)))])] + []))) diff --git a/stdlib/source/documentation/lux/meta/type/quotient.lux b/stdlib/source/documentation/lux/meta/type/quotient.lux new file mode 100644 index 000000000..1451674e6 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/quotient.lux @@ -0,0 +1,45 @@ +(.require + [library + [lux (.except) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.class) + ($.default /.value) + ($.default /.label) + ($.default /.equivalence) + + ($.documentation (/.Class value label) + "The class knows how to classify/label values that are meant to be equivalent to one another.") + + ($.documentation (/.Quotient value label) + (format "A quotient value has been labeled with a class." + \n "All equivalent values will belong to the same class." + \n "This means all equivalent values possess the same label.")) + + ($.documentation /.quotient + "" + [(quotient class value)]) + + ($.documentation /.type + "The Quotient type associated with a Class type." + [(def even + (class even?)) + + (def Even + Type + (type even)) + + (is Even + (quotient even 123))])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/refinement.lux b/stdlib/source/documentation/lux/meta/type/refinement.lux new file mode 100644 index 000000000..304b4b266 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/refinement.lux @@ -0,0 +1,54 @@ +(.require + [library + [lux (.except) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.value) + ($.default /.predicate) + + ($.documentation (/.Refined it) + "A refined version of another type, using a predicate to select valid instances.") + + ($.documentation (/.Refiner it) + "A selection mechanism for refined instances of a type.") + + ($.documentation /.refiner + "" + [(refiner predicate)]) + + ($.documentation /.lifted + (format "Yields a function that can work on refined values." + \n "Respects the constraints of the refinement.") + [(lifted transform)]) + + ($.documentation /.only + "" + [(only refiner values)]) + + ($.documentation /.partition + "Separates refined values from the un-refined ones." + [(partition refiner values)]) + + ($.documentation /.type + "The Refined type associated with a Refiner type." + [(def even + (refiner even?)) + + (def Even + Type + (type even)) + + (is (Maybe Even) + (even 123))])] + [])) diff --git a/stdlib/source/documentation/lux/meta/type/resource.lux b/stdlib/source/documentation/lux/meta/type/resource.lux new file mode 100644 index 000000000..b4dcfdd6f --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/resource.lux @@ -0,0 +1,98 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.monad) + ($.default /.index_cannot_be_repeated) + ($.default /.amount_cannot_be_zero) + + ($.documentation (/.Procedure monad input output value) + (format "A computation that takes a sequence of resource access rights as inputs and yields a different sequence as outputs." + \n "A procedure yields a result value." + \n "A procedure can make use of monadic effects.")) + + ($.documentation (/.Linear monad value) + (format "A procedure that is constant with regards to resource access rights." + \n "This means no additional resources will be available after the computation is over." + \n "This also means no previously available resources will have been consumed.")) + + ($.documentation (/.Affine monad permissions value) + "A procedure which expands the number of available resources.") + + ($.documentation (/.Relevant monad permissions value) + "A procedure which reduces the number of available resources.") + + ($.documentation /.run! + "" + [(run! monad procedure)]) + + ($.documentation /.lifted + "" + [(lifted monad procedure)]) + + ($.documentation /.Ordered + "The mode of keys which CANNOT be swapped, and for whom order of release/consumption matters.") + + ($.documentation /.Commutative + "The mode of keys which CAN be swapped, and for whom order of release/consumption DOES NOT matters.") + + ($.documentation (/.Key mode key) + (format "The access right for a resource." + \n "Without the key for a resource existing somewhere among the available ambient rights, one cannot use a resource.")) + + ($.documentation (/.Res key value) + (format "A resource locked by a key." + \n "The 'key' represents the right to access/consume a resource.")) + + (,, (with_template [<name>] + [($.documentation <name> + "Makes a value into a resource and adds the key/access-right to it to the ambient keyring for future use.")] + + [/.ordered] + [/.commutative] + )) + + ($.documentation /.read + "Access the value of a resource, so long as its key is available." + [(read monad resource)]) + + ($.documentation /.exchange + (format "A function that can exchange the keys for resource, so long as they are commutative." + \n "This keys will be placed at the front of the keyring in the order they are specified." + \n "The specific keys must be specified based of their index into the current keyring.") + [(do (monad !) + [res|left (commutative ! pre) + res|right (commutative ! post) + _ ((exchange [1 0]) !) + left (read ! res|left) + right (read ! res|right)] + (in (format left right)))]) + + (,, (with_template [<name>] + [($.documentation <name> + "Group/un-group keys in the keyring into/out-of tuples." + [(do (monad !) + [res|left (commutative ! pre) + res|right (commutative ! post) + _ ((group 2) !) + _ ((un_group 2) !) + right (read ! res|right) + left (read ! res|left)] + (in (format left right)))])] + + [/.group] + [/.un_group] + ))] + []))) diff --git a/stdlib/source/documentation/lux/meta/type/unit.lux b/stdlib/source/documentation/lux/meta/type/unit.lux new file mode 100644 index 000000000..1f2f6918e --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/unit.lux @@ -0,0 +1,89 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]] + [math + [number + ["[0]" ratio]]]]] + [\\library + ["[0]" /]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.Gram) + ($.default /.Meter) + ($.default /.Litre) + ($.default /.Second) + ... ($.default /.pure) + ($.default /.number) + ($.default /.equivalence) + ($.default /.order) + ($.default /.enum) + ... ($.default /.Kilo) + ... ($.default /.Mega) + ... ($.default /.Giga) + ... ($.default /.Milli) + ... ($.default /.Micro) + ... ($.default /.Nano) + ($.default /.+) + ($.default /.-) + ($.default /.*) + ($.default /./) + + ($.documentation (/.Measure unit) + "A quantity with an associated unit of measurement.") + + ($.documentation (/.Unit unit) + "A unit of measurement, to qualify numbers with.") + + ... ($.documentation (/.Scale scale) + ... "A scale of magnitude.") + + ... ($.documentation /.Pure + ... "A pure, unit-less measure.") + + ($.documentation /.unit + (format "Define a unit of measurement." + \n "Both the name of the type, and the name of the Unit implementation must be specified.") + [(def feet (unit []))]) + + ... ($.documentation /.scale + ... "Define a scale of magnitude." + ... [(def bajillion (scale [1 1,234,567,890]))]) + + ... ($.documentation /.re_scaled + ... "" + ... [(re_scaled from to measure)]) + + ... (,, (with_template [<type> <scale>] + ... [(`` ($.documentation <scale> + ... (let [numerator (the [/.ratio ratio.#numerator] <scale>) + ... denominator (the [/.ratio ratio.#denominator] <scale>)] + ... (format "The '" (,, (template.text [<scale>])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))] + + ... [/.Kilo /.kilo] + ... [/.Mega /.mega] + ... [/.Giga /.giga] + + ... [/.Milli /.milli] + ... [/.Micro /.micro] + ... [/.Nano /.nano] + ... )) + + (,, (with_template [<unit>] + [(`` ($.documentation <unit> + (format "The '" (,, (template.text [<unit>])) "' unit of meaurement.")))] + + [/.gram] + [/.meter] + [/.litre] + [/.second] + ))] + []))) diff --git a/stdlib/source/documentation/lux/meta/type/variance.lux b/stdlib/source/documentation/lux/meta/type/variance.lux new file mode 100644 index 000000000..e3b377fea --- /dev/null +++ b/stdlib/source/documentation/lux/meta/type/variance.lux @@ -0,0 +1,25 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.documentation (/.Co it) + "A constraint for covariant types.") + + ($.documentation (/.Contra it) + "A constraint for contravariant types.") + + ($.documentation (/.In it) + "A constraint for invariant types.")] + [])) diff --git a/stdlib/source/documentation/lux/static.lux b/stdlib/source/documentation/lux/static.lux index 08b82e86c..9ae73aae8 100644 --- a/stdlib/source/documentation/lux/static.lux +++ b/stdlib/source/documentation/lux/static.lux @@ -14,7 +14,7 @@ (.List $.Module) ($.module /._ "" - [(~~ (with_template [<name> <type>] + [(,, (with_template [<name> <type>] [($.documentation <name> (%.code (' (<name> (is <type> @@ -35,7 +35,7 @@ (is ??? (value generating expression)))]) - (~~ (with_template [<name> <type>] + (,, (with_template [<name> <type>] [($.documentation <name> (%.code (' (is <type> (<name>)))))] diff --git a/stdlib/source/documentation/lux/time.lux b/stdlib/source/documentation/lux/time.lux index 3041638d5..59f609b05 100644 --- a/stdlib/source/documentation/lux/time.lux +++ b/stdlib/source/documentation/lux/time.lux @@ -31,7 +31,7 @@ ($.default /.enum) ($.default /.parser) - (~~ (with_template [<name> <doc>] + (,, (with_template [<name> <doc>] [($.documentation <name> <doc>)] diff --git a/stdlib/source/documentation/lux/type.lux b/stdlib/source/documentation/lux/type.lux deleted file mode 100644 index a458db5d3..000000000 --- a/stdlib/source/documentation/lux/type.lux +++ /dev/null @@ -1,167 +0,0 @@ -(.require - [library - [lux (.except function as let) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]] - ["[0]" / - ["[1][0]" primitive] - ["[1][0]" check] - ["[1][0]" dynamic] - ["[1][0]" implicit] - ["[1][0]" poly] - ["[1][0]" quotient] - ["[1][0]" refinement] - ["[1][0]" resource] - ["[1][0]" unit] - ["[1][0]" variance]]) - -(`` (.def .public documentation - (.List $.Module) - ($.module /._ - "Basic functionality for working with types." - [($.default /.equivalence) - - (~~ (with_template [<name>] - [($.documentation <name> - "The number of parameters, and the body, of a quantified type.")] - - [/.flat_univ_q] - [/.flat_ex_q] - )) - - ($.documentation /.flat_function - "The input, and the output of a function type." - [(flat_function type)]) - - ($.documentation /.flat_application - "The quantified type, and its parameters, for a type-application." - [(flat_application type)]) - - (~~ (with_template [<name>] - [($.documentation <name> - "The members of a composite type.")] - - [/.flat_variant] - [/.flat_tuple] - )) - - ($.documentation /.format - "A (readable) textual representable of a type." - [(format type)]) - - ($.documentation /.applied - "To the extend possible, applies a quantified type to the given parameters." - [(applied params func)]) - - ($.documentation /.code - (%.format "A representation of a type as code." - \n "The code is such that evaluating it would yield the type value.") - [(code type)]) - - ($.documentation /.de_aliased - "A (potentially named) type that does not have its name shadowed by other names." - [(de_aliased type)]) - - ($.documentation /.anonymous - "A type without any names covering it." - [(anonymous type)]) - - (~~ (with_template [<name>] - [($.documentation <name> - "A composite type, constituted by the given member types.")] - - [/.variant] - [/.tuple] - )) - - ($.documentation /.function - "A function type, with the given inputs and output." - [(function inputs output)]) - - ($.documentation /.application - "An un-evaluated type application, with the given quantified type, and parameters." - [(application params quant)]) - - (~~ (with_template [<name>] - [($.documentation <name> - "A quantified type, with the given number of parameters, and body.")] - - [/.univ_q] - [/.ex_q] - )) - - ($.documentation /.quantified? - "Only yields #1 for universally or existentially quantified types." - [(quantified? type)]) - - ($.documentation /.array - "An array type, with the given level of nesting/depth, and the given element type." - [(array depth element_type)]) - - ($.documentation /.flat_array - "The level of nesting/depth and element type for an array type." - [(flat_array type)]) - - ($.documentation /.array? - "Is a type an array type?") - - ($.documentation /.log! - "Logs to the console/terminal the type of an expression." - [(log! (is Foo (foo expression))) - "=>" - "Expression: (foo expression)" - " Type: Foo" - (foo expression)]) - - ($.documentation /.as - (%.format "Casts a value to a specific type." - \n "The specified type can depend on type variables of the original type of the value." - \n "NOTE: Careless use of type-casts is an easy way to introduce bugs. USE WITH CAUTION.") - [(is (Bar Bit Nat Text) - (as [a b c] - (Foo a [b c]) - (Bar a b c) - (is (Foo Bit [Nat Text]) - (foo expression))))]) - - ($.documentation /.sharing - "Allows specifing the type of an expression as sharing type-variables with the type of another expression." - [(is (Bar Bit Nat Text) - (sharing [a b c] - (is (Foo a [b c]) - (is (Foo Bit [Nat Text]) - (foo expression))) - (is (Bar a b c) - (bar expression))))]) - - ($.documentation /.by_example - "Constructs a type that shares type-variables with an expression of some other type." - [(is Type - (by_example [a b c] - (is (Foo a [b c]) - (is (Foo Bit [Nat Text]) - (foo expression))) - (Bar a b c))) - "=>" - (.type_literal (Bar Bit Nat Text))]) - - ($.documentation /.let - "Local bindings for types." - [(let [side (Either Int Frac)] - (List [side side]))])] - [/primitive.documentation - /check.documentation - /dynamic.documentation - /implicit.documentation - /poly.documentation - /quotient.documentation - /refinement.documentation - /resource.documentation - /unit.documentation - /variance.documentation]))) diff --git a/stdlib/source/documentation/lux/type/check.lux b/stdlib/source/documentation/lux/type/check.lux deleted file mode 100644 index e5a7130cf..000000000 --- a/stdlib/source/documentation/lux/type/check.lux +++ /dev/null @@ -1,79 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "Type-checking functionality." - [($.default /.unknown_type_var) - ($.default /.unbound_type_var) - ($.default /.invalid_type_application) - ($.default /.cannot_rebind_var) - ($.default /.type_check_failed) - ($.default /.functor) - ($.default /.apply) - ($.default /.monad) - ($.default /.bound?) - ($.default /.peek) - ($.default /.read) - - ($.documentation /.Var - "The ID for a type-variable in a type-checking context.") - - ($.documentation (/.Check it) - "A type-checking computation which may fail or yield a value.") - - ($.documentation /.result - "" - [(result context proc)]) - - ($.documentation /.failure - "" - [(failure message)]) - - ($.documentation /.assertion - "" - [(assertion message test)]) - - ($.documentation /.except - "" - [(except exception message)]) - - ($.documentation /.existential - "A brand-new existential type.") - - ($.documentation /.bind - (format "Attemmpts to buy a type-variable." - \n "Fails if the variable has been bound already.") - [(bind type id)]) - - ($.documentation /.var - "A brand-new (unbound) type-variable.") - - ($.documentation /.fresh_context - "An empty/un-used type-checking context.") - - ($.documentation /.check - "Type-check to ensure that the 'expected' type subsumes the 'actual' type." - [(check expected actual)]) - - ($.documentation /.subsumes? - "A simple type-checking function that just returns a yes/no answer." - [(subsumes? expected actual)]) - - ($.documentation /.context - "The current state of the type-checking context.") - - ($.documentation /.clean - "Resolves every bound type-variable to yield a new type that is as resolved as possible." - [(clean inputT)])] - [])) diff --git a/stdlib/source/documentation/lux/type/dynamic.lux b/stdlib/source/documentation/lux/type/dynamic.lux deleted file mode 100644 index 861d7143f..000000000 --- a/stdlib/source/documentation/lux/type/dynamic.lux +++ /dev/null @@ -1,32 +0,0 @@ -(.require - [library - [lux (.except static) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.wrong_type) - ($.default /.format) - - ($.documentation /.Dynamic - "A value coupled with its type, so it can be checked later.") - - ($.documentation /.dynamic - "" - [(is Dynamic - (dynamic 123))]) - - ($.documentation /.static - "" - [(is (try.Try Nat) - (static Nat (dynamic 123)))])] - [])) diff --git a/stdlib/source/documentation/lux/type/implicit.lux b/stdlib/source/documentation/lux/type/implicit.lux deleted file mode 100644 index 9490d4aee..000000000 --- a/stdlib/source/documentation/lux/type/implicit.lux +++ /dev/null @@ -1,53 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.documentation /.a/an - (format "Automatic implementation selection (for type-class style polymorphism)." - \n "This feature layers type-class style polymorphism on top of Lux's signatures and implementations." - \n "When calling a polymorphic function, or using a polymorphic constant," - \n "this macro will check the types of the arguments, and the expected type for the whole expression" - \n "and it will search in the local scope, the module's scope and the imports' scope" - \n "in order to find suitable implementations to satisfy those requirements." - \n "If a single alternative is found, that one will be used automatically." - \n "If no alternative is found, or if more than one alternative is found (ambiguity)" - \n "a compile-time error will be raised, to alert the user." - \n \n "Caveat emptor: You need to make sure to import the module of any implementation you want to use." - \n "Otherwise, this macro will not find it.") - ["Nat equivalence" - (at number.equivalence = x y) - (a/an = x y)] - ["Can optionally add the prefix of the module where the signature was defined." - (a/an equivalence.= x y)] - ["(List Nat) equivalence" - (a/an = - (list.indices 10) - (list.indices 10))] - ["(Functor List) each" - (a/an each ++ (list.indices 10))]) - - ($.documentation /.with - "Establish lexical bindings for implementations that will be prioritized over non-lexically-bound implementations." - [(with [n.addition] - (n.= (at n.addition composite left right) - (a/an composite left right)))]) - - ($.documentation /.implicitly - "Establish local definitions for implementations that will be prioritized over foreign definitions." - [(implicitly n.multiplication) - - (n.= (at n.multiplication composite left right) - (a/an composite left right))])] - [])) diff --git a/stdlib/source/documentation/lux/type/poly.lux b/stdlib/source/documentation/lux/type/poly.lux deleted file mode 100644 index 979ae2899..000000000 --- a/stdlib/source/documentation/lux/type/poly.lux +++ /dev/null @@ -1,26 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [abstract - [\\specification - ["$[0]" equivalence] - ["$[0]" codec]]] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.polytypic) - - ($.documentation /.code - "" - [(code env type)])] - [])) diff --git a/stdlib/source/documentation/lux/type/primitive.lux b/stdlib/source/documentation/lux/type/primitive.lux deleted file mode 100644 index a015098b7..000000000 --- a/stdlib/source/documentation/lux/type/primitive.lux +++ /dev/null @@ -1,120 +0,0 @@ -(.require - [library - [lux (.except) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(`` (.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.documentation /.Frame - "Meta-data about an abstract/nominal type in a stack of them.") - - ($.documentation /.current - "The currently-being-defined abstract/nominal type.") - - ($.documentation /.specific - "A specific abstract/nominal type still being defined somewhere in the scope." - [(specific name)]) - - (~~ (with_template [<name> <from> <$> <to>] - [($.documentation <name> - "Type-casting macro for abstract/nominal types." - [(|> value - (is <from>) - <$> - (is <to>))])] - - [/.abstraction Representation abstraction Abstraction] - [/.representation Abstraction representation Representation] - )) - - ($.documentation /.primitive - (format "Define abstract/nominal types which hide their representation details." - \n "You can convert between the abstraction and its representation selectively to access the value, while hiding it from others.") - [(primitive String - Text - - (def (string value) - (-> Text String) - (abstraction value)) - - (def (text value) - (-> String Text) - (representation value)))] - ["Type-parameters are optional." - (primitive (Duplicate a) - [a a] - - (def (duplicate value) - (All (_ a) (-> a (Duplicate a))) - (abstraction [value value])))] - ["Definitions can be nested." - (primitive (Single a) - a - - (def (single value) - (All (_ a) (-> a (Single a))) - (abstraction value)) - - (primitive (Double a) - [a a] - - (def (double value) - (All (_ a) (-> a (Double a))) - (abstraction [value value])) - - (def (single' value) - (All (_ a) (-> a (Single a))) - (abstraction Single [value value])) - - (let [value 0123] - (same? value - (|> value - single' - (representation Single) - double - representation)))))] - ["Type-parameters do not necessarily have to be used in the representation type." - "If they are not used, they become phantom types and can be used to customize types without changing the representation." - (primitive (JavaScript a) - Text - - (primitive Expression Any) - (primitive Statement Any) - - (def (+ x y) - (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression)) - (abstraction - (format "(" (representation x) "+" (representation y) ")"))) - - (def (while test body) - (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement)) - (abstraction - (format "while(" (representation test) ") {" - (representation body) - "}"))))]) - - ($.documentation /.transmutation - "Transmutes an abstract/nominal type's phantom types." - [(primitive (JavaScript a) - Text - - (primitive Expression Any) - (primitive Statement Any) - - (def (statement expression) - (-> (JavaScript Expression) (JavaScript Statement)) - (transmutation expression)) - - (def (statement' expression) - (-> (JavaScript Expression) (JavaScript Statement)) - (transmutation JavaScript expression)))])] - []))) diff --git a/stdlib/source/documentation/lux/type/quotient.lux b/stdlib/source/documentation/lux/type/quotient.lux deleted file mode 100644 index 1451674e6..000000000 --- a/stdlib/source/documentation/lux/type/quotient.lux +++ /dev/null @@ -1,45 +0,0 @@ -(.require - [library - [lux (.except) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.class) - ($.default /.value) - ($.default /.label) - ($.default /.equivalence) - - ($.documentation (/.Class value label) - "The class knows how to classify/label values that are meant to be equivalent to one another.") - - ($.documentation (/.Quotient value label) - (format "A quotient value has been labeled with a class." - \n "All equivalent values will belong to the same class." - \n "This means all equivalent values possess the same label.")) - - ($.documentation /.quotient - "" - [(quotient class value)]) - - ($.documentation /.type - "The Quotient type associated with a Class type." - [(def even - (class even?)) - - (def Even - Type - (type even)) - - (is Even - (quotient even 123))])] - [])) diff --git a/stdlib/source/documentation/lux/type/refinement.lux b/stdlib/source/documentation/lux/type/refinement.lux deleted file mode 100644 index 304b4b266..000000000 --- a/stdlib/source/documentation/lux/type/refinement.lux +++ /dev/null @@ -1,54 +0,0 @@ -(.require - [library - [lux (.except) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.value) - ($.default /.predicate) - - ($.documentation (/.Refined it) - "A refined version of another type, using a predicate to select valid instances.") - - ($.documentation (/.Refiner it) - "A selection mechanism for refined instances of a type.") - - ($.documentation /.refiner - "" - [(refiner predicate)]) - - ($.documentation /.lifted - (format "Yields a function that can work on refined values." - \n "Respects the constraints of the refinement.") - [(lifted transform)]) - - ($.documentation /.only - "" - [(only refiner values)]) - - ($.documentation /.partition - "Separates refined values from the un-refined ones." - [(partition refiner values)]) - - ($.documentation /.type - "The Refined type associated with a Refiner type." - [(def even - (refiner even?)) - - (def Even - Type - (type even)) - - (is (Maybe Even) - (even 123))])] - [])) diff --git a/stdlib/source/documentation/lux/type/resource.lux b/stdlib/source/documentation/lux/type/resource.lux deleted file mode 100644 index fa673174a..000000000 --- a/stdlib/source/documentation/lux/type/resource.lux +++ /dev/null @@ -1,98 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(`` (.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.monad) - ($.default /.index_cannot_be_repeated) - ($.default /.amount_cannot_be_zero) - - ($.documentation (/.Procedure monad input output value) - (format "A computation that takes a sequence of resource access rights as inputs and yields a different sequence as outputs." - \n "A procedure yields a result value." - \n "A procedure can make use of monadic effects.")) - - ($.documentation (/.Linear monad value) - (format "A procedure that is constant with regards to resource access rights." - \n "This means no additional resources will be available after the computation is over." - \n "This also means no previously available resources will have been consumed.")) - - ($.documentation (/.Affine monad permissions value) - "A procedure which expands the number of available resources.") - - ($.documentation (/.Relevant monad permissions value) - "A procedure which reduces the number of available resources.") - - ($.documentation /.run! - "" - [(run! monad procedure)]) - - ($.documentation /.lifted - "" - [(lifted monad procedure)]) - - ($.documentation /.Ordered - "The mode of keys which CANNOT be swapped, and for whom order of release/consumption matters.") - - ($.documentation /.Commutative - "The mode of keys which CAN be swapped, and for whom order of release/consumption DOES NOT matters.") - - ($.documentation (/.Key mode key) - (format "The access right for a resource." - \n "Without the key for a resource existing somewhere among the available ambient rights, one cannot use a resource.")) - - ($.documentation (/.Res key value) - (format "A resource locked by a key." - \n "The 'key' represents the right to access/consume a resource.")) - - (~~ (with_template [<name>] - [($.documentation <name> - "Makes a value into a resource and adds the key/access-right to it to the ambient keyring for future use.")] - - [/.ordered] - [/.commutative] - )) - - ($.documentation /.read - "Access the value of a resource, so long as its key is available." - [(read monad resource)]) - - ($.documentation /.exchange - (format "A function that can exchange the keys for resource, so long as they are commutative." - \n "This keys will be placed at the front of the keyring in the order they are specified." - \n "The specific keys must be specified based of their index into the current keyring.") - [(do (monad !) - [res|left (commutative ! pre) - res|right (commutative ! post) - _ ((exchange [1 0]) !) - left (read ! res|left) - right (read ! res|right)] - (in (format left right)))]) - - (~~ (with_template [<name>] - [($.documentation <name> - "Group/un-group keys in the keyring into/out-of tuples." - [(do (monad !) - [res|left (commutative ! pre) - res|right (commutative ! post) - _ ((group 2) !) - _ ((un_group 2) !) - right (read ! res|right) - left (read ! res|left)] - (in (format left right)))])] - - [/.group] - [/.un_group] - ))] - []))) diff --git a/stdlib/source/documentation/lux/type/unit.lux b/stdlib/source/documentation/lux/type/unit.lux deleted file mode 100644 index c7f4948ab..000000000 --- a/stdlib/source/documentation/lux/type/unit.lux +++ /dev/null @@ -1,89 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]] - [math - [number - ["[0]" ratio]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.Gram) - ($.default /.Meter) - ($.default /.Litre) - ($.default /.Second) - ($.default /.pure) - ($.default /.number) - ($.default /.equivalence) - ($.default /.order) - ($.default /.enum) - ($.default /.Kilo) - ($.default /.Mega) - ($.default /.Giga) - ($.default /.Milli) - ($.default /.Micro) - ($.default /.Nano) - ($.default /.+) - ($.default /.-) - ($.default /.*) - ($.default /./) - - ($.documentation (/.Measure unit) - "A quantity with an associated unit of measurement.") - - ($.documentation (/.Unit unit) - "A unit of measurement, to qualify numbers with.") - - ($.documentation (/.Scale scale) - "A scale of magnitude.") - - ($.documentation /.Pure - "A pure, unit-less measure.") - - ($.documentation /.unit - (format "Define a unit of measurement." - \n "Both the name of the type, and the name of the Unit implementation must be specified.") - [(def feet (unit []))]) - - ($.documentation /.scale - "Define a scale of magnitude." - [(def bajillion (scale [1 1,234,567,890]))]) - - ($.documentation /.re_scaled - "" - [(re_scaled from to measure)]) - - (~~ (with_template [<type> <scale>] - [(`` ($.documentation <scale> - (let [numerator (the [/.ratio ratio.#numerator] <scale>) - denominator (the [/.ratio ratio.#denominator] <scale>)] - (format "The '" (~~ (template.text [<scale>])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))] - - [/.Kilo /.kilo] - [/.Mega /.mega] - [/.Giga /.giga] - - [/.Milli /.milli] - [/.Micro /.micro] - [/.Nano /.nano] - )) - - (~~ (with_template [<unit>] - [(`` ($.documentation <unit> - (format "The '" (~~ (template.text [<unit>])) "' unit of meaurement.")))] - - [/.gram] - [/.meter] - [/.litre] - [/.second] - ))] - [])) diff --git a/stdlib/source/documentation/lux/type/variance.lux b/stdlib/source/documentation/lux/type/variance.lux deleted file mode 100644 index e3b377fea..000000000 --- a/stdlib/source/documentation/lux/type/variance.lux +++ /dev/null @@ -1,25 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.documentation (/.Co it) - "A constraint for covariant types.") - - ($.documentation (/.Contra it) - "A constraint for contravariant types.") - - ($.documentation (/.In it) - "A constraint for invariant types.")] - [])) diff --git a/stdlib/source/documentation/lux/world/console.lux b/stdlib/source/documentation/lux/world/console.lux index 44376fa63..f20cac8ef 100644 --- a/stdlib/source/documentation/lux/world/console.lux +++ b/stdlib/source/documentation/lux/world/console.lux @@ -16,10 +16,10 @@ (`` (`` ($.module /._ "" [($.default /.async) - (~~ (for @.jvm (~~ (these ($.default /.cannot_open) + (,, (for @.jvm (,, (these ($.default /.cannot_open) ($.default /.cannot_close) ($.default /.default))) - (~~ (these)))) + (,, (these)))) ($.documentation (/.Console !) "An interface to console/terminal I/O.") diff --git a/stdlib/source/documentation/lux/world/file.lux b/stdlib/source/documentation/lux/world/file.lux index 3ae7449e6..1e99499e9 100644 --- a/stdlib/source/documentation/lux/world/file.lux +++ b/stdlib/source/documentation/lux/world/file.lux @@ -23,8 +23,8 @@ ($.default /.cannot_delete) ($.default /.cannot_make_directory) ($.default /.cannot_find_directory) - (~~ (for @.lua (~~ (these)) - (~~ (these ($.default /.default))))) + (,, (for @.lua (,, (these)) + (,, (these ($.default /.default))))) ($.documentation /.Path "A path to a file or a directory in a file-system.") diff --git a/stdlib/source/documentation/lux/world/file/watch.lux b/stdlib/source/documentation/lux/world/file/watch.lux index c4c3f371c..cc7dbdea9 100644 --- a/stdlib/source/documentation/lux/world/file/watch.lux +++ b/stdlib/source/documentation/lux/world/file/watch.lux @@ -28,9 +28,9 @@ ($.documentation /.Concern "A particular concern to watch-out for.") - ($.documentation /.also + ($.documentation /.and "" - [(also left right)]) + [(and left right)]) ($.documentation (/.Watcher !) "Machinery for watching a file-system for changes to files and directories.") @@ -45,7 +45,7 @@ \n "Must be given a path separator for the file-system.") [(mock separator)]) - (~~ (for @.jvm (~~ (these ($.documentation /.default + (,, (for @.jvm (,, (these ($.documentation /.default "The default watcher for the default file-system."))) - (~~ (these))))] + (,, (these))))] [])))) diff --git a/stdlib/source/documentation/lux/world/net/http/client.lux b/stdlib/source/documentation/lux/world/net/http/client.lux index c0a113a36..fb6e83727 100644 --- a/stdlib/source/documentation/lux/world/net/http/client.lux +++ b/stdlib/source/documentation/lux/world/net/http/client.lux @@ -17,13 +17,13 @@ "" [($.default /.async) ($.default /.headers) - (~~ (for @.jvm (~~ (these ($.default /.default))) - (~~ (these)))) + (,, (for @.jvm (,, (these ($.default /.default))) + (,, (these)))) ($.documentation (/.Client !) "A HTTP client capable of issuing requests to a HTTP server.") - (~~ (with_template [<name>] + (,, (with_template [<name>] [($.documentation <name> (format "A " (text.upper_cased (template.text [<name>])) " request."))] diff --git a/stdlib/source/documentation/lux/world/net/http/status.lux b/stdlib/source/documentation/lux/world/net/http/status.lux index 3d34f709a..81003a4b0 100644 --- a/stdlib/source/documentation/lux/world/net/http/status.lux +++ b/stdlib/source/documentation/lux/world/net/http/status.lux @@ -14,7 +14,7 @@ (.List $.Module) ($.module /._ "" - [(~~ (with_template [<name>] + [(,, (with_template [<name>] [($.documentation <name> (|> (template.text [<name>]) (text.replaced "_" " ") diff --git a/stdlib/source/documentation/lux/world/output/video/resolution.lux b/stdlib/source/documentation/lux/world/output/video/resolution.lux index 6efada0de..a0b2e9aaa 100644 --- a/stdlib/source/documentation/lux/world/output/video/resolution.lux +++ b/stdlib/source/documentation/lux/world/output/video/resolution.lux @@ -20,7 +20,7 @@ ($.documentation /.Resolution "A screen resolution.") - (~~ (with_template [<name>] + (,, (with_template [<name>] [($.documentation <name> (let [name (|> (template.text [<name>]) (text.replaced "_" " ") diff --git a/stdlib/source/documentation/lux/world/shell.lux b/stdlib/source/documentation/lux/world/shell.lux index d6ae9df5f..4ff4e37c0 100644 --- a/stdlib/source/documentation/lux/world/shell.lux +++ b/stdlib/source/documentation/lux/world/shell.lux @@ -18,9 +18,9 @@ [($.default /.normal) ($.default /.error) ($.default /.async) - (~~ (for @.jvm (~~ (these ($.default /.no_more_output) + (,, (for @.jvm (,, (these ($.default /.no_more_output) ($.default /.default))) - (~~ (these)))) + (,, (these)))) ($.documentation /.Exit "A program exit code.") diff --git a/stdlib/source/format/lux/data/text.lux b/stdlib/source/format/lux/data/text.lux index 6dda0729b..531bd282b 100644 --- a/stdlib/source/format/lux/data/text.lux +++ b/stdlib/source/format/lux/data/text.lux @@ -50,7 +50,7 @@ (def .public format (syntax (_ [fragments (<>.many <code>.any)]) - (in (.list (` (all "lux text concat" (~+ fragments))))))) + (in (.list (` (all "lux text concat" (,* fragments))))))) (with_template [<name> <type> <formatter>] [(def .public <name> @@ -87,7 +87,7 @@ (Format <type>) (at <codec> encoded))] - (~~ (template.spliced <format>,<codec>))))] + (,, (template.spliced <format>,<codec>))))] [Nat [[nat_2 nat.binary] diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index d142387b3..2e875d426 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -2041,7 +2041,7 @@ (def' .public literal_quote Macro ') -(def' .public ~ +(def' .public , UnQuote (..unquote (macro (_ tokens) @@ -2051,12 +2051,12 @@ it)))) _ - (failure (wrong_syntax_error [..prelude "~"]))} + (failure (wrong_syntax_error [..prelude ","]))} tokens)))) -(def' .public but UnQuote ~) +(def' .public but UnQuote ,) -(def' .public ~! +(def' .public ,! UnQuote (..unquote (macro (_ tokens) @@ -2070,12 +2070,12 @@ independent)))))))) _ - (failure (wrong_syntax_error [..prelude "~!"]))} + (failure (wrong_syntax_error [..prelude ",!"]))} tokens)))) -(def' .public specifically UnQuote ~!) +(def' .public specifically UnQuote ,!) -(def' .public ~' +(def' .public ,' UnQuote (..unquote (macro (_ tokens) @@ -2086,12 +2086,12 @@ (in (list it))) _ - (failure (wrong_syntax_error [..prelude "~'"]))} + (failure (wrong_syntax_error [..prelude ",'"]))} tokens)))) -(def' .public literally UnQuote ~') +(def' .public literally UnQuote ,') -(def' .public ~+ +(def' .public ,* Spliced_UnQuote (let' [g!list#composite (form$ (list (text$ "lux in-module") (text$ ..prelude) @@ -2102,10 +2102,10 @@ (meta#in (list (form$ (list g!list#composite (|List<Code>| it) tail)))) _ - (failure (wrong_syntax_error [..prelude "~+"]))} + (failure (wrong_syntax_error [..prelude ",*"]))} tokens))))) -(def' .public also Spliced_UnQuote ~+) +(def' .public also Spliced_UnQuote ,*) (def' .public |> Macro @@ -2123,7 +2123,7 @@ (form$ (list#composite parts (list acc))) _ - (` ((~ app) (~ acc)))} + (` ((, app) (, acc)))} app))) init apps))) @@ -2148,7 +2148,7 @@ (form$ (list#composite parts (list acc))) _ - (` ((~ app) (~ acc)))} + (` ((, app) (, acc)))} app))) init apps))) @@ -2613,12 +2613,12 @@ ({[_ {#Variant {#Item [_ {#Symbol symbol}] parts}}] (do meta#monad [parts (monad#each meta#monad normal_type parts)] - (in (` {(~ (symbol$ symbol)) (~+ parts)}))) + (in (` {(, (symbol$ symbol)) (,* parts)}))) [_ {#Tuple members}] (do meta#monad [members (monad#each meta#monad normal_type members)] - (in (` (Tuple (~+ members))))) + (in (` (Tuple (,* members))))) [_ {#Form {#Item [_ {#Text "lux in-module"}] {#Item [_ {#Text module}] @@ -2626,9 +2626,9 @@ {#End}}}}}] (do meta#monad [type' (normal_type type')] - (in (` ("lux in-module" (~ (text$ module)) (~ type'))))) + (in (` ("lux in-module" (, (text$ module)) (, type'))))) - [_ {#Form {#Item [_ {#Symbol ["" "~"]}] {#Item expression {#End}}}}] + [_ {#Form {#Item [_ {#Symbol ["" ","]}] {#Item expression {#End}}}}] (meta#in expression) [_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item body {#End}}}}] @@ -2658,7 +2658,7 @@ [type_fn (normal_type type_fn) args (monad#each meta#monad normal_type args)] (in (list#mix ("lux type check" (-> Code Code Code) - (function' [arg type_fn] (` {.#Apply (~ arg) (~ type_fn)}))) + (function' [arg type_fn] (` {.#Apply (, arg) (, type_fn)}))) type_fn args))) @@ -2764,8 +2764,8 @@ (macro (_ tokens) ({{#Item type {#Item value {#End}}} (meta#in (list (` ("lux type check" - (..type_literal (~ type)) - (~ value))))) + (..type_literal (, type)) + (, value))))) _ (failure (wrong_syntax_error [..prelude "is"]))} @@ -2776,8 +2776,8 @@ (macro (_ tokens) ({{#Item type {#Item value {#End}}} (meta#in (list (` ("lux type as" - (..type_literal (~ type)) - (~ value))))) + (..type_literal (, type)) + (, value))))) _ (failure (wrong_syntax_error [..prelude "as"]))} @@ -2821,8 +2821,8 @@ ({{#Item value actions} (let' [dummy (local$ "")] (meta#in (list (list#mix ("lux type check" (-> Code Code Code) - (function' [pre post] (` ({(~ dummy) (~ post)} - (~ pre))))) + (function' [pre post] (` ({(, dummy) (, post)} + (, pre))))) value actions)))) @@ -2869,7 +2869,7 @@ ({{#Item value branches} (do meta#monad [expansion (case_expansion branches)] - (in (list (` ((~ (variant$ expansion)) (~ value)))))) + (in (list (` ((, (variant$ expansion)) (, value)))))) _ (failure "Wrong syntax for case")} @@ -2914,7 +2914,7 @@ (macro (_ tokens) (case tokens (pattern (list [_ {#Symbol [module name]}])) - (meta#in (list (` [(~ (text$ module)) (~ (text$ name))]))) + (meta#in (list (` [(, (text$ module)) (, (text$ name))]))) _ (failure (..wrong_syntax_error [..prelude "symbol"]))))) @@ -2941,8 +2941,8 @@ (function' [lr body'] (let' [[l r] lr] (if (symbol? l) - (` ({(~ l) (~ body')} (~ r))) - (` (case (~ r) (~ l) (~ body'))))))) + (` ({(, l) (, body')} (, r))) + (` (case (, r) (, l) (, body'))))))) body) list meta#in) @@ -2969,9 +2969,9 @@ (function' [g!name] (function' [arg body'] (if (symbol? arg) - (` ([(~ g!name) (~ arg)] (~ body'))) - (` ([(~ g!name) (~ g!blank)] - (.case (~ g!blank) (~ arg) (~ body'))))))))] + (` ([(, g!name) (, arg)] (, body'))) + (` ([(, g!name) (, g!blank)] + (.case (, g!blank) (, arg) (, body'))))))))] (meta#in (list (nest (..local$ g!name) head (list#mix (nest g!blank) body (list#reversed tail)))))) @@ -3270,18 +3270,18 @@ body _ - (` (function ((~ (..local$ name)) (~+ parameters)) - (~ body)))) + (` (function ((, (..local$ name)) (,* parameters)) + (, body)))) body (case ?type {#Some type} - (` (is (~ type) - (~ body))) + (` (is (, type) + (, body))) {#None} body)] - (meta#in (list (` ("lux def" (~ (..local$ name)) - (~ body) - (~ export_policy)))))) + (meta#in (list (` ("lux def" (, (..local$ name)) + (, body) + (, export_policy)))))) {#None} (failure (..wrong_syntax_error (symbol ..def)))))) @@ -3299,8 +3299,8 @@ _ (failure <message>))))] - [and (if (~ pre) (~ post) #0) "'and' requires >=1 clauses."] - [or (if (~ pre) #1 (~ post)) "'or' requires >=1 clauses."]) + [and (if (, pre) (, post) #0) "'and' requires >=1 clauses."] + [or (if (, pre) #1 (, post)) "'or' requires >=1 clauses."]) (def (index part text) (-> Text Text (Maybe Nat)) @@ -3315,12 +3315,12 @@ (case tokens (pattern (list else maybe)) (let [g!temp (is Code [dummy_location {#Symbol ["" ""]}]) - code (` (case (~ maybe) - {.#Some (~ g!temp)} - (~ g!temp) + code (` (case (, maybe) + {.#Some (, g!temp)} + (, g!temp) {.#None} - (~ else)))] + (, else)))] {#Right [state (list code)]}) _ @@ -3684,7 +3684,7 @@ {#Some [tokens' [niladic (` .Any)]]} (pattern (partial_list [_ {#Variant (partial_list [_ {#Symbol ["" polyadic]}] caseT)}] tokens')) - {#Some [tokens' [polyadic (` (..Tuple (~+ caseT)))]]} + {#Some [tokens' [polyadic (` (..Tuple (,* caseT)))]]} _ {#None})) @@ -3693,7 +3693,7 @@ (macro (_ tokens) (case (everyP caseP tokens) {#Some cases} - (meta#in (list (` (..Union (~+ (list#each product#right cases)))) + (meta#in (list (` (..Union (,* (list#each product#right cases)))) (variant$ (list#each (function (_ case) (text$ (product#left case))) cases)))) @@ -3716,7 +3716,7 @@ (pattern (list [_ {#Tuple record}])) (case (everyP slotP record) {#Some slots} - (meta#in (list (` (..Tuple (~+ (list#each product#right slots)))) + (meta#in (list (` (..Tuple (,* (list#each product#right slots)))) (tuple$ (list#each (function (_ slot) (text$ (product#left slot))) slots)))) @@ -3793,30 +3793,30 @@ {#Some type} _ - {#Some (` (.All ((~ type_name) (~+ (list#each local$ args))) - (~ type)))}))]] + {#Some (` (.All ((, type_name) (,* (list#each local$ args))) + (, type)))}))]] (case type' {#Some type''} - (let [typeC (` {.#Named [(~ (text$ module_name)) - (~ (text$ name))] - (..type_literal (~ type''))})] + (let [typeC (` {.#Named [(, (text$ module_name)) + (, (text$ name))] + (..type_literal (, type''))})] (meta#in (list (case labels?? {#Some labels} - (` ("lux def type tagged" (~ type_name) - (~ typeC) - (~ (case labels + (` ("lux def type tagged" (, type_name) + (, typeC) + (, (case labels {#Left tags} - (` {(~+ (list#each text$ tags))}) + (` {(,* (list#each text$ tags))}) {#Right slots} - (` [(~+ (list#each text$ slots))]))) - (~ export_policy))) + (` [(,* (list#each text$ slots))]))) + (, export_policy))) _ - (` ("lux def" (~ type_name) + (` ("lux def" (, type_name) ("lux type check type" - (~ typeC)) - (~ export_policy))))))) + (, typeC)) + (, export_policy))))))) {#None} (failure (..wrong_syntax_error (symbol ..type))))) @@ -4116,7 +4116,7 @@ (def (alias_definition imported_module def) (-> Text Text Code) - (` ("lux def alias" (~ (local$ def)) (~ (symbol$ [imported_module def]))))) + (` ("lux def alias" (, (local$ def)) (, (symbol$ [imported_module def]))))) (def .public only (macro (_ tokens) @@ -4140,14 +4140,14 @@ (do meta#monad [g!_ (..generated_symbol "_") g!arg (..generated_symbol "arg")] - (meta#in (list (` (function ((~ g!_) (~ g!arg)) (|> (~ g!arg) (~+ tokens))))))))) + (meta#in (list (` (function ((, g!_) (, g!arg)) (|> (, g!arg) (,* tokens))))))))) (def .public <<| (macro (_ tokens) (do meta#monad [g!_ (..generated_symbol "_") g!arg (..generated_symbol "arg")] - (meta#in (list (` (function ((~ g!_) (~ g!arg)) (<| (~+ tokens) (~ g!arg))))))))) + (meta#in (list (` (function ((, g!_) (, g!arg)) (<| (,* tokens) (, g!arg))))))))) (def .public except (macro (_ tokens) @@ -4265,7 +4265,7 @@ (pattern (partial_list [_ {#Form (list [_ {#Text alias}])}] body branches)) (do meta#monad [g!temp (..generated_symbol "temp")] - (in (partial_list g!temp (` (..open (~ g!temp) (~ (text$ alias)) (~ body))) branches))) + (in (partial_list g!temp (` (..open (, g!temp) (, (text$ alias)) (, body))) branches))) (pattern (list [_ {#Symbol name}] [_ {#Text alias}] body)) (do meta#monad @@ -4309,7 +4309,7 @@ (in enhanced_target)))) target (zipped_2 locals members))] - (in (` ({(~ pattern) (~ enhanced_target)} (~ (symbol$ source))))))))) + (in (` ({(, pattern) (, enhanced_target)} (, (symbol$ source))))))))) name tags&members body)] (in (list full_body))))) @@ -4325,7 +4325,7 @@ (meta#in (list (list#mix (is (-> [Code Code] Code Code) (function (_ branch else) (let [[then ?] branch] - (` (if (~ ?) (~ then) (~ else)))))) + (` (if (, ?) (, then) (, else)))))) else branches'))) @@ -4371,7 +4371,7 @@ g!_))))) list#conjoint tuple$)] - (meta#in (list (` ({(~ pattern) (~ g!output)} (~ record)))))) + (meta#in (list (` ({(, pattern) (, g!output)} (, record)))))) _ (failure "the can only use records."))) @@ -4379,7 +4379,7 @@ (pattern (list [_ {#Tuple slots}] record)) (meta#in (list (list#mix (is (-> Code Code Code) (function (_ slot inner) - (` (..the (~ slot) (~ inner))))) + (` (..the (, slot) (, inner))))) record slots))) @@ -4387,7 +4387,7 @@ (do meta#monad [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!record)) (..the (~ selector) (~ g!record))))))) + (in (list (` (function ((, g!_) (, g!record)) (..the (, selector) (, g!record))))))) _ (failure (..wrong_syntax_error (symbol ..the)))))) @@ -4405,7 +4405,7 @@ g!output g!_))) tuple$) - source+ (` ({(~ pattern) (~ g!output)} (~ source)))]] + source+ (` ({(, pattern) (, g!output)} (, source)))]] (case output {#Some [tags' members']} (do meta#monad @@ -4417,8 +4417,8 @@ (in (list#conjoint decls'))) _ - (in (list (` ("lux def" (~ (local$ (..module_alias (list short imported_module) alias))) - (~ source+) + (in (list (` ("lux def" (, (local$ (..module_alias (list short imported_module) alias))) + (, source+) #0))))))) (def (implementation_declarations imported_module alias implementation) @@ -4490,18 +4490,18 @@ _ (do meta#monad [g!implementation (..generated_symbol "implementation")] - (in [{#Item (` ("lux def" (~ g!implementation) (~ it) #0)) pre_defs} + (in [{#Item (` ("lux def" (, g!implementation) (, it) #0)) pre_defs} {#Item g!implementation implementations}])))) [(list) (list)] implementations)) .let [[pre_defs implementations] pre_defs,implementations]] (in (|> pre_defs {#Item (` (..use - (~ (text$ current_module)) - (~ (text$ imported_module)) - (~ (text$ import_alias)) - (~ (text$ alias)) - (~+ implementations)))} + (, (text$ current_module)) + (, (text$ imported_module)) + (, (text$ import_alias)) + (, (text$ alias)) + (,* implementations)))} list#reversed))))) @@ -4545,11 +4545,11 @@ [referrals (..referrals imported_module options) current_module ..current_module_name] (in (list#each (function (_ [macro parameters]) - (` ((~ (symbol$ macro)) - (~ (text$ current_module)) - (~ (text$ imported_module)) - (~ (text$ alias)) - (~+ parameters)))) + (` ((, (symbol$ macro)) + (, (text$ current_module)) + (, (text$ imported_module)) + (, (text$ alias)) + (,* parameters)))) referrals))) _ @@ -4560,8 +4560,8 @@ (case (..parsed (..andP ..anyP ..anyP) tokens) {.#Some [implementation expression]} - (meta#in (list (` (..let [(..open (~ (text$ (alias_stand_in 0)))) (~ implementation)] - (~ expression))))) + (meta#in (list (` (..let [(..open (, (text$ (alias_stand_in 0)))) (, implementation)] + (, expression))))) {.#None} (failure (..wrong_syntax_error (symbol ..with)))))) @@ -4570,10 +4570,10 @@ (macro (_ tokens) (case tokens (pattern (list implementation [_ {#Symbol member}])) - (meta#in (list (` (..with (~ implementation) (~ (symbol$ member)))))) + (meta#in (list (` (..with (, implementation) (, (symbol$ member)))))) (pattern (partial_list struct member args)) - (meta#in (list (` ((..at (~ struct) (~ member)) (~+ args))))) + (meta#in (list (` ((..at (, struct) (, member)) (,* args))))) _ (failure (..wrong_syntax_error (symbol ..at)))))) @@ -4612,7 +4612,7 @@ r_var))))) list#conjoint tuple$)] - (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) + (meta#in (list (` ({(, pattern) (, output)} (, record))))))) _ (failure "has can only use records."))) @@ -4631,33 +4631,33 @@ .let [pairs (zipped_2 slots bindings) update_expr (list#mix (is (-> [Code Code] Code Code) (function (_ [s b] v) - (` (..has (~ s) (~ v) (~ b))))) + (` (..has (, s) (, v) (, b))))) value (list#reversed pairs)) [_ accesses'] (list#mix (is (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))]) (function (_ [new_slot new_binding] [old_record accesses']) - [(` (the (~ new_slot) (~ new_binding))) + [(` (the (, new_slot) (, new_binding))) {#Item (list new_binding old_record) accesses'}])) [record (is (List (List Code)) {#End})] pairs) accesses (list#conjoint (list#reversed accesses'))]] - (in (list (` (let [(~+ accesses)] - (~ update_expr))))))) + (in (list (` (let [(,* accesses)] + (, update_expr))))))) (pattern (list selector value)) (do meta#monad [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!record)) - (..has (~ selector) (~ value) (~ g!record))))))) + (in (list (` (function ((, g!_) (, g!record)) + (..has (, selector) (, value) (, g!record))))))) (pattern (list selector)) (do meta#monad [g!_ (..generated_symbol "_") g!value (..generated_symbol "value") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!value) (~ g!record)) - (..has (~ selector) (~ g!value) (~ g!record))))))) + (in (list (` (function ((, g!_) (, g!value) (, g!record)) + (..has (, selector) (, g!value) (, g!record))))))) _ (failure (..wrong_syntax_error (symbol ..has)))))) @@ -4692,11 +4692,11 @@ (function (_ [r_slot_name r_idx r_var]) (list (symbol$ r_slot_name) (if ("lux i64 =" idx r_idx) - (` ((~ fun) (~ r_var))) + (` ((, fun) (, r_var))) r_var))))) list#conjoint tuple$)] - (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) + (meta#in (list (` ({(, pattern) (, output)} (, record))))))) _ (failure "revised can only use records."))) @@ -4710,24 +4710,24 @@ (do meta#monad [g!record (..generated_symbol "record") g!temp (..generated_symbol "temp")] - (in (list (` (let [(~ g!record) (~ record) - (~ g!temp) (the [(~+ slots)] (~ g!record))] - (has [(~+ slots)] ((~ fun) (~ g!temp)) (~ g!record)))))))) + (in (list (` (let [(, g!record) (, record) + (, g!temp) (the [(,* slots)] (, g!record))] + (has [(,* slots)] ((, fun) (, g!temp)) (, g!record)))))))) (pattern (list selector fun)) (do meta#monad [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!record)) - (..revised (~ selector) (~ fun) (~ g!record))))))) + (in (list (` (function ((, g!_) (, g!record)) + (..revised (, selector) (, fun) (, g!record))))))) (pattern (list selector)) (do meta#monad [g!_ (..generated_symbol "_") g!fun (..generated_symbol "fun") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!fun) (~ g!record)) - (..revised (~ selector) (~ g!fun) (~ g!record))))))) + (in (list (` (function ((, g!_) (, g!fun) (, g!record)) + (..revised (, selector) (, g!fun) (, g!record))))))) _ (failure (..wrong_syntax_error (symbol ..revised)))))) @@ -4791,31 +4791,31 @@ (-> Type Code) (case type {#Primitive name params} - (` {.#Primitive (~ (text$ name)) (~ (untemplated_list (list#each type_code params)))}) + (` {.#Primitive (, (text$ name)) (, (untemplated_list (list#each type_code params)))}) (with_template#pattern [<tag>] [{<tag> left right} - (` {<tag> (~ (type_code left)) (~ (type_code right))})]) + (` {<tag> (, (type_code left)) (, (type_code right))})]) ([.#Sum] [.#Product] [.#Function] [.#Apply]) (with_template#pattern [<tag>] [{<tag> id} - (` {<tag> (~ (nat$ id))})]) + (` {<tag> (, (nat$ id))})]) ([.#Parameter] [.#Var] [.#Ex]) (with_template#pattern [<tag>] [{<tag> env type} (let [env' (untemplated_list (list#each type_code env))] - (` {<tag> (~ env') (~ (type_code type))}))]) + (` {<tag> (, env') (, (type_code type))}))]) ([.#UnivQ] [.#ExQ]) {#Named [module name] anonymous} ... TODO: Generate the explicit type definition instead of using ... the "symbol$" shortcut below. - ... (` {.#Named [(~ (text$ module)) (~ (text$ name))] - ... (~ (type_code anonymous))}) + ... (` {.#Named [(, (text$ module)) (, (text$ name))] + ... (, (type_code anonymous))}) (symbol$ [module name]))) (def .public loop @@ -4841,19 +4841,19 @@ init_types (monad#each meta#monad type_definition inits') expected ..expected_type] (meta#in (list (` (("lux type check" - (-> (~+ (list#each type_code init_types)) - (~ (type_code expected))) - (function ((~ name) (~+ vars)) - (~ body))) - (~+ inits)))))) + (-> (,* (list#each type_code init_types)) + (, (type_code expected))) + (function ((, name) (,* vars)) + (, body))) + (,* inits)))))) (do meta#monad [aliases (monad#each meta#monad (is (-> Code (Meta Code)) (function (_ _) (..generated_symbol ""))) inits)] - (meta#in (list (` (..let [(~+ (..interleaved aliases inits))] - (..loop ((~ name) [(~+ (..interleaved vars aliases))]) - (~ body))))))))) + (meta#in (list (` (..let [(,* (..interleaved aliases inits))] + (..loop ((, name) [(,* (..interleaved vars aliases))]) + (, body))))))))) {#None} (failure (..wrong_syntax_error (symbol ..loop)))) @@ -5020,14 +5020,14 @@ _ #0)] - (` (case (~ calculation) - (~ pattern) - (~ success) + (` (case (, calculation) + (, pattern) + (, success) - (~+ (if bind? + (,* (if bind? (list) (list g!_ (` {.#None})))))))) - (` {.#Some (~ body)}) + (` {.#Some (, body)}) (is (List [Code Code]) (list#reversed levels)))] (list init_pattern inner_pattern_body))) @@ -5046,17 +5046,17 @@ expected ..expected_type g!temp (..generated_symbol "temp")] (in (list g!temp - (` ({{.#Some (~ g!temp)} - (~ g!temp) + (` ({{.#Some (, g!temp)} + (, g!temp) {.#None} - (case (~ g!temp) - (~+ next_branches))} - ("lux type check" {.#Apply (~ (type_code expected)) Maybe} - (case (~ g!temp) - (~+ (multi_level_case$ g!temp [mlc body])) + (case (, g!temp) + (,* next_branches))} + ("lux type check" {.#Apply (, (type_code expected)) Maybe} + (case (, g!temp) + (,* (multi_level_case$ g!temp [mlc body])) - (~+ (if initial_bind? + (,* (if initial_bind? (list) (list g!temp (` {.#None}))))))))))) @@ -5074,7 +5074,7 @@ (pattern (list expr)) (do meta#monad [type ..expected_type] - (in (list (` ("lux type as" (~ (type_code type)) (~ expr)))))) + (in (list (` ("lux type as" (, (type_code type)) (, expr)))))) _ (failure (..wrong_syntax_error (symbol ..as_expected)))))) @@ -5093,7 +5093,7 @@ .let [[module line column] 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))))))) + (in (list (` (..panic! (, (text$ message))))))) _ (failure (..wrong_syntax_error (symbol ..undefined)))))) @@ -5109,8 +5109,8 @@ (pattern (list expression)) (do meta#monad [g!temp (..generated_symbol "g!temp")] - (in (list (` (let [(~ g!temp) (~ expression)] - (..type_of (~ g!temp))))))) + (in (list (` (let [(, g!temp) (, expression)] + (..type_of (, g!temp))))))) _ (failure (..wrong_syntax_error (symbol ..type_of)))))) @@ -5134,19 +5134,19 @@ g!compiler (..generated_symbol "compiler") g!_ (..generated_symbol "_") .let [rep_env (list#each (function (_ arg) - [arg (` ((~' ~) (~ (local$ arg))))]) + [arg (` ((,' ,) (, (local$ arg))))]) args)] this_module current_module_name] - (in (list (` (..macro ((~ (local$ name)) (~ g!tokens) (~ g!compiler)) - (case (~ g!tokens) - (pattern (list (~+ (list#each local$ args)))) - {.#Right [(~ g!compiler) - (list (~+ (list#each (function (_ template) - (` (`' (~ (with_replacements rep_env + (in (list (` (..macro ((, (local$ name)) (, g!tokens) (, g!compiler)) + (case (, g!tokens) + (pattern (list (,* (list#each local$ args)))) + {.#Right [(, g!compiler) + (list (,* (list#each (function (_ template) + (` (`' (, (with_replacements rep_env template))))) input_templates)))]} - (~ g!_) + (, g!_) {.#Left "Invalid syntax."})))))) {#None} @@ -5259,7 +5259,7 @@ [stvs ..scope_type_vars] (case (..item idx (list#reversed stvs)) {#Some var_id} - (in (list (` {.#Ex (~ (nat$ var_id))}))) + (in (list (` {.#Ex (, (nat$ var_id))}))) {#None} (failure (text#composite "Indexed-type does not exist: " (nat#encoded idx))))) @@ -5270,11 +5270,11 @@ (def (refer_code imported_module alias referrals) (-> Text Text (List Referral) Code) - (` ((~! ..refer) - (~ (text$ imported_module)) - (~ (text$ alias)) - (~+ (list#each (function (_ [macro parameters]) - (` ((~ (symbol$ macro)) (~+ parameters)))) + (` ((,! ..refer) + (, (text$ imported_module)) + (, (text$ alias)) + (,* (list#each (function (_ [macro parameters]) + (` ((, (symbol$ macro)) (,* parameters)))) referrals))))) (def .public require @@ -5285,13 +5285,13 @@ .let [=imports (|> imports (list#each (is (-> Importation Code) (function (_ [module_name m_alias =refer]) - (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))])))) + (` [(, (text$ module_name)) (, (text$ (..maybe#else "" m_alias)))])))) tuple$) =refers (list#each (is (-> Importation Code) (function (_ [module_name m_alias =refer]) (refer_code module_name (..maybe#else "" m_alias) =refer))) imports) - =module (` ("lux def module" (~ =imports)))] + =module (` ("lux def module" (, =imports)))] g!_ (..generated_symbol "")] (in {#Item =module (for "Python" @@ -5300,7 +5300,7 @@ ... {library/lux/tool/compiler/language/lux/generation.no_buffer_for_saving_code} ... Artifact ID: 0 ... Which only ever happens for the Python compiler. - (partial_list (` ("lux def" (~ g!_) [] #0)) + (partial_list (` ("lux def" (, g!_) [] #0)) =refers) =refers)})))) @@ -5315,7 +5315,7 @@ (-> Immediate_UnQuote Macro') (|>> (as Macro'))) -(def .public ~~ +(def .public ,, (..immediate_unquote (macro (_ it) (case it @@ -5323,7 +5323,7 @@ (meta#in (list it)) _ - (failure (wrong_syntax_error (symbol ..~~))))))) + (failure (wrong_syntax_error (symbol ..,,))))))) (def aggregate_embedded_expansions (template (_ embedded_expansions <@> <tag> <*>) @@ -5390,8 +5390,8 @@ (do meta#monad [=raw (..embedded_expansions raw) .let [[labels labelled] =raw]] - (in (list (` (with_expansions [(~+ labels)] - (~ labelled)))))) + (in (list (` (with_expansions [(,* labels)] + (, labelled)))))) _ (failure (..wrong_syntax_error (symbol ..``)))))) @@ -5410,8 +5410,8 @@ (do meta#monad [g!_ (..generated_symbol "g!_")] (in (list (` ("lux try" - (.function ((~ g!_) (~ g!_)) - (~ expression))))))) + (.function ((, g!_) (, g!_)) + (, expression))))))) _ (..failure (..wrong_syntax_error (symbol ..try)))))) @@ -5434,7 +5434,7 @@ [methods' (monad#each meta#monad expansion tokens)] (case (everyP methodP (list#conjoint methods')) {#Some methods} - (in (list (` (..Tuple (~+ (list#each product#right methods)))) + (in (list (` (..Tuple (,* (list#each product#right methods)))) (tuple$ (list#each (|>> product#left text$) methods)))) {#None} @@ -5443,8 +5443,8 @@ (def (recursive_type g!self g!dummy name body) (-> Code Code Text Code Code) (` {.#Apply (..Primitive "") - (.All ((~ g!self) (~ g!dummy)) - (~ (let$ (local$ name) (` {.#Apply (..Primitive "") (~ g!self)}) + (.All ((, g!self) (, g!dummy)) + (, (let$ (local$ name) (` {.#Apply (..Primitive "") (, g!self)}) body)))})) (def .public Rec diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux index 3bb200239..fbe61f780 100644 --- a/stdlib/source/library/lux/abstract/comonad.lux +++ b/stdlib/source/library/lux/abstract/comonad.lux @@ -46,14 +46,14 @@ g!disjoint (symbol "disjoint") body' (list#mix (is (-> [Code Code] Code Code) (function (_ binding body') - (with_expansions [<default> (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))] + (with_expansions [<default> (` (|> (, value) (, g!disjoint) ((, g!each) (function ((, g!_) (, var)) (, body')))))] (let [[var value] binding] (case var [_ {.#Symbol ["" _]}] <default> [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) + (` ((, var) (, value) (, body'))) _ <default>))))) @@ -62,16 +62,16 @@ {.#Right [state (list (case ?name {.#Some name} (let [name [location.dummy {.#Symbol ["" name]}]] - (` (.case (~ comonad) - (~ name) - (.case (~ name) - [(~ g!each) (~' out) (~ g!disjoint)] - (~ body'))))) + (` (.case (, comonad) + (, name) + (.case (, name) + [(, g!each) (,' out) (, g!disjoint)] + (, body'))))) {.#None} - (` (.case (~ comonad) - [(~ g!each) (~' out) (~ g!disjoint)] - (~ body')))))]}) + (` (.case (, comonad) + [(, g!each) (,' out) (, g!disjoint)] + (, body')))))]}) {.#None} {.#Left "'be' bindings must have an even number of parts."}) diff --git a/stdlib/source/library/lux/abstract/enum.lux b/stdlib/source/library/lux/abstract/enum.lux index eea9320df..9a79beb54 100644 --- a/stdlib/source/library/lux/abstract/enum.lux +++ b/stdlib/source/library/lux/abstract/enum.lux @@ -14,7 +14,7 @@ (All (_ a) (-> (Enum a) a a (List a))) (let [(open "/#[0]") enum] (loop (again [end to - output (`` (is (List (~~ (type_of from))) + output (`` (is (List (,, (type_of from))) {.#End}))]) (cond (/#< end from) (again (/#pred end) {.#Item end output}) diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux index 3bf10fca1..33faf1290 100644 --- a/stdlib/source/library/lux/abstract/monad.lux +++ b/stdlib/source/library/lux/abstract/monad.lux @@ -76,14 +76,14 @@ g!conjoint (symbol "conjoint") body' (list#mix (is (-> [Code Code] Code Code) (function (_ binding body') - (with_expansions [<default> (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))] + (with_expansions [<default> (` (|> (, value) ((, g!each) (function ((, g!_) (, var)) (, body'))) (, g!conjoint)))] (let [[var value] binding] (case var [_ {.#Symbol ["" _]}] <default> [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) + (` ((, var) (, value) (, body'))) _ <default>))))) @@ -92,16 +92,16 @@ {.#Right [state (list (case ?name {.#Some name} (let [name [location.dummy {.#Symbol ["" name]}]] - (` (.case (~ monad) - (~ name) - (.case (~ name) - [(~ g!each) (~' in) (~ g!conjoint)] - (~ body'))))) + (` (.case (, monad) + (, name) + (.case (, name) + [(, g!each) (,' in) (, g!conjoint)] + (, body'))))) {.#None} - (` (.case (~ monad) - [(~ g!each) (~' in) (~ g!conjoint)] - (~ body')))))]}) + (` (.case (, monad) + [(, g!each) (,' in) (, g!conjoint)] + (, body')))))]}) {.#Left "'do' bindings must have an even number of parts."}) {.#None} diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux index cba3ac6e1..f6dd6a461 100644 --- a/stdlib/source/library/lux/abstract/monad/indexed.lux +++ b/stdlib/source/library/lux/abstract/monad/indexed.lux @@ -70,26 +70,26 @@ (let [body (list#mix (function (_ context next) (case context {#Macro macro parameter} - (` ((~ (code.symbol macro)) - (~ parameter) - (~ next))) + (` ((, (code.symbol macro)) + (, parameter) + (, next))) {#Binding [binding value]} - (` ((~ g!then) - (.function ((~ g!_) (~ binding)) - (~ next)) - (~ value))))) + (` ((, g!then) + (.function ((, g!_) (, binding)) + (, next)) + (, value))))) expression (list.reversed context))] (in (list (case ?name {.#Some name} (let [name (code.local name)] - (` (let [(~ name) (~ monad) - [..in (~' in) - ..then (~ g!then)] (~ name)] - (~ body)))) + (` (let [(, name) (, monad) + [..in (,' in) + ..then (, g!then)] (, name)] + (, body)))) {.#None} - (` (let [[..in (~' in) - ..then (~ g!then)] (~ monad)] - (~ body)))))))))) + (` (let [[..in (,' in) + ..then (, g!then)] (, monad)] + (, body)))))))))) diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux index 795d387cb..ac78d307a 100644 --- a/stdlib/source/library/lux/control/concatenative.lux +++ b/stdlib/source/library/lux/control/concatenative.lux @@ -50,7 +50,7 @@ (def (stack_type tops bottom) (-> (List Code) Code Code) (list#mix (function (_ top bottom) - (` [(~ bottom) (~ top)])) + (` [(, bottom) (, top)])) bottom tops)) @@ -64,11 +64,11 @@ output_stack (stack_type (the #top outputs) output_bottom)] (in (list (.if (or (same? common_bottom input_bottom) (same? common_bottom output_bottom)) - (` (All ((~ g!_) (~ common_bottom)) - (-> (~ input_stack) - (~ output_stack)))) - (` (-> (~ input_stack) - (~ output_stack)))))))))) + (` (All ((, g!_) (, common_bottom)) + (-> (, input_stack) + (, output_stack)))) + (` (-> (, input_stack) + (, output_stack)))))))))) (def .public (value it) (All (_ ,,, a) @@ -82,15 +82,15 @@ (with_symbols [g!_ g!func g!stack g!output] (monad.do [! meta.monad] [g!inputs (|> (macro.symbol "input") (list.repeated arity) (monad.all !))] - (in (list (` (is (All ((~ g!_) (~+ g!inputs) (~ g!output)) - (-> (-> (~+ g!inputs) (~ g!output)) - (=> [(~+ g!inputs)] [(~ g!output)]))) - (function ((~ g!_) (~ g!func)) - (function ((~ g!_) (~ (stack_type g!inputs g!stack))) - [(~ g!stack) ((~ g!func) (~+ g!inputs))])))))))))) + (in (list (` (is (All ((, g!_) (,* g!inputs) (, g!output)) + (-> (-> (,* g!inputs) (, g!output)) + (=> [(,* g!inputs)] [(, g!output)]))) + (function ((, g!_) (, g!func)) + (function ((, g!_) (, (stack_type g!inputs g!stack))) + [(, g!stack) ((, g!func) (,* g!inputs))])))))))))) (with_template [<arity>] - [(`` (def .public (~~ (template.symbol ["apply_" <arity>])) + [(`` (def .public (,, (template.symbol ["apply_" <arity>])) (..apply <arity>)))] [1] [2] [3] [4] diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux index 0098f0f1b..37ab82cbe 100644 --- a/stdlib/source/library/lux/control/concurrency/async.lux +++ b/stdlib/source/library/lux/control/concurrency/async.lux @@ -186,7 +186,7 @@ (is [(Async a) (Resolver a)] (..async [])))] (`` (exec - (~~ (with_template [<async>] + (,, (with_template [<async>] [(io.run! (upon! resolve <async>))] [left] diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index 3c81d2841..4ba43632f 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -58,7 +58,7 @@ (All (_ r w) (-> r w (Atom' r w) (IO Bit))) (io.io (for @.old (ffi.of_boolean (java/util/concurrent/atomic/AtomicReference::compareAndSet (variance.write - (`` (as (~~ (type_of new)) + (`` (as (,, (type_of new)) current))) (variance.write new) (representation atom))) diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index 2b6b0692f..d9ba28ef1 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -123,7 +123,7 @@ (refinement.refiner (n.> 0))) (type .public Limit - (~ (refinement.type limit))) + (, (refinement.type limit))) (primitive .public Barrier (Record diff --git a/stdlib/source/library/lux/control/continuation.lux b/stdlib/source/library/lux/control/continuation.lux index 8a398b377..756804d7d 100644 --- a/stdlib/source/library/lux/control/continuation.lux +++ b/stdlib/source/library/lux/control/continuation.lux @@ -36,7 +36,7 @@ (def .public pending (syntax (_ [expr <code>.any]) (with_symbols [g!_ g!k] - (in (list (` (.function ((~ g!_) (~ g!k)) ((~ g!k) (~ expr))))))))) + (in (list (` (.function ((, g!_) (, g!k)) ((, g!k) (, expr))))))))) (def .public (reset scope) (All (_ i o) (-> (Cont i i) (Cont i o))) diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index 073db8397..cf9c51105 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -96,15 +96,15 @@ [current_module meta.current_module_name .let [descriptor (all text#composite "{" current_module "." name "}" text.new_line) g!self (code.local name)]] - (in (list (` (def (~ export_policy) - (~ g!self) - (All ((~ g!_) (~+ (list#each |type_variable|.format t_vars))) - (..Exception [(~+ (list#each (the |input|.#type) inputs))])) - (let [(~ g!descriptor) (~ (code.text descriptor))] - [..#label (~ g!descriptor) - ..#constructor (function ((~ g!self) [(~+ (list#each (the |input|.#binding) inputs))]) - ((~! text#composite) (~ g!descriptor) - (~ (maybe.else (' "") body))))]))))))))) + (in (list (` (def (, export_policy) + (, g!self) + (All ((, g!_) (,* (list#each |type_variable|.format t_vars))) + (..Exception [(,* (list#each (the |input|.#type) inputs))])) + (let [(, g!descriptor) (, (code.text descriptor))] + [..#label (, g!descriptor) + ..#constructor (function ((, g!self) [(,* (list#each (the |input|.#binding) inputs))]) + ((,! text#composite) (, g!descriptor) + (, (maybe.else (' "") body))))]))))))))) (def (report' entries) (-> (List [Text Text]) Text) @@ -139,9 +139,9 @@ (def .public report (syntax (_ [entries (<>.many (<>.and <code>.any <code>.any))]) - (in (list (` ((~! ..report') (list (~+ (|> entries + (in (list (` ((,! ..report') (list (,* (|> entries (list#each (function (_ [header message]) - (` [(~ header) (~ message)])))))))))))) + (` [(, header) (, message)])))))))))))) (def .public (listing format entries) (All (_ a) diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index bb6ef6731..7b093341f 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -34,16 +34,16 @@ (syntax (_ [test <code>.any expr <code>.any]) (in (list (` (exec - ((~! ..assert!) (~ (code.text (exception.error ..pre_condition_failed test))) - (~ test)) - (~ expr))))))) + ((,! ..assert!) (, (code.text (exception.error ..pre_condition_failed test))) + (, test)) + (, expr))))))) (def .public post (syntax (_ [test <code>.any expr <code>.any]) (with_symbols [g!output] - (in (list (` (let [(~ g!output) (~ expr)] + (in (list (` (let [(, g!output) (, expr)] (exec - ((~! ..assert!) (~ (code.text (exception.error ..post_condition_failed test))) - ((~ test) (~ g!output))) - (~ g!output))))))))) + ((,! ..assert!) (, (code.text (exception.error ..post_condition_failed test))) + ((, test) (, g!output))) + (, g!output))))))))) diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index 0564edc3d..135674144 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -36,17 +36,17 @@ (list.repeated (list.size parameters)) (monad.all !)) .let [inlined (` (("lux in-module" - (~ (code.text @)) - (.is (~ type) - (.function ((~ (code.local name)) (~+ parameters)) - (~ term)))) - (~+ (list#each (function (_ g!parameter) - (` ((~' ~) (~ g!parameter)))) + (, (code.text @)) + (.is (, type) + (.function ((, (code.local name)) (,* parameters)) + (, term)))) + (,* (list#each (function (_ g!parameter) + (` ((,' ,) (, g!parameter)))) g!parameters)))) g!parameters (|> g!parameters (list#each (function (_ parameter) - (list parameter (` (~! <code>.any))))) + (list parameter (` (,! <code>.any))))) list#conjoint)]] - (in (list (` (def (~ privacy) (~ (code.local name)) - ((~! syntax) ((~ (code.local name)) [(~+ g!parameters)]) - (.at (~! meta.monad) (~' in) (.list (.`' (~ inlined)))))))))))) + (in (list (` (def (, privacy) (, (code.local name)) + ((,! syntax) ((, (code.local name)) [(,* g!parameters)]) + (.at (,! meta.monad) (,' in) (.list (.`' (, inlined)))))))))))) diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index f00643060..0dcf766f5 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -37,17 +37,17 @@ (.def (mutual_definition context g!context [g!name mutual]) (-> (List Code) Code [Code Mutual] Code) - (` (function ((~ g!name) (~ g!context)) - (.let [[(~+ context)] (~ g!context)] - (function (~ (declaration.format (the #declaration mutual))) - (~ (the #body mutual))))))) + (` (function ((, g!name) (, g!context)) + (.let [[(,* context)] (, g!context)] + (function (, (declaration.format (the #declaration mutual))) + (, (the #body mutual))))))) (.def (macro g!context g!self) (-> Code Code Macro) (<| (as Macro) (is Macro') (function (_ parameters) - (at meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters)))))))) + (at meta.monad in (list (` (((, g!self) (, g!context)) (,* parameters)))))))) (.def .public let (syntax (_ [functions (<code>.tuple (<>.some ..mutual)) @@ -58,10 +58,10 @@ {.#Item mutual {.#End}} (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local)] - (in (list (` (.let [(~ g!name) (is (~ (the #type mutual)) - (function (~ (declaration.format (the #declaration mutual))) - (~ (the #body mutual))))] - (~ body)))))) + (in (list (` (.let [(, g!name) (is (, (the #type mutual)) + (function (, (declaration.format (the #declaration mutual))) + (, (the #body mutual))))] + (, body)))))) _ (macro.with_symbols [g!context g!output] @@ -73,7 +73,7 @@ (list.zipped_2 hidden_names functions)) context_types (list#each (function (_ mutual) - (` (-> (~ g!context) (~ (the #type mutual))))) + (` (-> (, g!context) (, (the #type mutual))))) functions) user_names (list#each (|>> (the [#declaration declaration.#name]) code.local) functions)] @@ -82,16 +82,16 @@ (..macro g!context g!name)]) (list.zipped_2 hidden_names functions)))] - (in (list (` (.let [(~ g!context) (is (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) - [(~+ user_names)] (.let [[(~+ user_names)] (~ g!context)] - [(~+ (list#each (function (_ g!name) - (` ((~ g!name) (~ g!context)))) + (in (list (` (.let [(, g!context) (is (Rec (, g!context) + [(,* context_types)]) + [(,* definitions)]) + [(,* user_names)] (.let [[(,* user_names)] (, g!context)] + [(,* (list#each (function (_ g!name) + (` ((, g!name) (, g!context)))) user_names))]) - (~ g!output) (~ body)] - (exec (~ g!pop) - (~ g!output))))))))))) + (, g!output) (, body)] + (exec (, g!pop) + (, g!output))))))))))) (type Definition (Record @@ -112,9 +112,9 @@ {.#Item definition {.#End}} (.let [(open "_[0]") definition (open "_[0]") _#mutual] - (in (list (` (.def (~ _#export_policy) (~ (declaration.format _#declaration)) - (~ _#type) - (~ _#body)))))) + (in (list (` (.def (, _#export_policy) (, (declaration.format _#declaration)) + (, _#type) + (, _#body)))))) _ (macro.with_symbols [g!context g!output] @@ -126,7 +126,7 @@ (list.zipped_2 hidden_names (list#each (the #mutual) functions))) context_types (list#each (function (_ mutual) - (` (-> (~ g!context) (~ (the [#mutual #type] mutual))))) + (` (-> (, g!context) (, (the [#mutual #type] mutual))))) functions) user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local) functions)] @@ -135,22 +135,22 @@ (..macro g!context g!name)]) (list.zipped_2 hidden_names functions)))] - (in (list.partial (` (.def (~ g!context) - [(~+ (list#each (the [#mutual #type]) functions))] - (.let [(~ g!context) (is (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) - [(~+ user_names)] (~ g!context)] - [(~+ (list#each (function (_ g!name) - (` ((~ g!name) (~ g!context)))) + (in (list.partial (` (.def (, g!context) + [(,* (list#each (the [#mutual #type]) functions))] + (.let [(, g!context) (is (Rec (, g!context) + [(,* context_types)]) + [(,* definitions)]) + [(,* user_names)] (, g!context)] + [(,* (list#each (function (_ g!name) + (` ((, g!name) (, g!context)))) user_names))]))) g!pop (list#each (function (_ mutual) (.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local)] (` (.def - (~ (the #export_policy mutual)) - (~ g!name) - (~ (the [#mutual #type] mutual)) - (.let [[(~+ user_names)] (~ g!context)] - (~ g!name)))))) + (, (the #export_policy mutual)) + (, g!name) + (, (the [#mutual #type] mutual)) + (.let [[(,* user_names)] (, g!context)] + (, g!name)))))) functions)))))))) diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index bd0e441e2..318c96682 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -36,8 +36,8 @@ (def .public io (syntax (_ [computation <code>.any]) (with_symbols [g!func g!arg] - (in (list (` ((~! ..label) (function ((~ g!func) (~ g!arg)) - (~ computation))))))))) + (in (list (` ((,! ..label) (function ((, g!func) (, g!arg)) + (, computation))))))))) (def .public run! (All (_ a) (-> (IO a) a)) diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux index 857fdccff..b280b48e0 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -46,7 +46,7 @@ (def .public lazy (syntax (_ [expression <code>.any]) (with_symbols [g!_] - (in (list (` ((~! ..lazy') (function ((~ g!_) (~ g!_)) (~ expression))))))))) + (in (list (` ((,! ..lazy') (function ((, g!_) (, g!_)) (, expression))))))))) (def .public (equivalence (open "_#[0]")) (All (_ a) (-> (Equivalence a) (Equivalence (Lazy a)))) diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux index e703c718f..15daadb8b 100644 --- a/stdlib/source/library/lux/control/maybe.lux +++ b/stdlib/source/library/lux/control/maybe.lux @@ -130,13 +130,13 @@ (case tokens (pattern (.list else maybe)) (let [g!temp (is Code [location.dummy {.#Symbol ["" ""]}])] - {.#Right [state (.list (` (.case (~ maybe) - {.#Some (~ g!temp)} - (~ g!temp) + {.#Right [state (.list (` (.case (, maybe) + {.#Some (, g!temp)} + (, g!temp) ... {.#None} - (~ g!temp) - (~ else))))]}) + (, g!temp) + (, else))))]}) _ {.#Left "Wrong syntax for 'else'"}))) @@ -159,8 +159,8 @@ (macro (_ tokens state) (case tokens (pattern (.list test then)) - {.#Right [state (.list (` (.if (~ test) - (~ then) + {.#Right [state (.list (` (.if (, test) + (, then) {.#None})))]} _ diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux index cdd6589b8..b16b4a167 100644 --- a/stdlib/source/library/lux/control/pipe.lux +++ b/stdlib/source/library/lux/control/pipe.lux @@ -28,14 +28,14 @@ (syntax (_ [start <code>.any body ..body prev <code>.any]) - (in (list (` (|> (~ start) (~+ body))))))) + (in (list (` (|> (, start) (,* body))))))) (def .public let (syntax (_ [binding <code>.any body <code>.any prev <code>.any]) - (in (list (` (.let [(~ binding) (~ prev)] - (~ body))))))) + (in (list (` (.let [(, binding) (, prev)] + (, body))))))) (def _reversed_ (Parser Any) @@ -49,39 +49,39 @@ _ _reversed_ branches (<>.some (<>.and ..body ..body))]) (with_symbols [g!temp] - (in (list (` (.let [(~ g!temp) (~ prev)] - (.cond (~+ (monad.do list.monad + (in (list (` (.let [(, g!temp) (, prev)] + (.cond (,* (monad.do list.monad [[test then] branches] - (list (` (|> (~ g!temp) (~+ test))) - (` (|> (~ g!temp) (~+ then)))))) - (|> (~ g!temp) (~+ else)))))))))) + (list (` (|> (, g!temp) (,* test))) + (` (|> (, g!temp) (,* then)))))) + (|> (, g!temp) (,* else)))))))))) (def .public if (syntax (_ [test ..body then ..body else ..body prev <code>.any]) - (in (list (` (..cond [(~+ test)] [(~+ then)] - [(~+ else)] - (~ prev))))))) + (in (list (` (..cond [(,* test)] [(,* then)] + [(,* else)] + (, prev))))))) (def .public when (syntax (_ [test ..body then ..body prev <code>.any]) - (in (list (` (..cond [(~+ test)] [(~+ then)] + (in (list (` (..cond [(,* test)] [(,* then)] [] - (~ prev))))))) + (, prev))))))) (def .public while (syntax (_ [test ..body then ..body prev <code>.any]) (with_symbols [g!temp g!again] - (in (list (` (.loop ((~ g!again) [(~ g!temp) (~ prev)]) - (.if (|> (~ g!temp) (~+ test)) - ((~ g!again) (|> (~ g!temp) (~+ then))) - (~ g!temp))))))))) + (in (list (` (.loop ((, g!again) [(, g!temp) (, prev)]) + (.if (|> (, g!temp) (,* test)) + ((, g!again) (|> (, g!temp) (,* then))) + (, g!temp))))))))) (def .public do (syntax (_ [monad <code>.any @@ -92,11 +92,11 @@ (pattern (list.partial last_step prev_steps)) (.let [step_bindings (monad.do list.monad [step (list.reversed prev_steps)] - (list g!temp (` (|> (~ g!temp) (~+ step)))))] - (in (list (` ((~! monad.do) (~ monad) - [.let [(~ g!temp) (~ prev)] - (~+ step_bindings)] - (|> (~ g!temp) (~+ last_step))))))) + (list g!temp (` (|> (, g!temp) (,* step)))))] + (in (list (` ((,! monad.do) (, monad) + [.let [(, g!temp) (, prev)] + (,* step_bindings)] + (|> (, g!temp) (,* last_step))))))) _ (in (list prev)))))) @@ -105,22 +105,22 @@ (syntax (_ [body ..body prev <code>.any]) (with_symbols [g!temp] - (in (list (` (.let [(~ g!temp) (~ prev)] - (.exec (|> (~ g!temp) (~+ body)) - (~ g!temp))))))))) + (in (list (` (.let [(, g!temp) (, prev)] + (.exec (|> (, g!temp) (,* body)) + (, g!temp))))))))) (def .public tuple (syntax (_ [paths (<>.many ..body) prev <code>.any]) (with_symbols [g!temp] - (in (list (` (.let [(~ g!temp) (~ prev)] - [(~+ (list#each (function (_ body) (` (|> (~ g!temp) (~+ body)))) + (in (list (` (.let [(, g!temp) (, prev)] + [(,* (list#each (function (_ body) (` (|> (, g!temp) (,* body)))) paths))]))))))) (def .public case (syntax (_ [branches (<>.many (<>.and <code>.any <code>.any)) prev <code>.any]) - (in (list (` (.case (~ prev) - (~+ (|> branches + (in (list (` (.case (, prev) + (,* (|> branches (list#each (function (_ [pattern body]) (list pattern body))) list#conjoint)))))))) diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux index 227a7bd4b..5165e2800 100644 --- a/stdlib/source/library/lux/control/remember.lux +++ b/stdlib/source/library/lux/control/remember.lux @@ -70,9 +70,9 @@ (syntax (_ [deadline ..deadline message <code>.text focus (<>.maybe <code>.any)]) - (in (list (` (..remember (~ (code.text (%.date deadline))) - (~ (code.text (format <message> " " message))) - (~+ (case focus + (in (list (` (..remember (, (code.text (%.date deadline))) + (, (code.text (format <message> " " message))) + (,* (case focus {.#Some focus} (list focus) diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 2a8627855..1a2cb4ed3 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -52,15 +52,15 @@ .let [[name vars] declaration] g!brand (at ! each (|>> %.code code.text) (macro.symbol (format (%.symbol [this_module name])))) - .let [capability (` (..Capability (.Primitive (~ g!brand)) (~ input) (~ output)))]] - (in (list (` (type (~ export_policy) - (~ (|declaration|.format declaration)) - (~ capability))) - (` (def (~ (code.local forger)) - (All ((~ g!_) (~+ (list#each code.local vars))) - (-> (-> (~ input) (~ output)) - (~ capability))) - (~! ..capability))) + .let [capability (` (..Capability (.Primitive (, g!brand)) (, input) (, output)))]] + (in (list (` (type (, export_policy) + (, (|declaration|.format declaration)) + (, capability))) + (` (def (, (code.local forger)) + (All ((, g!_) (,* (list#each code.local vars))) + (-> (-> (, input) (, output)) + (, capability))) + (,! ..capability))) )))))) (def .public (async capability) diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux index 2aa55af59..58c895a05 100644 --- a/stdlib/source/library/lux/control/security/policy.lux +++ b/stdlib/source/library/lux/control/security/policy.lux @@ -56,13 +56,13 @@ (constructor (All (_ value) (Policy brand value label)))))) (def .public functor - (~ (..of_policy Functor)) + (, (..of_policy Functor)) (implementation (def (each f fa) (|> fa representation f abstraction)))) (def .public apply - (~ (..of_policy Apply)) + (, (..of_policy Apply)) (implementation (def functor ..functor) @@ -70,7 +70,7 @@ (abstraction ((representation ff) (representation fa)))))) (def .public monad - (~ (..of_policy Monad)) + (, (..of_policy Monad)) (implementation (def functor ..functor) (def in (|>> abstraction)) diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux index 794b00f7c..2e86903c7 100644 --- a/stdlib/source/library/lux/control/try.lux +++ b/stdlib/source/library/lux/control/try.lux @@ -135,20 +135,20 @@ {#Success value} {.#None} - {#Failure (`` (("lux in-module" (~~ (static .prelude)) .symbol#encoded) + {#Failure (`` (("lux in-module" (,, (static .prelude)) .symbol#encoded) (symbol ..of_maybe)))})) (def .public else (macro (_ tokens compiler) (case tokens (pattern (list else try)) - {#Success [compiler (list (` (case (~ try) - {..#Success (~' g!temp)} - (~' g!temp) + {#Success [compiler (list (` (case (, try) + {..#Success (,' g!temp)} + (,' g!temp) - ... {..#Failure (~' g!temp)} - (~' g!temp) - (~ else))))]} + ... {..#Failure (,' g!temp)} + (,' g!temp) + (, else))))]} _ {#Failure "Wrong syntax for 'else'"}))) @@ -159,9 +159,9 @@ (pattern (.list test then)) (let [code#encoded ("lux in-module" "library/lux" .code#encoded) text$ ("lux in-module" "library/lux" .text$)] - {.#Right [state (.list (` (.if (~ test) - (~ then) - {..#Failure (~ (text$ (all "lux text concat" + {.#Right [state (.list (` (.if (, test) + (, then) + {..#Failure (, (text$ (all "lux text concat" "[" (code#encoded (` .when)) "]" " " "Invalid condition:")))})))]}) diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux index afb711861..cd14464e8 100644 --- a/stdlib/source/library/lux/data/collection/dictionary.lux +++ b/stdlib/source/library/lux/data/collection/dictionary.lux @@ -289,7 +289,7 @@ (def (node#empty? node) (All (_ k v) (-> (Node k v) Bit)) (`` (case node - {#Base (~~ (static ..clean_bitmap)) _} + {#Base (,, (static ..clean_bitmap)) _} #1 _ diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux index aba1374d3..77729c0b3 100644 --- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux @@ -259,7 +259,7 @@ {.#Some root} (let [reference (the #key root)] - (`` (cond (~~ (with_template [<comp> <tag> <add>] + (`` (cond (,, (with_template [<comp> <tag> <add>] [(<comp> reference key) (let [side_root (the <tag> root) outcome (again side_root)] diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux index 478a3d6aa..176b9d9b4 100644 --- a/stdlib/source/library/lux/data/collection/list.lux +++ b/stdlib/source/library/lux/data/collection/list.lux @@ -79,7 +79,7 @@ (def wrong_syntax_error (template (_ <it>) - [((`` ("lux in-module" (~~ (static .prelude)) .wrong_syntax_error)) + [((`` ("lux in-module" (,, (static .prelude)) .wrong_syntax_error)) (symbol <it>))])) (def .public partial @@ -87,7 +87,7 @@ (case (reversed tokens) {.#Item tail heads} {.#Right [state (list (..mix (function (_ head tail) - (` {.#Item (~ head) (~ tail)})) + (` {.#Item (, head) (, tail)})) tail heads))]} @@ -401,9 +401,9 @@ (if (< x x') [{.#Item x' pre} post] [pre {.#Item x' post}])) - (`` [(is (~~ (type_of xs)) + (`` [(is (,, (type_of xs)) (list)) - (is (~~ (type_of xs)) + (is (,, (type_of xs)) (list))]) xs')] (.all composite (sorted < pre) (list x) (sorted < post))))) @@ -481,29 +481,29 @@ (let [(open "[0]") ..functor indices (..indices num_lists) type_vars (is (List Code) (each (|>> nat#encoded symbol$) indices)) - zipped_type (` (.All ((~ (symbol$ "0_")) (~+ type_vars)) - (-> (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var))))) + zipped_type (` (.All ((, (symbol$ "0_")) (,* type_vars)) + (-> (,* (each (is (-> Code Code) (function (_ var) (` (List (, var))))) type_vars)) - (List [(~+ type_vars)])))) + (List [(,* type_vars)])))) vars+lists (|> indices (each ++) (each (function (_ idx) (let [base (nat#encoded idx)] [(symbol$ base) (symbol$ ("lux text concat" base "'"))])))) - pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)})) + pattern (` [(,* (each (function (_ [v vs]) (` {.#Item (, v) (, vs)})) vars+lists))]) g!step (symbol$ "0step0") g!blank (symbol$ "0,0") list_vars (each product.right vars+lists) - code (` (is (~ zipped_type) - (function ((~ g!step) (~+ list_vars)) - (case [(~+ list_vars)] - (~ pattern) - {.#Item [(~+ (each product.left vars+lists))] - ((~ g!step) (~+ list_vars))} - - (~ g!blank) + code (` (is (, zipped_type) + (function ((, g!step) (,* list_vars)) + (case [(,* list_vars)] + (, pattern) + {.#Item [(,* (each product.left vars+lists))] + ((, g!step) (,* list_vars))} + + (, g!blank) {.#End}))))] {.#Right [state (list code)]}) {.#Left "Cannot zipped 0 lists."}) @@ -524,30 +524,30 @@ g!return_type (symbol$ "0return_type0") g!func (symbol$ "0func0") type_vars (is (List Code) (each (|>> nat#encoded symbol$) indices)) - zipped_type (` (All ((~ (symbol$ "0_")) (~+ type_vars) (~ g!return_type)) - (-> (-> (~+ type_vars) (~ g!return_type)) - (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var))))) + zipped_type (` (All ((, (symbol$ "0_")) (,* type_vars) (, g!return_type)) + (-> (-> (,* type_vars) (, g!return_type)) + (,* (each (is (-> Code Code) (function (_ var) (` (List (, var))))) type_vars)) - (List (~ g!return_type))))) + (List (, g!return_type))))) vars+lists (|> indices (each ++) (each (function (_ idx) (let [base (nat#encoded idx)] [(symbol$ base) (symbol$ ("lux text concat" base "'"))])))) - pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)})) + pattern (` [(,* (each (function (_ [v vs]) (` {.#Item (, v) (, vs)})) vars+lists))]) g!step (symbol$ "0step0") g!blank (symbol$ "0,0") list_vars (each product.right vars+lists) - code (` (is (~ zipped_type) - (function ((~ g!step) (~ g!func) (~+ list_vars)) - (case [(~+ list_vars)] - (~ pattern) - {.#Item ((~ g!func) (~+ (each product.left vars+lists))) - ((~ g!step) (~ g!func) (~+ list_vars))} - - (~ g!blank) + code (` (is (, zipped_type) + (function ((, g!step) (, g!func) (,* list_vars)) + (case [(,* list_vars)] + (, pattern) + {.#Item ((, g!func) (,* (each product.left vars+lists))) + ((, g!step) (, g!func) (,* list_vars))} + + (, g!blank) {.#End}))))] {.#Right [state (list code)]}) {.#Left "Cannot zipped_with 0 lists."}) @@ -631,8 +631,8 @@ (macro (_ tokens state) (case tokens (pattern (.list test then)) - {.#Right [state (.list (` (.if (~ test) - (~ then) + {.#Right [state (.list (` (.if (, test) + (, then) (.list))))]} _ diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 77873fa40..93bea49d4 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -227,7 +227,7 @@ ... If so, a brand-new root must be established, that is ... 1-level taller. (|> sequence - (.has #root (|> (`` (is (Hierarchy (~~ (type_of val))) + (.has #root (|> (`` (is (Hierarchy (,, (type_of val))) (empty_hierarchy []))) (array.has! 0 {#Hierarchy (the #root sequence)}) (array.has! 1 (..path (the #level sequence) (the #tail sequence))))) @@ -293,8 +293,8 @@ {try.#Success (if (n.< (tail_off sequence_size) idx) (.revised #root (hierarchy#has (the #level sequence) idx val) sequence) - (.revised #tail (`` (is (-> (Base (~~ (type_of val))) - (Base (~~ (type_of val)))) + (.revised #tail (`` (is (-> (Base (,, (type_of val))) + (Base (,, (type_of val)))) (|>> array.clone (array.has! (branch_idx idx) val)))) sequence))} (exception.except ..index_out_of_bounds [sequence idx])))) @@ -369,7 +369,7 @@ (def .public sequence (syntax (_ [elems (<>.some <code>.any)]) - (in (.list (` (..of_list (.list (~+ elems)))))))) + (in (.list (` (..of_list (.list (,* elems)))))))) (def (node_equivalence //#=) (All (_ a) (-> (Equivalence a) (Equivalence (Node a)))) diff --git a/stdlib/source/library/lux/data/collection/stream.lux b/stdlib/source/library/lux/data/collection/stream.lux index 3c41ccda0..67708962c 100644 --- a/stdlib/source/library/lux/data/collection/stream.lux +++ b/stdlib/source/library/lux/data/collection/stream.lux @@ -133,10 +133,10 @@ body <code>.any branches (<>.some <code>.any)]) (with_symbols [g!stream] - (let [body+ (` (let [(~+ (|> patterns + (let [body+ (` (let [(,* (|> patterns (list#each (function (_ pattern) - (list (` [(~ pattern) (~ g!stream)]) - (` ((~! //.result) (~ g!stream)))))) + (list (` [(, pattern) (, g!stream)]) + (` ((,! //.result) (, g!stream)))))) list#conjoint))] - (~ body)))] + (, body)))] (in (list.partial g!stream body+ branches)))))) diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux index 2e7c7b59d..7bde19f24 100644 --- a/stdlib/source/library/lux/data/collection/tree.lux +++ b/stdlib/source/library/lux/data/collection/tree.lux @@ -58,8 +58,8 @@ (def .public tree (syntax (_ [root tree^]) (in (list (loop (again [[value children] root]) - (` [#value (~ value) - #children (list (~+ (list#each again children)))])))))) + (` [#value (, value) + #children (list (,* (list#each again children)))])))))) (def .public (equivalence super) (All (_ a) (-> (Equivalence a) (Equivalence (Tree a)))) diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux index cf0d3423a..1ddfdfebd 100644 --- a/stdlib/source/library/lux/data/format/css/class.lux +++ b/stdlib/source/library/lux/data/format/css/class.lux @@ -30,6 +30,6 @@ (do meta.monad [module meta.current_module_name class meta.seed] - (in (list (` (..custom (~ (code.text (format "c" (%.nat_16 class) + (in (list (` (..custom (, (code.text (format "c" (%.nat_16 class) "_" (%.nat_16 (text#hash module)))))))))))) ) diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux index ee61013bf..45746b427 100644 --- a/stdlib/source/library/lux/data/format/css/id.lux +++ b/stdlib/source/library/lux/data/format/css/id.lux @@ -30,6 +30,6 @@ (do meta.monad [module meta.current_module_name id meta.seed] - (in (list (` (..custom (~ (code.text (format "i" (%.nat_16 id) + (in (list (` (..custom (, (code.text (format "i" (%.nat_16 id) "_" (%.nat_16 (text#hash module)))))))))))) ) diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux index 1a3b8ee02..353efa6c5 100644 --- a/stdlib/source/library/lux/data/format/css/property.lux +++ b/stdlib/source/library/lux/data/format/css/property.lux @@ -71,11 +71,11 @@ (Property <brand>) (abstraction <property>))] - (~~ (template.spliced <alias>+)))) + (,, (template.spliced <alias>+)))) (with_expansions [<rows> (template.spliced <property>+)] (with_template [<property>] - [(`` (def .public (~~ (text_symbol <property>)) + [(`` (def .public (,, (text_symbol <property>)) (Property <brand>) (abstraction <property>)))] diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux index d3edc6d31..859eb7910 100644 --- a/stdlib/source/library/lux/data/format/css/query.lux +++ b/stdlib/source/library/lux/data/format/css/query.lux @@ -32,7 +32,7 @@ (|>> representation)) (with_template [<media>] - [(`` (def .public (~~ (text_symbol <media>)) + [(`` (def .public (,, (text_symbol <media>)) Media (abstraction <media>)))] @@ -50,7 +50,7 @@ (|>> representation)) (with_template [<feature> <brand>] - [(`` (def .public ((~~ (text_symbol <feature>)) input) + [(`` (def .public ((,, (text_symbol <feature>)) input) (-> (Value <brand>) Feature) (abstraction (format "(" <feature> ": " (//value.value input) ")"))))] diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux index 1e8d3e0b9..a994398fd 100644 --- a/stdlib/source/library/lux/data/format/css/selector.lux +++ b/stdlib/source/library/lux/data/format/css/selector.lux @@ -68,7 +68,7 @@ <combinator> (representation right))))] - (~~ (template.spliced <combinator>+))))] + (,, (template.spliced <combinator>+))))] [Can_Chain (Generic Any) [["" and]]] @@ -113,7 +113,7 @@ (Selector <kind>) (abstraction <pseudo>))] - (~~ (template.spliced <pseudo>+))))] + (,, (template.spliced <pseudo>+))))] [Can_Chain [[active ":active"] diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index d4732c5da..877e4f8e6 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -45,7 +45,7 @@ (`` (with_template [<name> <value>] [(def .public <name> <abstraction> (abstraction <value>))] - (~~ (template.spliced <sample>+)) + (,, (template.spliced <sample>+)) )) (template.spliced <definition>+))])) @@ -94,11 +94,11 @@ (Value <brand>) (abstraction <value>))] - (~~ (template.spliced <alias>+)))) + (,, (template.spliced <alias>+)))) (with_expansions [<rows> (template.spliced <value>+)] (with_template [<value>] - [(`` (def .public (~~ (..text_symbol <value>)) + [(`` (def .public (,, (..text_symbol <value>)) (Value <brand>) (abstraction <value>)))] @@ -990,7 +990,7 @@ (-> <input> (Value Filter)) (|>> <pre> (list) (..apply <function>)))] - (~~ (template.spliced <function>+))))] + (,, (template.spliced <function>+))))] [Nat (<| representation ..px n.frac) [[blur "blur"]]] @@ -1115,7 +1115,7 @@ (def .public (clip rectangle) (-> Rectangle (Value Clip)) - (`` (..apply "rect" (list (~~ (with_template [<side>] + (`` (..apply "rect" (list (,, (with_template [<side>] [(representation (the <side> rectangle))] [#top] [#right] [#bottom] [#left])))))) @@ -1260,9 +1260,9 @@ (..apply "matrix3d"))) (with_template [<name> <function> <input_types> <input_values>] - [(`` (def .public (<name> [(~~ (template.spliced <input_values>))]) - (-> [(~~ (template.spliced <input_types>))] (Value Transform)) - (|> (list (~~ (template.spliced <input_values>))) + [(`` (def .public (<name> [(,, (template.spliced <input_values>))]) + (-> [(,, (template.spliced <input_types>))] (Value Transform)) + (|> (list (,, (template.spliced <input_values>))) (list#each %number) (..apply <function>))))] @@ -1282,9 +1282,9 @@ ) (with_template [<name> <function> <input_types> <input_values>] - [(`` (def .public (<name> [(~~ (template.spliced <input_values>))]) - (-> [(~~ (template.spliced <input_types>))] (Value Transform)) - (|> (list (~~ (template.spliced <input_values>))) + [(`` (def .public (<name> [(,, (template.spliced <input_values>))]) + (-> [(,, (template.spliced <input_types>))] (Value Transform)) + (|> (list (,, (template.spliced <input_values>))) (list#each ..angle) (..apply <function>))))] diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux index d6560ccfe..ba8f5ab31 100644 --- a/stdlib/source/library/lux/data/format/html.lux +++ b/stdlib/source/library/lux/data/format/html.lux @@ -109,7 +109,7 @@ [(primitive <sub_raw> Any) (type .public <sub> (HTML (<super_raw> <sub_raw>)))] - (~~ (template.spliced <sub>+))))] + (,, (template.spliced <sub>+))))] [Element Element' [[Content Content'] diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index d419ac68f..1af453bb9 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -104,28 +104,28 @@ (^.with_template [<ctor> <input_tag> <output_tag>] [{<input_tag> value} - (` {<output_tag> (~ (<ctor> value))})]) + (` {<output_tag> (, (<ctor> value))})]) ([code.bit ..#Boolean' ..#Boolean] [code.frac ..#Number' ..#Number] [code.text ..#String' ..#String]) {#Array' members} - (` {..#Array ((~! sequence.sequence) (~+ (sequence.list (sequence#each jsonF members))))}) + (` {..#Array ((,! sequence.sequence) (,* (sequence.list (sequence#each jsonF members))))}) {#Object' pairs} - (` {..#Object ((~! dictionary.of_list) - (~! text.hash) - (list (~+ (|> pairs + (` {..#Object ((,! dictionary.of_list) + (,! text.hash) + (list (,* (|> pairs dictionary.entries (list#each (function (_ [key_name value]) - (` [(~ (code.text key_name)) (~ (jsonF value))])))))))}) + (` [(, (code.text key_name)) (, (jsonF value))])))))))}) {#Code' code} code)) (def .public json (syntax (_ [token ..jsonP]) - (in (list (` (is JSON (~ (jsonF token)))))))) + (in (list (` (is JSON (, (jsonF token)))))))) (def .public (fields json) (-> JSON (Try (List String))) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index e0ed3924f..38746e8eb 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -126,12 +126,12 @@ (Parser Any) (do <>.monad [pre_end <binary>.bits_8 - _ (let [expected (`` (char (~~ (static ..blank))))] + _ (let [expected (`` (char (,, (static ..blank))))] (<>.assertion (exception.error ..wrong_character [expected pre_end]) (n.= expected pre_end))) end <binary>.bits_8 - _ (let [expected (`` (char (~~ (static ..null))))] + _ (let [expected (`` (char (,, (static ..null))))] (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end)))] (in []))) @@ -153,7 +153,7 @@ [digits (<binary>.segment ..big_size) digits (<>.lifted (at utf8.codec decoded digits)) end <binary>.bits_8 - _ (let [expected (`` (char (~~ (static ..blank))))] + _ (let [expected (`` (char (,, (static ..blank))))] (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end)))] (<>.lifted @@ -243,7 +243,7 @@ 0 (at utf8.codec encoded "") _ (let [last_char (binary!.bits_8 end string)] (`` (case (.nat last_char) - (pattern (char (~~ (static ..null)))) + (pattern (char (,, (static ..null)))) (again (-- end)) _ @@ -288,7 +288,7 @@ (do <>.monad [string (<binary>.segment <size>) end <binary>.bits_8 - .let [expected (`` (char (~~ (static ..null))))] + .let [expected (`` (char (,, (static ..null))))] _ (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end))] (<>.lifted @@ -330,7 +330,7 @@ (do <>.monad [string (<binary>.segment ..magic_size) end <binary>.bits_8 - .let [expected (`` (char (~~ (static ..null))))] + .let [expected (`` (char (,, (static ..null))))] _ (<>.assertion (exception.error ..wrong_character [expected end]) (n.= expected end))] (<>.lifted diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index 7bf3cd997..3ab11ff3a 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -188,11 +188,11 @@ (macro (_ tokens lux) (case tokens (pattern (list it)) - {.#Right [lux (list (` (.case ("js type-of" ("js constant" (~ it))) + {.#Right [lux (list (` (.case ("js type-of" ("js constant" (, it))) "undefined" .false - (~' _) + (,' _) .true)))]} _ @@ -338,7 +338,7 @@ (def .public (space? char) (-> Char Bit) (with_expansions [<options> (with_template [<char>] - [(pattern (.char (~~ (static <char>))))] + [(pattern (.char (,, (static <char>))))] [..tab] [..vertical_tab] diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index 39fb077d0..674a53f67 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -82,7 +82,7 @@ (-> Text (Parser Code)) (do <>.monad [symbol (<text>.enclosed ["\@<" ">"] (symbol^ current_module))] - (in (` (is ((~! <text>.Parser) Text) (~ (code.symbol symbol))))))) + (in (` (is ((,! <text>.Parser) Text) (, (code.symbol symbol))))))) (def re_range^ (Parser Code) @@ -90,19 +90,19 @@ [from (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted))) _ (<text>.this "-") to (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted)))] - (in (` ((~! <text>.range) (~ (code.nat from)) (~ (code.nat to))))))) + (in (` ((,! <text>.range) (, (code.nat from)) (, (code.nat to))))))) (def re_char^ (Parser Code) (do <>.monad [char escaped_char^] - (in (` ((~! ..copy) (~ (code.text char))))))) + (in (` ((,! ..copy) (, (code.text char))))))) (def re_options^ (Parser Code) (do <>.monad [options (<text>.many escaped_char^)] - (in (` ((~! <text>.one_of) (~ (code.text options))))))) + (in (` ((,! <text>.one_of) (, (code.text options))))))) (def re_user_class^' (Parser Code) @@ -112,8 +112,8 @@ re_range^ re_options^))] (in (case negate? - {.#Some _} (` ((~! <text>.not) (all ((~! <>.either)) (~+ parts)))) - {.#None} (` (all ((~! <>.either)) (~+ parts))))))) + {.#Some _} (` ((,! <text>.not) (all ((,! <>.either)) (,* parts)))) + {.#None} (` (all ((,! <>.either)) (,* parts))))))) (def re_user_class^ (Parser Code) @@ -123,7 +123,7 @@ (<text>.enclosed ["[" "]"] ..re_user_class^')))] (in (list#mix (function (_ refinement base) - (` ((~! refine^) (~ refinement) (~ base)))) + (` ((,! refine^) (, refinement) (, base)))) init rest)))) @@ -159,28 +159,28 @@ (do <>.monad [] (all <>.either - (<>.after (<text>.this ".") (in (` (~! <text>.any)))) - (<>.after (<text>.this "\d") (in (` (~! <text>.decimal)))) - (<>.after (<text>.this "\D") (in (` ((~! <text>.not) (~! <text>.decimal))))) - (<>.after (<text>.this "\s") (in (` (~! <text>.space)))) - (<>.after (<text>.this "\S") (in (` ((~! <text>.not) (~! <text>.space))))) - (<>.after (<text>.this "\w") (in (` (~! word^)))) - (<>.after (<text>.this "\W") (in (` ((~! <text>.not) (~! word^))))) - - (<>.after (<text>.this "\p{Lower}") (in (` (~! <text>.lower)))) - (<>.after (<text>.this "\p{Upper}") (in (` (~! <text>.upper)))) - (<>.after (<text>.this "\p{Alpha}") (in (` (~! <text>.alpha)))) - (<>.after (<text>.this "\p{Digit}") (in (` (~! <text>.decimal)))) - (<>.after (<text>.this "\p{Alnum}") (in (` (~! <text>.alpha_num)))) - (<>.after (<text>.this "\p{Space}") (in (` (~! <text>.space)))) - (<>.after (<text>.this "\p{HexDigit}") (in (` (~! <text>.hexadecimal)))) - (<>.after (<text>.this "\p{OctDigit}") (in (` (~! <text>.octal)))) - (<>.after (<text>.this "\p{Blank}") (in (` (~! blank^)))) - (<>.after (<text>.this "\p{ASCII}") (in (` (~! ascii^)))) - (<>.after (<text>.this "\p{Contrl}") (in (` (~! control^)))) - (<>.after (<text>.this "\p{Punct}") (in (` (~! punct^)))) - (<>.after (<text>.this "\p{Graph}") (in (` (~! graph^)))) - (<>.after (<text>.this "\p{Print}") (in (` (~! print^)))) + (<>.after (<text>.this ".") (in (` (,! <text>.any)))) + (<>.after (<text>.this "\d") (in (` (,! <text>.decimal)))) + (<>.after (<text>.this "\D") (in (` ((,! <text>.not) (,! <text>.decimal))))) + (<>.after (<text>.this "\s") (in (` (,! <text>.space)))) + (<>.after (<text>.this "\S") (in (` ((,! <text>.not) (,! <text>.space))))) + (<>.after (<text>.this "\w") (in (` (,! word^)))) + (<>.after (<text>.this "\W") (in (` ((,! <text>.not) (,! word^))))) + + (<>.after (<text>.this "\p{Lower}") (in (` (,! <text>.lower)))) + (<>.after (<text>.this "\p{Upper}") (in (` (,! <text>.upper)))) + (<>.after (<text>.this "\p{Alpha}") (in (` (,! <text>.alpha)))) + (<>.after (<text>.this "\p{Digit}") (in (` (,! <text>.decimal)))) + (<>.after (<text>.this "\p{Alnum}") (in (` (,! <text>.alpha_num)))) + (<>.after (<text>.this "\p{Space}") (in (` (,! <text>.space)))) + (<>.after (<text>.this "\p{HexDigit}") (in (` (,! <text>.hexadecimal)))) + (<>.after (<text>.this "\p{OctDigit}") (in (` (,! <text>.octal)))) + (<>.after (<text>.this "\p{Blank}") (in (` (,! blank^)))) + (<>.after (<text>.this "\p{ASCII}") (in (` (,! ascii^)))) + (<>.after (<text>.this "\p{Contrl}") (in (` (,! control^)))) + (<>.after (<text>.this "\p{Punct}") (in (` (,! punct^)))) + (<>.after (<text>.this "\p{Graph}") (in (` (,! graph^)))) + (<>.after (<text>.this "\p{Print}") (in (` (,! print^)))) ))) (def re_class^ @@ -198,12 +198,12 @@ (<>.either (do <>.monad [_ (<text>.this "\") id number^] - (in (` ((~! ..copy) (~ (code.symbol ["" (n#encoded id)])))))) + (in (` ((,! ..copy) (, (code.symbol ["" (n#encoded id)])))))) (do <>.monad [_ (<text>.this "\k<") captured_symbol symbol_part^ _ (<text>.this ">")] - (in (` ((~! ..copy) (~ (code.symbol ["" captured_symbol])))))))) + (in (` ((,! ..copy) (, (code.symbol ["" captured_symbol])))))))) (def (re_simple^ current_module) (-> Text (Parser Code)) @@ -221,14 +221,14 @@ quantifier (<text>.one_of "?*+")] (case quantifier "?" - (in (` ((~! <>.else) "" (~ base)))) + (in (` ((,! <>.else) "" (, base)))) "*" - (in (` ((~! together^) ((~! <>.some) (~ base))))) + (in (` ((,! together^) ((,! <>.some) (, base))))) ... "+" _ - (in (` ((~! together^) ((~! <>.many) (~ base))))) + (in (` ((,! together^) ((,! <>.many) (, base))))) ))) (exception .public (incorrect_quantification [from Nat @@ -247,19 +247,19 @@ [[from to] (<>.and number^ (<>.after (<text>.this ",") number^)) _ (<>.assertion (exception.error ..incorrect_quantification [from to]) (n.<= to from))] - (in (` ((~! together^) ((~! <>.between) - (~ (code.nat from)) - (~ (code.nat (n.- from to))) - (~ base)))))) + (in (` ((,! together^) ((,! <>.between) + (, (code.nat from)) + (, (code.nat (n.- from to))) + (, base)))))) (do ! [limit (<>.after (<text>.this ",") number^)] - (in (` ((~! together^) ((~! <>.at_most) (~ (code.nat limit)) (~ base)))))) + (in (` ((,! together^) ((,! <>.at_most) (, (code.nat limit)) (, base)))))) (do ! [limit (<>.before (<text>.this ",") number^)] - (in (` ((~! together^) ((~! <>.at_least) (~ (code.nat limit)) (~ base)))))) + (in (` ((,! together^) ((,! <>.at_least) (, (code.nat limit)) (, base)))))) (do ! [limit number^] - (in (` ((~! together^) ((~! <>.exactly) (~ (code.nat limit)) (~ base)))))))))) + (in (` ((,! together^) ((,! <>.exactly) (, (code.nat limit)) (, base)))))))))) (def (re_quantified^ current_module) (-> Text (Parser Code)) @@ -297,7 +297,7 @@ [idx names (list.partial (list g!temp complex - (` .let) (` [(~ g!total) (at (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))])) + (` .let) (` [(, g!total) (at (,! //.monoid) (,' composite) (, g!total) (, g!temp))])) steps)] {.#Right [{#Capturing [?name num_captures]} scoped]} @@ -308,12 +308,12 @@ {.#None} [(++ idx) (code.symbol ["" (n#encoded idx)])]) access (if (n.> 0 num_captures) - (` ((~! product.left) (~ name!))) + (` ((,! product.left) (, name!))) name!)] [idx! (list.partial name! names) (list.partial (list name! scoped - (` .let) (` [(~ g!total) (at (~! //.monoid) (~' composite) (~ g!total) (~ access))])) + (` .let) (` [(, g!total) (at (,! //.monoid) (,' composite) (, g!total) (, access))])) steps)]) ))) [0 @@ -323,10 +323,10 @@ (in [(if capturing? (list.size names) 0) - (` ((~! do) (~! <>.monad) - [.let [(~ g!total) ""] - (~+ (|> steps list.reversed list#conjoint))] - ((~ (' in)) [(~ g!total) (~+ (list.reversed names))])))]) + (` ((,! do) (,! <>.monad) + [.let [(, g!total) ""] + (,* (|> steps list.reversed list#conjoint))] + ((, (' in)) [(, g!total) (,* (list.reversed names))])))]) )) (def (unflatten^ lexer) @@ -367,7 +367,7 @@ (-> [Nat Code] Code) (if (n.> 0 num_captures) alt - (` ((~! unflatten^) (~ alt))))) + (` ((,! unflatten^) (, alt))))) (def (re_alternative^ capturing? re_scoped^ current_module) (-> Bit @@ -381,11 +381,11 @@ (if (list.empty? tail) (in head) (in [(list#mix n.max (product.left head) (list#each product.left tail)) - (` (all ((~ (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])) @@ -433,8 +433,8 @@ body <code>.any branches (<>.many <code>.any)]) (with_symbols [g!temp] - (in (list.partial (` (^.multi (~ g!temp) - [((~! <text>.result) (..regex (~ (code.text pattern))) (~ g!temp)) - {try.#Success (~ (maybe.else g!temp bindings))}])) + (in (list.partial (` (^.multi (, g!temp) + [((,! <text>.result) (..regex (, (code.text pattern))) (, g!temp)) + {try.#Success (, (maybe.else g!temp bindings))}])) body branches))))) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 217cb3947..6813e7cc2 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -135,8 +135,8 @@ (def (tuple_inspection inspection) (-> Inspector Inspector) - (with_expansions [<adaption> (for @.lua (~~ (these ..tuple_array)) - (~~ (these)))] + (with_expansions [<adaption> (for @.lua (,, (these ..tuple_array)) + (,, (these)))] (`` (|>> (as (array.Array Any)) <adaption> (array.list {.#None}) @@ -147,10 +147,10 @@ (def .public (inspection value) Inspector (with_expansions [<jvm> (let [object (as java/lang/Object value)] - (`` (<| (~~ (with_template [<class> <processing>] + (`` (<| (,, (with_template [<class> <processing>] [(case (ffi.as <class> object) {.#Some value} - (`` (|> value (~~ (template.spliced <processing>)))) + (`` (|> value (,, (template.spliced <processing>)))) {.#None})] @@ -187,7 +187,7 @@ (case (ffi.type_of value) (^.with_template [<type_of> <then>] [<type_of> - (`` (|> value (~~ (template.spliced <then>))))]) + (`` (|> value (,, (template.spliced <then>))))]) (["boolean" [(as .Bit) %.bit]] ["number" [(as .Frac) %.frac]] ["string" [(as .Text) %.text]] @@ -222,7 +222,7 @@ (case (..str (..type value)) (^.with_template [<type_of> <class_of> <then>] [(^.or <type_of> <class_of>) - (`` (|> value (~~ (template.spliced <then>))))]) + (`` (|> value (,, (template.spliced <then>))))]) (["<type 'bool'>" "<class 'bool'>" [(as .Bit) %.bit]] ["<type 'int'>" "<class 'int'>" [(as .Int) %.int]] ["<type 'float'>" "<class 'float'>" [(as .Frac) %.frac]] @@ -254,7 +254,7 @@ (case (..type value) (^.with_template [<type_of> <then>] [<type_of> - (`` (|> value (~~ (template.spliced <then>))))]) + (`` (|> value (,, (template.spliced <then>))))]) (["boolean" [(as .Bit) %.bit]] ["string" [(as .Text) %.text]] ["nil" [(pipe.new "nil" [])]]) @@ -293,7 +293,7 @@ (as ..Object) Object::to_s)]] (let [value_class (class_of value)] - (`` (cond (~~ (with_template [<literal> <type> <format>] + (`` (cond (,, (with_template [<literal> <type> <format>] [(same? (class_of <literal>) value_class) (|> value (as <type>) <format>)] @@ -327,7 +327,7 @@ (case (..gettype value) (^.with_template [<type_of> <then>] [<type_of> - (`` (|> value (~~ (template.spliced <then>))))]) + (`` (|> value (,, (template.spliced <then>))))]) (["boolean" [(as .Bit) %.bit]] ["integer" [(as .Int) %.int]] ["double" [(as .Frac) %.frac]] @@ -351,9 +351,9 @@ (..strval value)) @.scheme - (`` (cond (~~ (with_template [<when> <then>] + (`` (cond (,, (with_template [<when> <then>] [(<when> value) - (`` (|> value (~~ (template.spliced <then>))))] + (`` (|> value (,, (template.spliced <then>))))] [..boolean? [(as .Bit) %.bit]] [..integer? [(as .Int) %.int]] @@ -395,7 +395,7 @@ [_ (<type>.exactly Any)] (in (function.constant "[]"))) - (~~ (with_template [<type> <formatter>] + (,, (with_template [<type> <formatter>] [(do <>.monad [_ (<type>.sub <type>)] (in (|>> (as <type>) <formatter>)))] @@ -411,7 +411,7 @@ (def (special_representation representation) (-> (Parser Representation) (Parser Representation)) (`` (all <>.either - (~~ (with_template [<type> <formatter>] + (,, (with_template [<type> <formatter>] [(do <>.monad [_ (<type>.sub <type>)] (in (|>> (as <type>) <formatter>)))] @@ -527,8 +527,8 @@ (syntax (_ [definition <code>.symbol]) (let [[module _] definition] (in (list (` ("lux in-module" - (~ (code.text module)) - (~ (code.symbol definition))))))))) + (, (code.text module)) + (, (code.symbol definition))))))))) (def .public (log! message) (-> Text Any) @@ -590,16 +590,16 @@ (function.constant (exception.except ..unknown_local_binding [name])))) targets)))] (in (list (` (..log! ("lux text concat" - (~ (code.text (%.format (%.location location) text.new_line))) - ((~! exception.report) - (~+ (|> targets + (, (code.text (%.format (%.location location) text.new_line))) + ((,! exception.report) + (,* (|> targets (list#each (function (_ [name format]) (let [format (case format {.#None} - (` (~! ..inspection)) + (` (,! ..inspection)) {.#Some format} format)] (list (code.text name) - (` ((~ format) (~ (code.local name)))))))) + (` ((, format) (, (code.local name)))))))) list#conjoint))))))))))) diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 1aaf71e5c..128cf5780 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -104,7 +104,7 @@ (^.with_template [<tag> <format>] [[new_location {<tag> value}] - (let [documentation (`` (|> value (~~ (template.spliced <format>))))] + (let [documentation (`` (|> value (,, (template.spliced <format>))))] [(revised .#column (n.+ (text.size documentation)) new_location) (format (padding reference_column old_location new_location) documentation)])]) @@ -505,66 +505,66 @@ [.let [g!module (code.text (product.left name))] [[_ def_type def_value]] (meta.export name) tags (meta.tags_of name)] - (with_expansions [<\n> (~! text.\n)] + (with_expansions [<\n> (,! text.\n)] (macro.with_symbols [g!type] - (in (list (` (all ((~! md.then)) + (in (list (` (all ((,! md.then)) ... Name - (<| ((~! md.heading/3)) - (~ (code.text (%.code (let [g!name (|> name product.right code.local)] + (<| ((,! 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)))))))))) + (` ((, 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)) + (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 + ((,! 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))) + ((,! %.format) + ((,! ..single_line_comment) ((,! ..type) (, g!module) (, g!type))) <\n>))) - (` ((~! ..type) (~ g!module) (~ g!type)))))))) + (` ((,! ..type) (, g!module) (, g!type)))))))) )))))))) (def definition_documentation (syntax (_ [[name parameters] ..declaration description ..description examples (<>.some ..example)]) - (with_expansions [<\n> (~! text.\n)] - (in (list (` (all ((~! md.then)) - ((~! ..minimal_definition_documentation) - ((~ (code.symbol name)) - (~+ (list#each code.local parameters)))) + (with_expansions [<\n> (,! text.\n)] + (in (list (` (all ((,! md.then)) + ((,! ..minimal_definition_documentation) + ((, (code.symbol name)) + (,* (list#each code.local parameters)))) ... Description - (~+ (case description + (,* (case description {.#Some description} - (list (` (<| ((~! md.paragraph)) - ((~! md.text)) - (~ description)))) + (list (` (<| ((,! md.paragraph)) + ((,! md.text)) + (, description)))) {.#None} (list))) ... Examples - (~+ (case examples + (,* (case examples {.#End} (list) _ - (list (` (<| ((~! md.code) "clojure") - ((~! %.format) - (~+ (|> examples + (list (` (<| ((,! md.code) "clojure") + ((,! %.format) + (,* (|> examples (list#each (..example_documentation (product.left name))) (list.interposed ..example_separator)))))))))) )))))) @@ -585,27 +585,27 @@ (syntax (_ [[name parameters] ..declaration]) (macro.with_symbols [g!_] (let [[_ short] name] - (in (list (` (.let [(~ g!_) (.is (.-> .Any (.List ..Definition)) - (.function ((~ g!_) (~ g!_)) - (.list [..#definition (~ (code.text short)) - ..#documentation ((~! ..minimal_definition_documentation) - ((~ (code.symbol name)) - (~+ (list#each code.local parameters))))])))] - ((~ g!_) []))))))))) + (in (list (` (.let [(, g!_) (.is (.-> .Any (.List ..Definition)) + (.function ((, g!_) (, g!_)) + (.list [..#definition (, (code.text short)) + ..#documentation ((,! ..minimal_definition_documentation) + ((, (code.symbol name)) + (,* (list#each code.local parameters))))])))] + ((, g!_) []))))))))) (def .public documentation (syntax (_ [[name parameters] ..declaration extra (<>.some <code>.any)]) (macro.with_symbols [g!_] (let [[_ short] name] - (in (list (` (.let [(~ g!_) (.is (.-> .Any (.List ..Definition)) - (.function ((~ g!_) (~ g!_)) - (.list [..#definition (~ (code.text short)) - ..#documentation ((~! ..definition_documentation) - ((~ (code.symbol name)) - (~+ (list#each code.local parameters))) - (~+ extra))])))] - ((~ g!_) []))))))))) + (in (list (` (.let [(, g!_) (.is (.-> .Any (.List ..Definition)) + (.function ((, g!_) (, g!_)) + (.list [..#definition (, (code.text short)) + ..#documentation ((,! ..definition_documentation) + ((, (code.symbol name)) + (,* (list#each code.local parameters))) + (,* extra))])))] + ((, g!_) []))))))))) (def definitions_documentation (-> (List Definition) (Markdown Block)) @@ -640,17 +640,17 @@ (do meta.monad [expected (meta.exports name)] (in (list (` (is (List Module) - ((~! list.partial) [..#module (~ (code.text name)) - ..#description (~ description) - ..#expected ((~! ..expected) - (~ (code.text (|> expected + ((,! list.partial) [..#module (, (code.text name)) + ..#description (, description) + ..#expected ((,! ..expected) + (, (code.text (|> expected (list#each product.left) ..expected_format)))) - ..#definitions ((~! list.together) (list (~+ definitions)))] - (all (at (~! list.monoid) (~' composite)) + ..#definitions ((,! list.together) (list (,* definitions)))] + (all (at (,! list.monoid) (,' composite)) (is (List Module) - (at (~! list.monoid) (~' identity))) - (~+ subs)))))))))) + (at (,! list.monoid) (,' identity))) + (,* subs)))))))))) (def listing (-> (List Text) (Markdown Block)) diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux index abd125701..de3c150af 100644 --- a/stdlib/source/library/lux/extension.lux +++ b/stdlib/source/library/lux/extension.lux @@ -49,19 +49,19 @@ g!phase (code.local phase) g!archive (code.local archive)] (with_symbols [g!handler g!inputs g!error g!_] - (in (list (` (<extension> (~ name) - (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs)) - (.case ((~! <result>) - ((~! monad.do) (~! <>.monad) - [(~+ inputs) - (~ g!_) <end>] - (.at (~! <>.monad) (~' in) (~ body))) - (~ g!inputs)) - {.#Right (~ g!_)} - (~ g!_) + (in (list (` (<extension> (, name) + (.function ((, g!handler) (, g!name) (, g!phase) (, g!archive) (, g!inputs)) + (.case ((,! <result>) + ((,! monad.do) (,! <>.monad) + [(,* inputs) + (, g!_) <end>] + (.at (,! <>.monad) (,' in) (, body))) + (, g!inputs)) + {.#Right (, g!_)} + (, g!_) - {.#Left (~ g!error)} - ((~! phase.failure) (~ g!error))) + {.#Left (, g!error)} + ((,! phase.failure) (, g!error))) )))))))))] [<c>.any <c>.end <c>.and <c>.result "lux def analysis" analysis] diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 405d5bf09..5beaf4478 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -94,15 +94,15 @@ (def (get_static_field class field) (-> Text Text Code) (` ("jvm member get static" - (~ (code.text class)) - (~ (code.text field))))) + (, (code.text class)) + (, (code.text field))))) (def (get_virtual_field class field object) (-> Text Text Code Code) (` ("jvm member get virtual" - (~ (code.text class)) - (~ (code.text field)) - (~ object)))) + (, (code.text class)) + (, (code.text field)) + (, object)))) (def boxes (Dictionary (Type Value) Text) @@ -120,10 +120,10 @@ [(def (<name> unboxed boxed raw) (-> (Type Value) Text Code Code) (let [unboxed (..reflection unboxed)] - (` (|> (~ raw) - (.is (.Primitive (~ (code.text <pre>)))) + (` (|> (, raw) + (.is (.Primitive (, (code.text <pre>)))) "jvm object cast" - (.is (.Primitive (~ (code.text <post>))))))))] + (.is (.Primitive (, (code.text <post>))))))))] [unbox boxed unboxed] [box unboxed boxed] @@ -370,7 +370,7 @@ (def (parameter_type value_type type) (-> (-> (Type Value) Code) (-> (Type Parameter) Code)) - (`` (<| (~~ (with_template [<when> <binding> <then>] + (`` (<| (,, (with_template [<when> <binding> <then>] [(case (<when> type) {.#Some <binding>} <then> @@ -382,22 +382,22 @@ [parser.lower? _ (` .Any)] [parser.upper? limit (parameter_type value_type limit)] [parser.class? [name parameters] - (` (.Primitive (~ (code.text name)) - [(~+ (list#each (parameter_type value_type) parameters))]))] + (` (.Primitive (, (code.text name)) + [(,* (list#each (parameter_type value_type) parameters))]))] [parser.array? elementT (case (parser.primitive? elementT) {.#Some elementT} - (` {.#Primitive (~ (code.text (..reflection (jvm.array elementT)))) {.#End}}) + (` {.#Primitive (, (code.text (..reflection (jvm.array elementT)))) {.#End}}) {.#None} - (` ((~! array.Array) (~ (value_type elementT)))))])) + (` ((,! array.Array) (, (value_type elementT)))))])) ... else (undefined) ))) (def (value_type mode type) (-> Primitive_Mode (Type Value) Code) - (`` (<| (~~ (with_template [<when> <binding> <then>] + (`` (<| (,, (with_template [<when> <binding> <then>] [(case (<when> type) {.#Some <binding>} <then> @@ -415,7 +415,7 @@ (def (decorate_input [class value]) (-> [(Type Value) Code] Code) - (` [(~ (code.text (..signature class))) (~ value)])) + (` [(, (code.text (..signature class))) (, value)])) (def privacy_modifier^ (Parser Privacy) @@ -901,11 +901,11 @@ (def (annotation_parameter$ [name value]) (-> Annotation_Parameter Code) - (` [(~ (code.text name)) (~ value)])) + (` [(, (code.text name)) (, value)])) (def (annotation$ [name params]) (-> Annotation Code) - (` ((~ (code.text name)) (~+ (list#each annotation_parameter$ params))))) + (` ((, (code.text name)) (,* (list#each annotation_parameter$ params))))) (with_template [<name> <category>] [(def <name> @@ -927,12 +927,12 @@ (def (method_decl$ [[name pm anns] method_decl]) (-> [Member_Declaration MethodDecl] Code) (let [(open "[0]") method_decl] - (` ((~ (code.text name)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ #method_tvars))] - [(~+ (list#each class$ #method_exs))] - [(~+ (list#each value$ #method_inputs))] - (~ (return$ #method_output)))))) + (` ((, (code.text name)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ #method_tvars))] + [(,* (list#each class$ #method_exs))] + [(,* (list#each value$ #method_inputs))] + (, (return$ #method_output)))))) (def (state_modifier$ it) (-> State Code) @@ -945,31 +945,31 @@ (-> [Member_Declaration FieldDecl] Code) (case field {#ConstantField class value} - (` ("constant" (~ (code.text name)) - [(~+ (list#each annotation$ anns))] - (~ (value$ class)) - (~ value) + (` ("constant" (, (code.text name)) + [(,* (list#each annotation$ anns))] + (, (value$ class)) + (, value) )) {#VariableField [state static? class]} - (` ("variable" (~ (code.text name)) - (~ (privacy_modifier$ pm)) - (~ (state_modifier$ state)) - (~+ (if static? + (` ("variable" (, (code.text name)) + (, (privacy_modifier$ pm)) + (, (state_modifier$ state)) + (,* (if static? (list (' "static")) (list))) - [(~+ (list#each annotation$ anns))] - (~ (value$ class)) + [(,* (list#each annotation$ anns))] + (, (value$ class)) )) )) (def (argument$ [name type]) (-> Argument Code) - (` [(~ (code.text name)) (~ (value$ type))])) + (` [(, (code.text name)) (, (value$ type))])) (def (constructor_arg$ [class term]) (-> (Typed Code) Code) - (` [(~ (value$ class)) (~ term)])) + (` [(, (value$ class)) (, term)])) (.type Super [[External (List (Type Var))] @@ -1012,12 +1012,12 @@ (def (method_decl$$ [[name pm anns] method_decl]) (-> [Member_Declaration MethodDecl] Code) (let [(open "[0]") method_decl] - (` ([(~+ (list#each var$ #method_tvars))] - (~ (code.text name)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each value$ #method_inputs))] - (~ (return$ #method_output)) - [(~+ (list#each class$ #method_exs))])))) + (` ([(,* (list#each var$ #method_tvars))] + (, (code.text name)) + [(,* (list#each annotation$ anns))] + [(,* (list#each value$ #method_inputs))] + (, (return$ #method_output)) + [(,* (list#each class$ #method_exs))])))) (def with_super (syntax (_ [declaration,method (<code>.tuple @@ -1044,13 +1044,13 @@ actual_arguments (list.size inputs)]] (if (n.= expected_arguments actual_arguments) (in (list (` ("jvm member invoke special" - [(~+ (list#each (|>> ..signature code.text) super_vars))] - (~ (code.text super_name)) - (~ (code.text (the #member_name member))) - [(~+ (list#each (|>> ..signature code.text) (the #method_tvars method)))] - ("jvm object cast" (~ self)) - (~+ (|> inputs - (list#each (|>> ~ "jvm object cast" `)) + [(,* (list#each (|>> ..signature code.text) super_vars))] + (, (code.text super_name)) + (, (code.text (the #member_name member))) + [(,* (list#each (|>> ..signature code.text) (the #method_tvars method)))] + ("jvm object cast" (, self)) + (,* (|> inputs + (list#each (|>> , "jvm object cast" `)) (list.zipped_2 (the #method_inputs method)) (list#each ..decorate_input))))))) (meta.failure (exception.error ..insufficient_parameters [expected_arguments actual_arguments])))))) @@ -1132,14 +1132,14 @@ (case [static? this] [#1 {.#None}] (in (list (` ("jvm member get static" - (~ (code.text class_name)) - (~ (code.text (the #member_name member))))))) + (, (code.text class_name)) + (, (code.text (the #member_name member))))))) [#0 {.#Some this}] (in (list (` ("jvm member get virtual" - (~ (code.text class_name)) - (~ (code.text (the #member_name member))) - (~ this))))) + (, (code.text class_name)) + (, (code.text (the #member_name member))) + (, this))))) _ (meta.failure (exception.error ..cannot_get_field [class_name field]))) @@ -1167,16 +1167,16 @@ (case [static? this] [#1 {.#None}] (in (list (` ("jvm member put static" - (~ (code.text class_name)) - (~ (code.text (the #member_name member))) - (~ value))))) + (, (code.text class_name)) + (, (code.text (the #member_name member))) + (, value))))) [#0 {.#Some this}] (in (list (` ("jvm member put virtual" - (~ (code.text class_name)) - (~ (code.text (the #member_name member))) - (~ value) - (~ this))))) + (, (code.text class_name)) + (, (code.text (the #member_name member))) + (, value) + (, this))))) _ (meta.failure (exception.error ..cannot_set_field [class_name field])))) @@ -1217,13 +1217,13 @@ actual_arguments (list.size inputs)] (if (n.= expected_arguments actual_arguments) (in (list (` ("jvm member invoke virtual" - [(~+ (list#each (|>> ..signature code.text) class_vars))] - (~ (code.text class_name)) - (~ (code.text (the #member_name member))) - [(~+ (list#each (|>> ..signature code.text) (the #method_tvars method)))] - ("jvm object cast" (~ self)) - (~+ (|> inputs - (list#each (|>> ~ "jvm object cast" `)) + [(,* (list#each (|>> ..signature code.text) class_vars))] + (, (code.text class_name)) + (, (code.text (the #member_name member))) + [(,* (list#each (|>> ..signature code.text) (the #method_tvars method)))] + ("jvm object cast" (, self)) + (,* (|> inputs + (list#each (|>> , "jvm object cast" `)) (list.zipped_2 (the #method_inputs method)) (list#each ..decorate_input))))))) (meta.failure (exception.error ..insufficient_parameters [expected_arguments actual_arguments])))) @@ -1253,104 +1253,104 @@ (list) virtual_methods - (list (` ((~! ..with_call) [(~ (declaration$ (jvm.declaration fully_qualified_class_name class_vars))) - [(~+ (list#each method_decl$$ virtual_methods))]]))))] + (list (` ((,! ..with_call) [(, (declaration$ (jvm.declaration fully_qualified_class_name class_vars))) + [(,* (list#each method_decl$$ virtual_methods))]]))))] (case method_def {#ConstructorMethod strict_fp? type_vars self_name arguments constructor_args body exs} (meta#in (` ("init" - (~ (privacy_modifier$ pm)) - (~ (code.bit strict_fp?)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - [(~+ (list#each class$ exs))] - (~ (code.text self_name)) - [(~+ (list#each argument$ arguments))] - [(~+ (list#each constructor_arg$ constructor_args))] - (<| ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name)) - [(~+ (list#each field_decl$ fields))]]) - (~+ virtual_methods) - (~ body)) + (, (privacy_modifier$ pm)) + (, (code.bit strict_fp?)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + [(,* (list#each class$ exs))] + (, (code.text self_name)) + [(,* (list#each argument$ arguments))] + [(,* (list#each constructor_arg$ constructor_args))] + (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) + (,* virtual_methods) + (, body)) ))) {#VirtualMethod final? strict_fp? type_vars self_name arguments return_type body exs} (meta#in (` ("virtual" - (~ (code.text name)) - (~ (privacy_modifier$ pm)) - (~ (code.bit final?)) - (~ (code.bit strict_fp?)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - (~ (code.text self_name)) - [(~+ (list#each argument$ arguments))] - (~ (return$ return_type)) - [(~+ (list#each class$ exs))] - (<| ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name)) - [(~+ (list#each field_decl$ fields))]]) - (~+ virtual_methods) - (~ body)) + (, (code.text name)) + (, (privacy_modifier$ pm)) + (, (code.bit final?)) + (, (code.bit strict_fp?)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + (, (code.text self_name)) + [(,* (list#each argument$ arguments))] + (, (return$ return_type)) + [(,* (list#each class$ exs))] + (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) + (,* virtual_methods) + (, body)) ))) {#OverridenMethod strict_fp? declaration type_vars self_name expected_arguments return_type body exs} (do meta.monad [@ meta.current_module_name] (in (` ("override" - (~ (declaration$ declaration)) - (~ (code.text name)) - (~ (code.bit strict_fp?)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - (~ (code.text self_name)) - [(~+ (list#each argument$ expected_arguments))] - (~ (return$ return_type)) - [(~+ (list#each class$ exs))] - (<| ((~! ..with_super) [(~ (declaration$ declaration)) - (~ (method_decl$$ [method_declaration + (, (declaration$ declaration)) + (, (code.text name)) + (, (code.bit strict_fp?)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + (, (code.text self_name)) + [(,* (list#each argument$ expected_arguments))] + (, (return$ return_type)) + [(,* (list#each class$ exs))] + (<| ((,! ..with_super) [(, (declaration$ declaration)) + (, (method_decl$$ [method_declaration [#method_tvars type_vars #method_inputs (list#each product.right expected_arguments) #method_output return_type #method_exs exs]]))]) - ((~! ..with_get|set) [(~ (code.text fully_qualified_class_name)) - [(~+ (list#each field_decl$ fields))]]) - (~+ virtual_methods) - (~ body)) + ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) + (,* virtual_methods) + (, body)) )))) {#StaticMethod strict_fp? type_vars arguments return_type body exs} (meta#in (` ("static" - (~ (code.text name)) - (~ (privacy_modifier$ pm)) - (~ (code.bit strict_fp?)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - [(~+ (list#each argument$ arguments))] - (~ (return$ return_type)) - [(~+ (list#each class$ exs))] - (~ body)))) + (, (code.text name)) + (, (privacy_modifier$ pm)) + (, (code.bit strict_fp?)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + [(,* (list#each argument$ arguments))] + (, (return$ return_type)) + [(,* (list#each class$ exs))] + (, body)))) {#AbstractMethod type_vars arguments return_type exs} (meta#in (` ("abstract" - (~ (code.text name)) - (~ (privacy_modifier$ pm)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - [(~+ (list#each argument$ arguments))] - (~ (return$ return_type)) - [(~+ (list#each class$ exs))]))) + (, (code.text name)) + (, (privacy_modifier$ pm)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + [(,* (list#each argument$ arguments))] + (, (return$ return_type)) + [(,* (list#each class$ exs))]))) {#NativeMethod type_vars arguments return_type exs} (meta#in (` ("native" - (~ (code.text name)) - (~ (privacy_modifier$ pm)) - [(~+ (list#each annotation$ anns))] - [(~+ (list#each var$ type_vars))] - [(~+ (list#each class$ exs))] - [(~+ (list#each argument$ arguments))] - (~ (return$ return_type))))) + (, (code.text name)) + (, (privacy_modifier$ pm)) + [(,* (list#each annotation$ anns))] + [(,* (list#each var$ type_vars))] + [(,* (list#each class$ exs))] + [(,* (list#each argument$ arguments))] + (, (return$ return_type))))) ))) (def (complete_call$ g!obj [method args]) (-> Code Partial_Call Code) - (` ((~ (code.symbol method)) (~+ args) (~ g!obj)))) + (` ((, (code.symbol method)) (,* args) (, g!obj)))) (def $Object (Type Class) @@ -1370,13 +1370,13 @@ (do meta.monad [methods (monad.each ! (method_def$ full_class_name class_vars super fields methods) methods)] (in (list (` ("jvm class" - (~ (declaration$ (jvm.declaration full_class_name class_vars))) - (~ (class$ super)) - [(~+ (list#each class$ interfaces))] - (~ (inheritance_modifier$ im)) - [(~+ (list#each annotation$ annotations))] - [(~+ (list#each field_decl$ fields))] - [(~+ methods)]))))))) + (, (declaration$ (jvm.declaration full_class_name class_vars))) + (, (class$ super)) + [(,* (list#each class$ interfaces))] + (, (inheritance_modifier$ im)) + [(,* (list#each annotation$ annotations))] + [(,* (list#each field_decl$ fields))] + [(,* methods)]))))))) (def .public interface (syntax (_ [.let [! <>.monad] @@ -1386,10 +1386,10 @@ annotations ..annotations^ members (<>.some (..method_decl^ class_vars))]) (in (list (` ("jvm class interface" - (~ (declaration$ (jvm.declaration full_class_name class_vars))) - [(~+ (list#each class$ supers))] - [(~+ (list#each annotation$ annotations))] - (~+ (list#each method_decl$ members)))))))) + (, (declaration$ (jvm.declaration full_class_name class_vars))) + [(,* (list#each class$ supers))] + [(,* (list#each annotation$ annotations))] + (,* (list#each method_decl$ members)))))))) (def .public object (syntax (_ [class_vars ..vars^ @@ -1402,11 +1402,11 @@ (do [! meta.monad] [methods (monad.each ! (method_def$ "" (list) super (list) methods) methods)] (in (list (` ("jvm class anonymous" - [(~+ (list#each var$ class_vars))] - (~ (class$ super)) - [(~+ (list#each class$ interfaces))] - [(~+ (list#each constructor_arg$ constructor_args))] - [(~+ methods)]))))))) + [(,* (list#each var$ class_vars))] + (, (class$ super)) + [(,* (list#each class$ interfaces))] + [(,* (list#each constructor_arg$ constructor_args))] + [(,* methods)]))))))) (def .public null (syntax (_ []) @@ -1419,17 +1419,17 @@ (def .public ??? (syntax (_ [expr <code>.any]) (with_symbols [g!temp] - (in (list (` (let [(~ g!temp) (~ expr)] - (if (not ("jvm object null?" (~ g!temp))) - {.#Some (~ g!temp)} + (in (list (` (let [(, g!temp) (, expr)] + (if (not ("jvm object null?" (, g!temp))) + {.#Some (, g!temp)} {.#None})))))))) (def .public !!! (syntax (_ [expr <code>.any]) (with_symbols [g!value] - (in (list (` (.case (~ expr) - {.#Some (~ g!value)} - (~ g!value) + (in (list (` (.case (, expr) + {.#Some (, g!value)} + (, g!value) {.#None} ("jvm object null")))))))) @@ -1439,36 +1439,36 @@ unchecked (<>.maybe <code>.any)]) (with_symbols [g!_ g!unchecked] (let [class_name (..reflection class) - class_type (` (.Primitive (~ (code.text class_name)))) - check_type (` (.Maybe (~ class_type))) - check_code (` (if ("jvm object instance?" (~ (code.text class_name)) (~ g!unchecked)) - {.#Some (.as (~ class_type) - (~ g!unchecked))} + class_type (` (.Primitive (, (code.text class_name)))) + check_type (` (.Maybe (, class_type))) + check_code (` (if ("jvm object instance?" (, (code.text class_name)) (, g!unchecked)) + {.#Some (.as (, class_type) + (, g!unchecked))} {.#None}))] (case unchecked {.#Some unchecked} - (in (list (` (.is (~ check_type) - (let [(~ g!unchecked) (~ unchecked)] - (~ check_code)))))) + (in (list (` (.is (, check_type) + (let [(, g!unchecked) (, unchecked)] + (, check_code)))))) {.#None} - (in (list (` (.is (-> (.Primitive "java.lang.Object") (~ check_type)) - (function ((~ g!_) (~ g!unchecked)) - (~ check_code)))))) + (in (list (` (.is (-> (.Primitive "java.lang.Object") (, check_type)) + (function ((, g!_) (, g!unchecked)) + (, check_code)))))) ))))) (def .public synchronized (syntax (_ [lock <code>.any body <code>.any]) - (in (list (` ("jvm object synchronized" (~ lock) (~ body))))))) + (in (list (` ("jvm object synchronized" (, lock) (, body))))))) (def .public do_to (syntax (_ [obj <code>.any methods (<>.some partial_call^)]) (with_symbols [g!obj] - (in (list (` (let [(~ g!obj) (~ obj)] - (exec (~+ (list#each (complete_call$ g!obj) methods)) - (~ g!obj))))))))) + (in (list (` (let [(, g!obj) (, obj)] + (exec (,* (list#each (complete_call$ g!obj) methods)) + (, g!obj))))))))) (def (class_import$ declaration) (-> (Type Declaration) Code) @@ -1476,11 +1476,11 @@ def_name (..internal full_name) params' (list#each ..var$' params)] (template.with_locals [g!_] - (` (def (~ (code.symbol ["" def_name])) + (` (def (, (code.symbol ["" def_name])) .Type - (All ((~ (' g!_)) (~+ params')) - (.Primitive (~ (code.text full_name)) - [(~+ params')]))))))) + (All ((, (' g!_)) (,* params')) + (.Primitive (, (code.text full_name)) + [(,* params')]))))))) (def (member_type_vars class_tvars member) (-> (List (Type Var)) Import_Member_Declaration (List (Type Var))) @@ -1516,7 +1516,7 @@ (function (_ [maybe? arg]) (let [arg_type (value_type (the #import_member_mode commons) arg)] (if maybe? - (` (Maybe (~ arg_type))) + (` (Maybe (, arg_type))) arg_type)))) #import_member_args)]] (in [arg_inputs input_jvm_types arg_types]))) @@ -1533,14 +1533,14 @@ return_term (the #import_member_maybe? commons) - (` (??? (~ return_term))) + (` (??? (, return_term))) ... else - (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))] - (` (let [(~ g!temp) (~ return_term)] + (let [g!temp (` ((,' ,') (, (code.symbol ["" " Ω "]))))] + (` (let [(, g!temp) (, return_term)] (if (not (..null? (.as (.Primitive "java.lang.Object") - (~ g!temp)))) - (~ g!temp) + (, g!temp)))) + (, g!temp) (panic! "Cannot produce null references from method calls.")))))) _ @@ -1558,8 +1558,8 @@ _ return_term))] - [with_return_try #import_member_try? (` (.try (~ return_term)))] - [with_return_io #import_member_io? (` ((~! io.io) (~ return_term)))] + [with_return_try #import_member_try? (` (.try (, return_term)))] + [with_return_io #import_member_io? (` ((,! io.io) (, return_term)))] ) (with_template [<input?> <name> <unbox/box> <special+>] @@ -1576,7 +1576,7 @@ [(at jvm.equivalence = <primitive> unboxed) (with_expansions [<post>' (template.spliced <post>)] [<primitive> - (` (.|> (~ raw) (~+ <pre>))) + (` (.|> (, raw) (,* <pre>))) (list <post>')])] <special+>')] @@ -1584,7 +1584,7 @@ ... else [unboxed (if <input?> - (` ("jvm object cast" (~ raw))) + (` ("jvm object cast" (, raw))) raw) (list)])))) unboxed/boxed (case (dictionary.value unboxed ..boxes) @@ -1598,31 +1598,31 @@ unboxed/boxed _ - (` (.|> (~ unboxed/boxed) (~+ post))))))] + (` (.|> (, unboxed/boxed) (,* post))))))] [#1 with_automatic_input_conversion ..unbox - [[jvm.boolean (list (` (.as (.Primitive (~ (code.text box.boolean)))))) []] - [jvm.byte (list (` (.as (.Primitive (~ (code.text box.byte)))))) []] - [jvm.short (list (` (.as (.Primitive (~ (code.text box.short)))))) []] - [jvm.int (list (` (.is (.Primitive (~ (code.text box.int)))))) []] - [jvm.long (list (` (.as (.Primitive (~ (code.text box.long)))))) []] - [jvm.char (list (` (.as (.Primitive (~ (code.text box.char)))))) []] - [jvm.float (list (` (.as (.Primitive (~ (code.text box.float)))))) []] - [jvm.double (list (` (.as (.Primitive (~ (code.text box.double)))))) []]]] + [[jvm.boolean (list (` (.as (.Primitive (, (code.text box.boolean)))))) []] + [jvm.byte (list (` (.as (.Primitive (, (code.text box.byte)))))) []] + [jvm.short (list (` (.as (.Primitive (, (code.text box.short)))))) []] + [jvm.int (list (` (.is (.Primitive (, (code.text box.int)))))) []] + [jvm.long (list (` (.as (.Primitive (, (code.text box.long)))))) []] + [jvm.char (list (` (.as (.Primitive (, (code.text box.char)))))) []] + [jvm.float (list (` (.as (.Primitive (, (code.text box.float)))))) []] + [jvm.double (list (` (.as (.Primitive (, (code.text box.double)))))) []]]] [#0 with_automatic_output_conversion ..box - [[jvm.boolean (list) [(` (.is (.Primitive (~ (code.text box.boolean)))))]] - [jvm.byte (list) [(` (.is (.Primitive (~ (code.text box.byte)))))]] - [jvm.short (list) [(` (.is (.Primitive (~ (code.text box.short)))))]] - [jvm.int (list) [(` (.is (.Primitive (~ (code.text box.int)))))]] - [jvm.long (list) [(` (.is (.Primitive (~ (code.text box.long)))))]] - [jvm.char (list) [(` (.is (.Primitive (~ (code.text box.char)))))]] - [jvm.float (list) [(` (.is (.Primitive (~ (code.text box.float)))))]] - [jvm.double (list) [(` (.is (.Primitive (~ (code.text box.double)))))]]]] + [[jvm.boolean (list) [(` (.is (.Primitive (, (code.text box.boolean)))))]] + [jvm.byte (list) [(` (.is (.Primitive (, (code.text box.byte)))))]] + [jvm.short (list) [(` (.is (.Primitive (, (code.text box.short)))))]] + [jvm.int (list) [(` (.is (.Primitive (, (code.text box.int)))))]] + [jvm.long (list) [(` (.is (.Primitive (, (code.text box.long)))))]] + [jvm.char (list) [(` (.is (.Primitive (, (code.text box.char)))))]] + [jvm.float (list) [(` (.is (.Primitive (, (code.text box.float)))))]] + [jvm.double (list) [(` (.is (.Primitive (, (code.text box.double)))))]]]] ) (def (un_quoted quoted) (-> Code Code) - (` ((~' ~) (~ quoted)))) + (` ((,' ,) (, quoted)))) (def (jvm_invoke_inputs mode classes inputs) (-> Primitive_Mode (List (Type Value)) (List [Bit Code]) (List Code)) @@ -1630,8 +1630,8 @@ (list.zipped_2 classes) (list#each (function (_ [class [maybe? input]]) (|> (if maybe? - (` (.is (.Primitive (~ (code.text (..reflection class)))) - ((~! !!!) (~ (..un_quoted input))))) + (` (.is (.Primitive (, (code.text (..reflection class)))) + ((,! !!!) (, (..un_quoted input))))) (..un_quoted input)) [class] (with_automatic_input_conversion mode)))))) @@ -1645,7 +1645,7 @@ (def syntax_inputs (-> (List Code) (List Code)) (|>> (list#each (function (_ name) - (list name (` (~! <code>.any))))) + (list name (` (,! <code>.any))))) list#conjoint)) (exception .public (cannot_write_to_field [class Text @@ -1664,18 +1664,18 @@ [.let [enum_type (.is Code (case class_tvars {.#End} - (` (.Primitive (~ (code.text full_name)))) + (` (.Primitive (, (code.text full_name)))) _ (let [=class_tvars (list#each ..var$' class_tvars)] - (` (All ((~ g!_) (~+ =class_tvars)) - (.Primitive (~ (code.text full_name)) [(~+ =class_tvars)])))))) + (` (All ((, g!_) (,* =class_tvars)) + (.Primitive (, (code.text full_name)) [(,* =class_tvars)])))))) getter_interop (.is (-> Text Code) (function (_ name) (let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])] - (` (def (~ getter_name) - (~ enum_type) - (~ (get_static_field full_name name)))))))]] + (` (def (, getter_name) + (, enum_type) + (, (get_static_field full_name name)))))))]] (in (list#each getter_interop enum_members)))) {#ConstructorDecl [commons _]} @@ -1684,19 +1684,19 @@ def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))]) jvm_interop (|> [classT (` ("jvm member invoke constructor" - [(~+ (list#each ..var$ class_tvars))] - (~ (code.text full_name)) - [(~+ (list#each ..var$ (the #import_member_tvars commons)))] - (~+ (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs) + [(,* (list#each ..var$ class_tvars))] + (, (code.text full_name)) + [(,* (list#each ..var$ (the #import_member_tvars commons)))] + (,* (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs) (list.zipped_2 input_jvm_types) (list#each ..decorate_input)))))] (with_automatic_output_conversion (the #import_member_mode commons)) (with_return_maybe member true classT) (with_return_try member) (with_return_io member))]] - (in (list (` (def (~ def_name) - ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))]) - ((~' in) (.list (.` (~ jvm_interop)))))))))) + (in (list (` (def (, def_name) + ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))]) + ((,' in) (.list (.` (, jvm_interop)))))))))) {#MethodDecl [commons method]} (with_symbols [g!obj] @@ -1722,16 +1722,16 @@ ))) method_return (the #import_method_return method) callC (.is Code - (` ((~ (code.text jvm_op)) - [(~+ (list#each ..var$ class_tvars))] - (~ (code.text full_name)) - (~ (code.text #import_method_name)) - [(~+ (list#each ..var$ (the #import_member_tvars commons)))] - (~+ (|> object_ast + (` ((, (code.text jvm_op)) + [(,* (list#each ..var$ class_tvars))] + (, (code.text full_name)) + (, (code.text #import_method_name)) + [(,* (list#each ..var$ (the #import_member_tvars commons)))] + (,* (|> object_ast (list#each ..un_quoted) (list.zipped_2 (list (jvm.class full_name (list)))) (list#each (with_automatic_input_conversion (the #import_member_mode commons))))) - (~+ (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs) + (,* (|> (jvm_invoke_inputs (the #import_member_mode commons) input_jvm_types arg_function_inputs) (list.zipped_2 input_jvm_types) (list#each ..decorate_input)))))) jvm_interop (.is Code @@ -1749,10 +1749,10 @@ (|> callC (with_return_try member) (with_return_io member))))]] - (in (list (` (def (~ def_name) - ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs))) - (~+ (syntax_inputs object_ast))]) - ((~' in) (.list (.` (~ jvm_interop))))))))))) + (in (list (` (def (, def_name) + ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs))) + (,* (syntax_inputs object_ast))]) + ((,' in) (.list (.` (, jvm_interop))))))))))) {#FieldAccessDecl fad} (do meta.monad @@ -1765,16 +1765,16 @@ (get_static_field full_name _#import_field_name) (get_virtual_field full_name _#import_field_name (..un_quoted g!obj)))]) getter_body (if _#import_field_maybe? - (` ((~! ???) (~ getter_body))) + (` ((,! ???) (, getter_body))) getter_body) getter_body (if _#import_field_setter? - (` ((~! io.io) (~ getter_body))) + (` ((,! io.io) (, getter_body))) getter_body) setter_value (|> [_#import_field_type (..un_quoted g!value)] (with_automatic_input_conversion _#import_field_mode)) setter_value (if _#import_field_maybe? - (` ((~! !!!) (~ setter_value))) + (` ((,! !!!) (, setter_value))) setter_value) setter_command (if _#import_field_static? "jvm member put static" "jvm member put virtual") g!obj+ (.is (List Code) @@ -1783,33 +1783,33 @@ (list (..un_quoted g!obj)))) parser (let [write (if _#import_field_static? - (` (~! <code>.any)) - (` ((~! <>.and) - (~! <code>.any) - (~! <code>.any)))) + (` (,! <code>.any)) + (` ((,! <>.and) + (,! <code>.any) + (,! <code>.any)))) read (if _#import_field_static? - (` (~! <code>.end)) - (` (~! <code>.any)))] - (` ((~! <>.or) (~ write) (~ read)))) + (` (,! <code>.end)) + (` (,! <code>.any)))] + (` ((,! <>.or) (, write) (, read)))) write (list (if _#import_field_static? - (` {.#Left [(~ g!value)]}) - (` {.#Left [(~ g!value) (~ g!obj)]})) + (` {.#Left [(, g!value)]}) + (` {.#Left [(, g!value) (, g!obj)]})) (if _#import_field_setter? - (` ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) - (~ (code.text full_name)) - (~ (code.text _#import_field_name)) - (~ setter_value) - (~+ g!obj+))))))) - (` ((~! meta.failure) (~ (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name]))))))) + (` ((,' in) (.list (.` ((,! io.io) ((, (code.text setter_command)) + (, (code.text full_name)) + (, (code.text _#import_field_name)) + (, setter_value) + (,* g!obj+))))))) + (` ((,! meta.failure) (, (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name]))))))) read (list (if _#import_field_static? (` {.#Right []}) - (` {.#Right [(~ g!obj)]})) - (` ((~' in) (.list (.` (~ getter_body))))))] - (list (` (def (~ g!name) - ((~! syntax) ((~ g!name) [(~ write|read) (~ parser)]) - (case (~ write|read) - (~+ write) - (~+ read)))))))))) + (` {.#Right [(, g!obj)]})) + (` ((,' in) (.list (.` (, getter_body))))))] + (list (` (def (, g!name) + ((,! syntax) ((, g!name) [(, write|read) (, parser)]) + (case (, write|read) + (,* write) + (,* read)))))))))) ))) (def (member_import$ vars kind class [import_format member]) @@ -1861,14 +1861,14 @@ (def .public array (syntax (_ [type (..type^ (list)) size <code>.any]) - (let [g!size (` (|> (~ size) + (let [g!size (` (|> (, size) (.is .Nat) - (.as (.Primitive (~ (code.text box.long)))) + (.as (.Primitive (, (code.text box.long)))) "jvm object cast" "jvm conversion long-to-int"))] - (`` (cond (~~ (with_template [<primitive> <array_op>] + (`` (cond (,, (with_template [<primitive> <array_op>] [(at jvm.equivalence = <primitive> type) - (in (list (` (<array_op> (~ g!size)))))] + (in (list (` (<array_op> (, g!size)))))] [jvm.boolean "jvm array new boolean"] [jvm.byte "jvm array new byte"] @@ -1879,9 +1879,9 @@ [jvm.double "jvm array new double"] [jvm.char "jvm array new char"])) ... else - (in (list (` (.as ((~! array.Array) (~ (value_type {#ManualPrM} type))) - (.is (~ (value_type {#ManualPrM} (jvm.array type))) - ("jvm array new object" (~ g!size)))))))))))) + (in (list (` (.as ((,! array.Array) (, (value_type {#ManualPrM} type))) + (.is (, (value_type {#ManualPrM} (jvm.array type))) + ("jvm array new object" (, g!size)))))))))))) (exception .public (cannot_convert_to_jvm_type [type .Type]) (exception.report @@ -1894,7 +1894,7 @@ (at meta.monad in $Object) (case type {.#Primitive name params} - (`` (cond (~~ (with_template [<type>] + (`` (cond (,, (with_template [<type>] [(text#= (..reflection <type>) name) (case params {.#End} @@ -1912,7 +1912,7 @@ [jvm.double] [jvm.char])) - (~~ (with_template [<type>] + (,, (with_template [<type>] [(text#= (..reflection (jvm.array <type>)) name) (case params {.#End} @@ -1994,7 +1994,7 @@ [array_type (meta.type array_name) context meta.type_context array_jvm_type (lux_type->jvm_type context array_type) - .let [g!extension (code.text (`` (cond (~~ (with_template [<primitive> <extension>] + .let [g!extension (code.text (`` (cond (,, (with_template [<primitive> <extension>] [(at jvm.equivalence = (jvm.array <primitive>) array_jvm_type) @@ -2011,16 +2011,16 @@ ... else "jvm array length object")))]] - (in (list (` (.|> ((~ g!extension) (~ array)) + (in (list (` (.|> ((, g!extension) (, array)) "jvm conversion int-to-long" "jvm object cast" - (.is (.Primitive (~ (code.text box.long)))) + (.is (.Primitive (, (code.text box.long)))) (.as .Nat)))))) _ (with_symbols [g!array] - (in (list (` (let [(~ g!array) (~ array)] - (..length (~ g!array)))))))))) + (in (list (` (let [(, g!array) (, array)] + (..length (, g!array)))))))))) (def .public read! (syntax (_ [idx <code>.any @@ -2031,18 +2031,18 @@ [array_type (meta.type array_name) context meta.type_context array_jvm_type (lux_type->jvm_type context array_type) - .let [g!idx (` (.|> (~ idx) + .let [g!idx (` (.|> (, idx) (.is .Nat) - (.as (.Primitive (~ (code.text box.long)))) + (.as (.Primitive (, (code.text box.long)))) "jvm object cast" "jvm conversion long-to-int"))]] - (`` (cond (~~ (with_template [<primitive> <extension> <box>] + (`` (cond (,, (with_template [<primitive> <extension> <box>] [(at jvm.equivalence = (jvm.array <primitive>) array_jvm_type) - (in (list (` (.|> (<extension> (~ g!idx) (~ array)) + (in (list (` (.|> (<extension> (, g!idx) (, array)) "jvm object cast" - (.is (.Primitive (~ (code.text <box>))))))))] + (.is (.Primitive (, (code.text <box>))))))))] [jvm.boolean "jvm array read boolean" box.boolean] [jvm.byte "jvm array read byte" box.byte] @@ -2054,12 +2054,12 @@ [jvm.char "jvm array read char" box.char])) ... else - (in (list (` ("jvm array read object" (~ g!idx) (~ array)))))))) + (in (list (` ("jvm array read object" (, g!idx) (, array)))))))) _ (with_symbols [g!array] - (in (list (` (let [(~ g!array) (~ array)] - (..read! (~ idx) (~ g!array)))))))))) + (in (list (` (let [(, g!array) (, array)] + (..read! (, idx) (, g!array)))))))))) (def .public write! (syntax (_ [idx <code>.any @@ -2071,19 +2071,19 @@ [array_type (meta.type array_name) context meta.type_context array_jvm_type (lux_type->jvm_type context array_type) - .let [g!idx (` (.|> (~ idx) + .let [g!idx (` (.|> (, idx) (.is .Nat) - (.as (.Primitive (~ (code.text box.long)))) + (.as (.Primitive (, (code.text box.long)))) "jvm object cast" "jvm conversion long-to-int"))]] - (`` (cond (~~ (with_template [<primitive> <extension> <box>] + (`` (cond (,, (with_template [<primitive> <extension> <box>] [(at jvm.equivalence = (jvm.array <primitive>) array_jvm_type) - (let [g!value (` (.|> (~ value) - (.as (.Primitive (~ (code.text <box>)))) + (let [g!value (` (.|> (, value) + (.as (.Primitive (, (code.text <box>)))) "jvm object cast"))] - (in (list (` (<extension> (~ g!idx) (~ g!value) (~ array))))))] + (in (list (` (<extension> (, g!idx) (, g!value) (, array))))))] [jvm.boolean "jvm array write boolean" box.boolean] [jvm.byte "jvm array write byte" box.byte] @@ -2095,16 +2095,16 @@ [jvm.char "jvm array write char" box.char])) ... else - (in (list (` ("jvm array write object" (~ g!idx) (~ value) (~ array)))))))) + (in (list (` ("jvm array write object" (, g!idx) (, value) (, array)))))))) _ (with_symbols [g!array] - (in (list (` (let [(~ g!array) (~ array)] - (..write! (~ idx) (~ value) (~ g!array)))))))))) + (in (list (` (let [(, g!array) (, array)] + (..write! (, idx) (, value) (, g!array)))))))))) (def .public class_for (syntax (_ [type (..type^ (list))]) - (in (list (` ("jvm object class" (~ (code.text (..reflection type))))))))) + (in (list (` ("jvm object class" (, (code.text (..reflection type))))))))) (def .public type (syntax (_ [type (..type^ (list))]) @@ -2121,8 +2121,8 @@ (case [(parser.array? type) (parser.class? type)] (^.or [{.#Some _} _] [_ {.#Some _}]) - (in (list (` (.is (~ (..value_type {#ManualPrM} type)) - ("jvm object cast" (~ object)))))) + (in (list (` (.is (, (..value_type {#ManualPrM} type)) + ("jvm object cast" (, object)))))) _ (meta.failure (exception.error ..cannot_cast_to_non_object [type]))))) diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 90681746d..3dd10ebe6 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -234,8 +234,8 @@ (`` (`` (type Sub (Variant - (~~ (for @.lua (~~ (these)) - @.ruby (~~ (these)) + (,, (for @.lua (,, (these)) + @.ruby (,, (these)) {#Constructor Constructor})) {#Field Field} {#Method Method})))) @@ -243,8 +243,8 @@ (`` (`` (def sub (Parser Sub) (all <>.or - (~~ (for @.lua (~~ (these)) - @.ruby (~~ (these)) + (,, (for @.lua (,, (these)) + @.ruby (,, (these)) ..constructor)) ..field ..method @@ -260,7 +260,7 @@ (def (output_type it) (-> Optional Code) (if (the #optional? it) - (` (.Maybe (~ (the #mandatory it)))) + (` (.Maybe (, (the #mandatory it)))) (the #mandatory it))) (`` (with_template [<lux_it> <host_it> @@ -278,9 +278,9 @@ (def (host_optional it) (-> Optional Code) (.if (.the #optional? it) - (` (.case (~ (the #mandatory it)) - {.#Some (~ g!it')} - (~ g!it') + (` (.case (, (the #mandatory it)) + {.#Some (, g!it')} + (, g!it') {.#None} (<host_it>))) @@ -288,16 +288,16 @@ (def (lux_optional it output) (-> Optional Code Code) - (` (.let [(~ g!it') (~ output)] - (~ (if (the #optional? it) - (` (.if (<host_?> (~ g!it')) + (` (.let [(, g!it') (, output)] + (, (if (the #optional? it) + (` (.if (<host_?> (, g!it')) {.#None} - {.#Some (~ g!it')})) - (` (.if (.not (<host_?> (~ g!it'))) - (~ g!it') + {.#Some (, g!it')})) + (` (.if (.not (<host_?> (, g!it'))) + (, g!it') (.panic! "Invalid output."))))))))))] - (~~ (for @.js [null "js object null" + (,, (for @.js [null "js object null" null? "js object null?"] @.python [none "python object none" none? "python object none?"] @@ -347,19 +347,19 @@ (def (input_type input :it:) (-> Input Code Code) (let [:it: (if (the #try? input) - (` (.Either .Text (~ :it:))) + (` (.Either .Text (, :it:))) :it:)] (if (the #io? input) - (` ((~! io.IO) (~ :it:))) + (` ((,! io.IO) (, :it:))) :it:))) (def (input_term input term) (-> Input Code Code) (let [term (if (the #try? input) - (` (.try (~ term))) + (` (.try (, term))) term)] (if (the #io? input) - (` ((~! io.io) (~ term))) + (` ((,! io.io) (, term))) term))) (def (procedure_definition import! source it) @@ -378,21 +378,21 @@ parameters (list#each ..output_type :parameters:))] - (` (.def ((~ g!it) (~+ (case g!parameters + (` (.def ((, g!it) (,* (case g!parameters {.#End} (list g!it) _ (list#each (the #mandatory) g!parameters)))) - (.All ((~ g!it) (~+ g!variables)) - (-> (~+ :input:/*) - (~ (|> :output: + (.All ((, g!it) (,* g!variables)) + (-> (,* :input:/*) + (, (|> :output: ..output_type (..input_type input))))) (.exec - (~+ import!) + (,* import!) (.as_expected - (~ (<| (..input_term input) + (, (<| (..input_term input) (..lux_optional :output:) - (` (<apply> (.as_expected (~ source)) - [(~+ (list#each ..host_optional g!parameters))])))))))))) + (` (<apply> (.as_expected (, source)) + [(,* (list#each ..host_optional g!parameters))])))))))))) (def (namespaced namespace class alias member) (-> Namespace Text Alias Text Text) @@ -411,14 +411,14 @@ (case (text.all_split_by .module_separator class) {.#Item head tail} (list#mix (.function (_ sub super) - (` (<get> (~ (code.text sub)) + (` (<get> (, (code.text sub)) (.as (..Object .Any) - (~ super))))) - (` (<import> (~ (code.text head)))) + (, super))))) + (` (<import> (, (code.text head)))) tail) {.#End} - (` (<import> (~ (code.text class))))))) + (` (<import> (, (code.text class))))))) (def (global_definition import! it) (-> (List Code) Global Code) @@ -426,13 +426,13 @@ (maybe.else (the #name it)) code.local) :output: (the #anonymous it)] - (` (.def (~ g!name) - (~ (..output_type :output:)) + (` (.def (, g!name) + (, (..output_type :output:)) (.exec - (~+ import!) + (,* import!) (.as_expected - (~ (<| (lux_optional :output:) - (` (<constant> (~ (code.text (..host_path (the #name it)))))))))))))) + (, (<| (lux_optional :output:) + (` (<constant> (, (code.text (..host_path (the #name it)))))))))))))) (for @.lua (these) @.ruby (these) @@ -448,23 +448,23 @@ :parameters: (the #parameters input) g!parameters (..parameters :parameters:) g!class_variables (list#each code.local class_parameters) - g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables))) + g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!class_variables))) :output: [#optional? false #mandatory g!class]] - (` (.def ((~ g!it) (~+ (case g!parameters + (` (.def ((, g!it) (,* (case g!parameters {.#End} (list g!it) _ (list#each (the #mandatory) g!parameters)))) - (.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables)) - (.-> (~+ (list#each ..output_type :parameters:)) - (~ (|> :output: + (.All ((, g!it) (,* g!class_variables) (,* g!input_variables)) + (.-> (,* (list#each ..output_type :parameters:)) + (, (|> :output: ..output_type (..input_type input))))) (.as_expected - (~ (<| (..input_term input) + (, (<| (..input_term input) (..lux_optional :output:) - (` (<new> (~ (for @.js (` (<constant> (~ (code.text (..host_path class_name))))) + (` (<new> (, (for @.js (` (<constant> (, (code.text (..host_path class_name))))) @.python (` (.as ..Function - (~ (..imported class_name)))))) - [(~+ (list#each ..host_optional g!parameters))])))))))))) + (, (..imported class_name)))))) + [(,* (list#each ..host_optional g!parameters))])))))))))) (def (static_field_definition import! [class_name class_parameters] alias namespace it) (-> (List Code) Declaration Alias Namespace (Named Output) Code) @@ -474,17 +474,17 @@ (..namespaced namespace class_name alias) code.local) :field: (the #anonymous it)] - (` (def (~ g!it) - ((~! syntax) ((~ g!it) []) - (.at (~! meta.monad) (~' in) + (` (def (, g!it) + ((,! syntax) ((, g!it) []) + (.at (,! meta.monad) (,' in) (.list (`' (.exec - (~+ import!) - (.as (~ (..output_type :field:)) - (~ (<| (lux_optional :field:) - (for @.js (` (<constant> (~ (code.text (%.format (..host_path class_name) "." field))))) - @.ruby (` (<constant> (~ (code.text (%.format (..host_path class_name) "::" field))))) - (` (<get> (~ (code.text field)) - (~ (..imported class_name))))))))))))))))) + (,* import!) + (.as (, (..output_type :field:)) + (, (<| (lux_optional :field:) + (for @.js (` (<constant> (, (code.text (%.format (..host_path class_name) "." field))))) + @.ruby (` (<constant> (, (code.text (%.format (..host_path class_name) "::" field))))) + (` (<get> (, (code.text field)) + (, (..imported class_name))))))))))))))))) (def (virtual_field_definition [class_name class_parameters] alias namespace it) (-> Declaration Alias Namespace (Named Output) Code) @@ -496,14 +496,14 @@ path (%.format (..host_path class_name) "." name) :field: (the #anonymous it) g!variables (list#each code.local class_parameters) - g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!variables)))] - (` (.def ((~ g!it) (~ g!it)) - (.All ((~ g!it) (~+ g!variables)) - (.-> (~ g!class) - (~ (..output_type :field:)))) + g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!variables)))] + (` (.def ((, g!it) (, g!it)) + (.All ((, g!it) (,* g!variables)) + (.-> (, g!class) + (, (..output_type :field:)))) (.as_expected - (~ (<| (lux_optional :field:) - (` (<get> (~ (code.text name)) (~ g!it)))))))))) + (, (<| (lux_optional :field:) + (` (<get> (, (code.text name)) (, g!it)))))))))) (def (field_definition import! class alias namespace it) (-> (List Code) Declaration Alias Namespace Field Code) @@ -520,11 +520,11 @@ (|> it (has #alias {.#Some name}) (..procedure_definition import! - (for @.js (` (<constant> (~ (code.text (%.format (..host_path class_name) "." method))))) - @.ruby (` (<constant> (~ (code.text (%.format (..host_path class_name) "::" method))))) - (` (<get> (~ (code.text method)) + (for @.js (` (<constant> (, (code.text (%.format (..host_path class_name) "." method))))) + @.ruby (` (<constant> (, (code.text (%.format (..host_path class_name) "::" method))))) + (` (<get> (, (code.text method)) (.as (..Object .Any) - (~ (..imported class_name)))))))))) + (, (..imported class_name)))))))))) (def (virtual_method_definition [class_name class_parameters] alias namespace it) (-> Declaration Alias Namespace (Named Procedure) Code) @@ -539,21 +539,21 @@ :parameters: (the #parameters input) g!parameters (..parameters :parameters:) g!class_variables (list#each code.local class_parameters) - g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables))) + g!class (` ((, (code.local (maybe.else class_name alias))) (,* g!class_variables))) :output: (the #output procedure)] - (` (.def ((~ g!it) (~+ (list#each (the #mandatory) g!parameters)) (~ g!it)) - (.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables)) - (.-> (~+ (list#each ..output_type :parameters:)) - (~ g!class) - (~ (|> :output: + (` (.def ((, g!it) (,* (list#each (the #mandatory) g!parameters)) (, g!it)) + (.All ((, g!it) (,* g!class_variables) (,* g!input_variables)) + (.-> (,* (list#each ..output_type :parameters:)) + (, g!class) + (, (|> :output: ..output_type (..input_type input))))) (.as_expected - (~ (<| (..input_term input) + (, (<| (..input_term input) (..lux_optional :output:) - (` (<do> (~ (code.text method)) - (~ g!it) - [(~+ (list#each ..host_optional g!parameters))]))))))))) + (` (<do> (, (code.text method)) + (, g!it) + [(,* (list#each ..host_optional g!parameters))]))))))))) (def (method_definition import! class alias namespace it) (-> (List Code) Declaration Alias Namespace Method Code) @@ -567,7 +567,7 @@ (let [host_module_import! (is (List Code) (case host_module {.#Some host_module} - (list (` (<import> (~ (code.text host_module))))) + (list (` (<import> (, (code.text host_module))))) {.#None} (list)))] @@ -577,7 +577,7 @@ {#Procedure it} (in (list (..procedure_definition host_module_import! - (` (<constant> (~ (code.text (..host_path (the #name it)))))) + (` (<constant> (, (code.text (..host_path (the #name it)))))) it))) {#Class it} @@ -586,16 +586,16 @@ [class_name class_parameters] class namespace (the #namespace it) g!class_variables (list#each code.local class_parameters) - declaration (` ((~ (code.local (maybe.else class_name alias))) - (~+ g!class_variables)))] - (in (list.partial (` (.type (~ declaration) - (..Object (.Primitive (~ (code.text (..host_path class_name))) - [(~+ g!class_variables)])))) + declaration (` ((, (code.local (maybe.else class_name alias))) + (,* g!class_variables)))] + (in (list.partial (` (.type (, declaration) + (..Object (.Primitive (, (code.text (..host_path class_name))) + [(,* g!class_variables)])))) (list#each (.function (_ member) (`` (`` (case member - (~~ (for @.lua (~~ (these)) - @.ruby (~~ (these)) - (~~ (these {#Constructor it} + (,, (for @.lua (,, (these)) + @.ruby (,, (these)) + (,, (these {#Constructor it} (..constructor_definition class alias namespace it))))) {#Field it} @@ -615,13 +615,13 @@ type <code>.any term <code>.any]) (in (list (` (.<| (.as ..Function) - (<function> (~ (code.nat (list.size inputs)))) - (.as (.-> [(~+ (list.repeated (list.size inputs) (` .Any)))] + (<function> (, (code.nat (list.size inputs)))) + (.as (.-> [(,* (list.repeated (list.size inputs) (` .Any)))] .Any)) - (.is (.-> [(~+ (list#each product.right inputs))] - (~ type))) - (.function ((~ (code.local self)) [(~+ (list#each product.left inputs))]) - (~ term))))))))) + (.is (.-> [(,* (list#each product.right inputs))] + (, type))) + (.function ((, (code.local self)) [(,* (list#each product.left inputs))]) + (, term))))))))) (for @.js (these (def .public type_of (template (type_of object) @@ -631,27 +631,27 @@ (syntax (_ [type <code>.any [head tail] (<code>.tuple (<>.and <code>.local (<>.some <code>.local)))]) (with_symbols [g!_] - (let [global (` ("js constant" (~ (code.text head))))] + (let [global (` ("js constant" (, (code.text head))))] (case tail {.#End} - (in (list (` (is (.Maybe (~ type)) - (case (..type_of (~ global)) + (in (list (` (is (.Maybe (, type)) + (case (..type_of (, global)) "undefined" {.#None} - (~ g!_) - {.#Some (as (~ type) (~ global))}))))) + (, g!_) + {.#Some (as (, type) (, global))}))))) {.#Item [next tail]} (let [separator "."] - (in (list (` (is (.Maybe (~ type)) - (case (..type_of (~ global)) + (in (list (` (is (.Maybe (, type)) + (case (..type_of (, global)) "undefined" {.#None} - (~ g!_) - (..global (~ type) [(~ (code.local (%.format head "." next))) - (~+ (list#each code.local tail))])))))))))))) + (, g!_) + (..global (, type) [(, (code.local (%.format head "." next))) + (,* (list#each code.local tail))])))))))))))) (def !defined? (template (_ <global>) @@ -748,7 +748,7 @@ <code>.any it (do try.monad - [[state it] (phase archive (` (.is .Any (~ it))) state)] + [[state it] (phase archive (` (.is .Any (, it))) state)] (in [state (extension_analysis name (list it))]))) (generation <undefined?> @@ -769,7 +769,7 @@ (do [! try.monad] [[state output] (monad.mix ! (.function (_ [key value] [state output]) (do ! - [[state value] (phase archive (` (.is .Any (~ value))) state)] + [[state value] (phase archive (` (.is .Any (, value))) state)] (in [state (list.partial value (text_analysis key) output)]))) [state (list)] it)] @@ -812,7 +812,7 @@ (def .public object (syntax (_ [it (<>.some <code>.any)]) (in (list (` (.as (..Object .Any) - (<object> (~+ it)))))))) + (<object> (,* it)))))))) ))) (these)) ) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index e35e7844d..329fce274 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -342,7 +342,7 @@ [[name params] _ _] (let [name (safe name) =params (list#each (class_type' mode type_params in_array?) params)] - (` (Primitive (~ (code.text name)) [(~+ =params)]))))) + (` (Primitive (, (code.text name)) [(,* =params)]))))) (def (class_type' mode type_params in_array? class) (-> Primitive_Mode (List Type_Parameter) Bit GenericType Code) @@ -364,7 +364,7 @@ {#GenericArray param} (let [=param (class_type' mode type_params #1 param)] - (` ((~! array.Array) (~ =param)))) + (` ((,! array.Array) (, =param)))) (^.or {#GenericWildcard {.#None}} {#GenericWildcard {.#Some [{#LowerBound} _]}}) @@ -393,8 +393,8 @@ {.#Item bound1 _} (class_type {#ManualPrM} #class_params bound1)))) #class_params)] - (` (Primitive (~ (code.text (safe #class_name))) - [(~+ =params)])))) + (` (Primitive (, (code.text (safe #class_name))) + [(,* =params)])))) (def type_var_class Text "java.lang.Object") @@ -448,14 +448,14 @@ (do <>.monad [.let [dotted_name (format "::" field_name)] _ (<code>.this (code.symbol ["" dotted_name]))] - (in (`' ((~ (code.text (format "jvm getstatic" ":" class_name ":" field_name)))))))) + (in (`' ((, (code.text (format "jvm getstatic" ":" class_name ":" field_name)))))))) (def (get_var_parser class_name field_name) (-> Text Text (Parser Code)) (do <>.monad [.let [dotted_name (format "::" field_name)] _ (<code>.this (code.symbol ["" dotted_name]))] - (in (`' ((~ (code.text (format "jvm getfield" ":" class_name ":" field_name))) _jvm_this))))) + (in (`' ((, (code.text (format "jvm getfield" ":" class_name ":" field_name))) _jvm_this))))) (def (put_var_parser class_name field_name) (-> Text Text (Parser Code)) @@ -463,7 +463,7 @@ [.let [dotted_name (format "::" field_name)] [_ _ value] (.is (Parser [Any Any Code]) (<code>.form (all <>.and (<code>.this (' :=)) (<code>.this (code.symbol ["" dotted_name])) <code>.any)))] - (in (`' ((~ (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (~ value)))))) + (in (`' ((, (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (, value)))))) (def (pre_walk_replace f input) (-> (-> Code Code) Code Code) @@ -505,8 +505,8 @@ (<code>.form (<>.after (<code>.this (' ::new!)) (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))))) .let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]] - (in (` ((~ (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls')))) - (~+ args)))))) + (in (` ((, (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls')))) + (,* args)))))) (def (static_method_parser params class_name method_name arg_decls) (-> (List Type_Parameter) Text Text (List ArgDecl) (Parser Code)) @@ -516,8 +516,8 @@ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name])) (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))))) .let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]] - (in (`' ((~ (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls')))) - (~+ args)))))) + (in (`' ((, (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls')))) + (,* args)))))) (with_template [<name> <jvm_op>] [(def (<name> params class_name method_name arg_decls) @@ -528,8 +528,8 @@ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name])) (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))))) .let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]] - (in (`' ((~ (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls')))) - (~' _jvm_this) (~+ args))))))] + (in (`' ((, (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls')))) + (,' _jvm_this) (,* args))))))] [special_method_parser "jvm invokespecial"] [virtual_method_parser "jvm invokevirtual"] @@ -1125,8 +1125,8 @@ (with_brackets (spaced (list#each generic_type$ exs))) (with_brackets (spaced (list#each arg_decl$ arg_decls))) (generic_type$ return_type) - (code.format (pre_walk_replace replacer (` (let [(~ (code.local this_name)) (~' _jvm_this)] - (~ body)))))))) + (code.format (pre_walk_replace replacer (` (let [(, (code.local this_name)) (,' _jvm_this)] + (, body)))))))) {#OverridenMethod strict_fp? class_decl type_vars this_name arg_decls return_type body exs} (let [super_replacer (parser_replacer (<code>.form (do <>.monad @@ -1134,11 +1134,11 @@ args (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)) .let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ (list))) arg_decls))]] - (in (`' ((~ (code.text (format "jvm invokespecial" + (in (`' ((, (code.text (format "jvm invokespecial" ":" (the #super_class_name super_class) ":" name ":" (text.interposed "," arg_decls')))) - (~' _jvm_this) (~+ args)))))))] + (,' _jvm_this) (,* args)))))))] (with_parens (spaced (list "override" (class_decl$ class_decl) @@ -1149,8 +1149,8 @@ (with_brackets (spaced (list#each generic_type$ exs))) (with_brackets (spaced (list#each arg_decl$ arg_decls))) (generic_type$ return_type) - (|> (` (let [(~ (code.local this_name)) (~' _jvm_this)] - (~ body))) + (|> (` (let [(, (code.local this_name)) (,' _jvm_this)] + (, body))) (pre_walk_replace replacer) (pre_walk_replace super_replacer) (code.format)) @@ -1194,7 +1194,7 @@ (def (complete_call$ g!obj [method args]) (-> Code Partial_Call Code) - (` ((~ (code.symbol method)) (~+ args) (~ g!obj)))) + (` ((, (code.symbol method)) (,* args) (, g!obj)))) ... [Syntax] (def object_super_class @@ -1230,7 +1230,7 @@ (with_brackets (spaced (list#each annotation$ annotations))) (with_brackets (spaced (list#each field_decl$ fields))) (with_brackets (spaced (list#each (method_def$ replacer super) methods))))))]] - (in (list (` ((~ (code.text def_code))))))))) + (in (list (` ((, (code.text def_code))))))))) (def .public interface (syntax (_ [class_decl ..class_decl^ @@ -1244,7 +1244,7 @@ (with_brackets (spaced (list#each super_class_decl$ supers))) (with_brackets (spaced (list#each annotation$ annotations))) (spaced (list#each method_decl$ members)))))] - (in (list (` ((~ (code.text def_code))))))))) + (in (list (` ((, (code.text def_code))))))))) (def .public object (syntax (_ [class_vars (<code>.tuple (<>.some ..type_param^)) @@ -1259,7 +1259,7 @@ (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$ function.identity super) methods))))))] - (in (list (` ((~ (code.text def_code))))))))) + (in (list (` ((, (code.text def_code))))))))) (def .public null (syntax (_ []) @@ -1272,17 +1272,17 @@ (def .public ??? (syntax (_ [expr <code>.any]) (with_symbols [g!temp] - (in (list (` (let [(~ g!temp) (~ expr)] - (if ("jvm object null?" (~ g!temp)) + (in (list (` (let [(, g!temp) (, expr)] + (if ("jvm object null?" (, g!temp)) {.#None} - {.#Some (~ g!temp)})))))))) + {.#Some (, g!temp)})))))))) (def .public !!! (syntax (_ [expr <code>.any]) (with_symbols [g!value] - (in (list (` (.case (~ expr) - {.#Some (~ g!value)} - (~ g!value) + (in (list (` (.case (, expr) + {.#Some (, g!value)} + (, g!value) {.#None} ("jvm object null")))))))) @@ -1292,46 +1292,46 @@ unchecked (<>.maybe <code>.any)]) (with_symbols [g!_ g!unchecked] (let [class_name (simple_class$ (list) class) - class_type (` (.Primitive (~ (code.text class_name)))) - check_type (` (.Maybe (~ class_type))) - check_code (` (if ((~ (code.text (format "jvm instanceof" ":" class_name))) (~ g!unchecked)) - {.#Some (.as (~ class_type) - (~ g!unchecked))} + class_type (` (.Primitive (, (code.text class_name)))) + check_type (` (.Maybe (, class_type))) + check_code (` (if ((, (code.text (format "jvm instanceof" ":" class_name))) (, g!unchecked)) + {.#Some (.as (, class_type) + (, g!unchecked))} {.#None}))] (case unchecked {.#Some unchecked} - (in (list (` (.is (~ check_type) - (let [(~ g!unchecked) (~ unchecked)] - (~ check_code)))))) + (in (list (` (.is (, check_type) + (let [(, g!unchecked) (, unchecked)] + (, check_code)))))) {.#None} - (in (list (` (.is (-> (Primitive "java.lang.Object") (~ check_type)) - (function ((~ g!_) (~ g!unchecked)) - (~ check_code)))))) + (in (list (` (.is (-> (Primitive "java.lang.Object") (, check_type)) + (function ((, g!_) (, g!unchecked)) + (, check_code)))))) ))))) (def .public synchronized (syntax (_ [lock <code>.any body <code>.any]) - (in (list (` ("jvm object synchronized" (~ lock) (~ body))))))) + (in (list (` ("jvm object synchronized" (, lock) (, body))))))) (def .public do_to (syntax (_ [obj <code>.any methods (<>.some partial_call^)]) (with_symbols [g!obj] - (in (list (` (let [(~ g!obj) (~ obj)] - (exec (~+ (list#each (complete_call$ g!obj) methods)) - (~ g!obj))))))))) + (in (list (` (let [(, g!obj) (, obj)] + (exec (,* (list#each (complete_call$ g!obj) methods)) + (, g!obj))))))))) (def (class_import$ [full_name params]) (-> Class_Declaration Code) (let [params' (list#each (|>> product.left code.local) params)] (template.with_locals [g!_] - (` (def (~ (code.symbol ["" full_name])) + (` (def (, (code.symbol ["" full_name])) Type - (All ((~ (' g!_)) (~+ params')) - (Primitive (~ (code.text (safe full_name))) - [(~+ params')]))))))) + (All ((, (' g!_)) (,* params')) + (Primitive (, (code.text (safe full_name))) + [(,* params')]))))))) (def (member_type_vars class_tvars member) (-> (List Type_Parameter) Import_Member_Declaration (List Type_Parameter)) @@ -1369,7 +1369,7 @@ (function (_ [maybe? arg]) (let [arg_type (class_type (the #import_member_mode commons) type_params arg)] (if maybe? - (` (Maybe (~ arg_type))) + (` (Maybe (, arg_type))) arg_type)))) #import_member_args)]] (in [arg_inputs arg_classes arg_types]))) @@ -1382,13 +1382,13 @@ (case member (^.or {#ConstructorDecl [commons _]} {#MethodDecl [commons _]}) (if (the #import_member_maybe? commons) - (` (??? (~ return_term))) - (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))] - (` (let [(~ g!temp) (~ return_term)] + (` (??? (, return_term))) + (let [g!temp (` ((,' ,') (, (code.symbol ["" " Ω "]))))] + (` (let [(, g!temp) (, return_term)] (if (not (..null? (.as (Primitive "java.lang.Object") - (~ g!temp)))) - (~ g!temp) - (panic! (~ (code.text (format "Cannot produce null references from method calls @ " + (, g!temp)))) + (, g!temp) + (panic! (, (code.text (format "Cannot produce null references from method calls @ " (the #class_name class) "." (the #import_member_alias commons)))))))))) @@ -1407,8 +1407,8 @@ _ return_term))] - [decorate_return_try #import_member_try? (` (.try (~ return_term)))] - [decorate_return_io #import_member_io? (` ((~! io.io) (~ return_term)))] + [decorate_return_try #import_member_try? (` (.try (, return_term)))] + [decorate_return_io #import_member_io? (` ((,! io.io) (, return_term)))] ) (def (free_type_param? [name bounds]) @@ -1437,14 +1437,14 @@ (def (un_quote quoted) (-> Code Code) - (` ((~' ~) (~ quoted)))) + (` ((,' ,) (, quoted)))) (def (jvm_extension_inputs mode classes inputs) (-> Primitive_Mode (List Text) (List [Bit Code]) (List Code)) (|> inputs (list#each (function (_ [maybe? input]) (if maybe? - (` ((~! !!!) (~ (un_quote input)))) + (` ((,! !!!) (, (un_quote input)))) (un_quote input)))) (list.zipped_2 classes) (list#each (auto_convert_input mode)))) @@ -1458,7 +1458,7 @@ (def syntax_inputs (-> (List Code) (List Code)) (|>> (list#each (function (_ name) - (list name (` (~! <code>.any))))) + (list name (` (,! <code>.any))))) list#conjoint)) (def (member_def_interop type_params kind class [arg_function_inputs arg_classes arg_types] member method_prefix import_format) @@ -1475,33 +1475,33 @@ [.let [enum_type (.is Code (case class_tvars {.#End} - (` (Primitive (~ (code.text full_name)))) + (` (Primitive (, (code.text full_name)))) _ (let [=class_tvars (|> class_tvars (list.only free_type_param?) (list#each lux_type_parameter))] - (` (All ((~ g!_) (~+ =class_tvars)) (Primitive (~ (code.text full_name)) [(~+ =class_tvars)])))))) + (` (All ((, g!_) (,* =class_tvars)) (Primitive (, (code.text full_name)) [(,* =class_tvars)])))))) getter_interop (.is (-> Text Code) (function (_ name) (let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])] - (` (def (~ getter_name) - (~ enum_type) - ((~ (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]] + (` (def (, getter_name) + (, enum_type) + ((, (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]] (in (list#each getter_interop enum_members)))) {#ConstructorDecl [commons _]} (do meta.monad [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))]) jvm_extension (code.text (format "jvm new" ":" full_name ":" (text.interposed "," arg_classes))) - jvm_interop (|> (` ((~ jvm_extension) - (~+ (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs)))) + jvm_interop (|> (` ((, jvm_extension) + (,* (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs)))) (decorate_return_maybe class member) (decorate_return_try member) (decorate_return_io member))]] - (in (list (` (def (~ def_name) - ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))]) - ((~' in) (.list (.` (~ jvm_interop)))))))))) + (in (list (` (def (, def_name) + ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))]) + ((,' in) (.list (.` (, jvm_interop)))))))))) {#MethodDecl [commons method]} (with_symbols [g!obj] @@ -1527,16 +1527,16 @@ ))) jvm_extension (code.text (format "jvm " jvm_op ":" full_name ":" #import_method_name ":" (text.interposed "," arg_classes))) jvm_interop (|> [(simple_class$ (list) (the #import_method_return method)) - (` ((~ jvm_extension) (~+ (list#each un_quote object_ast)) - (~+ (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))] + (` ((, jvm_extension) (,* (list#each un_quote object_ast)) + (,* (jvm_extension_inputs (the #import_member_mode commons) arg_classes arg_function_inputs))))] (auto_convert_output (the #import_member_mode commons)) (decorate_return_maybe class member) (decorate_return_try member) (decorate_return_io member))]] - (in (list (` (def (~ def_name) - ((~! syntax) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs))) - (~+ (syntax_inputs object_ast))]) - ((~' in) (.list (.` (~ jvm_interop))))))))))) + (in (list (` (def (, def_name) + ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs))) + (,* (syntax_inputs object_ast))]) + ((,' in) (.list (.` (, jvm_interop))))))))))) {#FieldAccessDecl fad} (do meta.monad @@ -1544,7 +1544,7 @@ base_gtype (class_type #import_field_mode type_params #import_field_type) classC (class_decl_type$ class) typeC (if #import_field_maybe? - (` (Maybe (~ base_gtype))) + (` (Maybe (, base_gtype))) base_gtype) tvar_asts (.is (List Code) (|> class_tvars @@ -1554,35 +1554,35 @@ setter_name (code.symbol ["" (..import_name import_format method_prefix (format #import_field_name "!"))])] getter_interop (with_symbols [g!obj] (let [getter_call (if #import_field_static? - (` ((~ getter_name) [])) - (` ((~ getter_name) [(~ g!obj) (~! <code>.any)]))) + (` ((, getter_name) [])) + (` ((, getter_name) [(, g!obj) (,! <code>.any)]))) getter_body (<| (auto_convert_output #import_field_mode) [(simple_class$ (list) #import_field_type) (if #import_field_static? (let [jvm_extension (code.text (format "jvm getstatic" ":" full_name ":" #import_field_name))] - (` ((~ jvm_extension)))) + (` ((, jvm_extension)))) (let [jvm_extension (code.text (format "jvm getfield" ":" full_name ":" #import_field_name))] - (` ((~ jvm_extension) (~ (un_quote g!obj))))))]) + (` ((, jvm_extension) (, (un_quote g!obj))))))]) getter_body (if #import_field_maybe? - (` ((~! ???) (~ getter_body))) + (` ((,! ???) (, getter_body))) getter_body) getter_body (if #import_field_setter? - (` ((~! io.io) (~ getter_body))) + (` ((,! io.io) (, getter_body))) getter_body)] - (in (` (def (~ getter_name) - ((~! syntax) (~ getter_call) - ((~' in) (.list (.` (~ getter_body)))))))))) + (in (` (def (, getter_name) + ((,! syntax) (, getter_call) + ((,' in) (.list (.` (, getter_body)))))))))) setter_interop (.is (Meta (List Code)) (if #import_field_setter? (with_symbols [g!obj g!value] (let [setter_call (if #import_field_static? - (` ((~ setter_name) [(~ g!value) (~! <code>.any)])) - (` ((~ setter_name) [(~ g!value) (~! <code>.any) - (~ g!obj) (~! <code>.any)]))) + (` ((, setter_name) [(, g!value) (,! <code>.any)])) + (` ((, setter_name) [(, g!value) (,! <code>.any) + (, g!obj) (,! <code>.any)]))) setter_value (auto_convert_input #import_field_mode [(simple_class$ (list) #import_field_type) (un_quote g!value)]) setter_value (if #import_field_maybe? - (` ((~! !!!) (~ setter_value))) + (` ((,! !!!) (, setter_value))) setter_value) setter_command (format (if #import_field_static? "jvm putstatic" "jvm putfield") ":" full_name ":" #import_field_name) @@ -1590,9 +1590,9 @@ (if #import_field_static? (list) (list (un_quote g!obj))))] - (in (list (` (def (~ setter_name) - ((~! syntax) (~ setter_call) - ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))) + (in (list (` (def (, setter_name) + ((,! syntax) (, setter_call) + ((,' in) (.list (.` ((,! io.io) ((, (code.text setter_command)) (,* g!obj+) (, setter_value))))))))))))) (in (list))))] (in (list.partial getter_interop setter_interop))) ))) @@ -1645,7 +1645,7 @@ (case type (^.with_template [<type> <array_op>] [(pattern {#GenericClass <type> (list)}) - (in (list (` (<array_op> (~ size)))))]) + (in (list (` (<array_op> (, size)))))]) (["boolean" "jvm znewarray"] ["byte" "jvm bnewarray"] ["short" "jvm snewarray"] @@ -1656,11 +1656,11 @@ ["char" "jvm cnewarray"]) _ - (in (list (` ("jvm anewarray" (~ (code.text (generic_type$ type))) (~ size)))))))) + (in (list (` ("jvm anewarray" (, (code.text (generic_type$ type))) (, size)))))))) (def .public length (syntax (_ [array <code>.any]) - (in (list (` ("jvm arraylength" (~ array))))))) + (in (list (` ("jvm arraylength" (, array))))))) (def (type_class_name type) (-> Type (Meta Text)) @@ -1695,7 +1695,7 @@ (case array_jvm_type (^.with_template [<type> <array_op>] [<type> - (in (list (` (<array_op> (~ array) (~ idx)))))]) + (in (list (` (<array_op> (, array) (, idx)))))]) (["[Z" "jvm zaload"] ["[B" "jvm baload"] ["[S" "jvm saload"] @@ -1706,12 +1706,12 @@ ["[C" "jvm caload"]) _ - (in (list (` ("jvm aaload" (~ array) (~ idx))))))) + (in (list (` ("jvm aaload" (, array) (, idx))))))) _ (with_symbols [g!array] - (in (list (` (let [(~ g!array) (~ array)] - (..read! (~ idx) (~ g!array)))))))))) + (in (list (` (let [(, g!array) (, array)] + (..read! (, idx) (, g!array)))))))))) (def .public write! (syntax (_ [idx <code>.any @@ -1725,7 +1725,7 @@ (case array_jvm_type (^.with_template [<type> <array_op>] [<type> - (in (list (` (<array_op> (~ array) (~ idx) (~ value)))))]) + (in (list (` (<array_op> (, array) (, idx) (, value)))))]) (["[Z" "jvm zastore"] ["[B" "jvm bastore"] ["[S" "jvm sastore"] @@ -1736,16 +1736,16 @@ ["[C" "jvm castore"]) _ - (in (list (` ("jvm aastore" (~ array) (~ idx) (~ value))))))) + (in (list (` ("jvm aastore" (, array) (, idx) (, value))))))) _ (with_symbols [g!array] - (in (list (` (let [(~ g!array) (~ array)] - (..write! (~ idx) (~ value) (~ g!array)))))))))) + (in (list (` (let [(, g!array) (, array)] + (..write! (, idx) (, value) (, g!array)))))))))) (def .public class_for (syntax (_ [type (..generic_type^ (list))]) - (in (list (` ("jvm object class" (~ (code.text (simple_class$ (list) type))))))))) + (in (list (` ("jvm object class" (, (code.text (simple_class$ (list) type))))))))) (def .public type (syntax (_ [type (..generic_type^ (list))]) diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index 42df739ad..fecdf259a 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -141,15 +141,15 @@ (def (nullable_type [nullable? type]) (-> Nullable Code) (if nullable? - (` (.Maybe (~ type))) + (` (.Maybe (, type))) type)) (def (with_null g!temp [nullable? input]) (-> Code [Bit Code] Code) (if nullable? - (` (case (~ input) - {.#Some (~ g!temp)} - (~ g!temp) + (` (case (, input) + {.#Some (, g!temp)} + (, g!temp) {.#Null} ("php object null"))) @@ -158,13 +158,13 @@ (def (without_null g!temp [nullable? outputT] output) (-> Code Nullable Code Code) (if nullable? - (` (let [(~ g!temp) (~ output)] - (if ("php object null?" (~ g!temp)) + (` (let [(, g!temp) (, output)] + (if ("php object null?" (, g!temp)) {.#None} - {.#Some (~ g!temp)}))) - (` (let [(~ g!temp) (~ output)] - (if (not ("php object null?" (~ g!temp))) - (~ g!temp) + {.#Some (, g!temp)}))) + (` (let [(, g!temp) (, output)] + (if (not ("php object null?" (, g!temp))) + (, g!temp) (.panic! "Null is an invalid value!")))))) (type Import @@ -194,48 +194,48 @@ ... {.#Left error} ... (recover_from_failure error)))} - (in (list (` ("lux try" ((~! io.io) (~ expression)))))))) + (in (list (` ("lux try" ((,! io.io) (, expression)))))))) (def (with_io with? without) (-> Bit Code Code) (if with? - (` ((~! io.io) (~ without))) + (` ((,! io.io) (, without))) without)) (def (io_type io? rawT) (-> Bit Code Code) (if io? - (` ((~! io.IO) (~ rawT))) + (` ((,! io.IO) (, rawT))) rawT)) (def (with_try with? without_try) (-> Bit Code Code) (if with? - (` (..try (~ without_try))) + (` (..try (, without_try))) without_try)) (def (try_type try? rawT) (-> Bit Code Code) (if try? - (` (.Either .Text (~ rawT))) + (` (.Either .Text (, rawT))) rawT)) (def (make_function g!method g!temp source inputsT io? try? outputT) (-> Code Code Code (List Nullable) Bit Bit Nullable Code) (let [g!inputs (input_variables inputsT)] - (` (def ((~ g!method) - [(~+ (list#each product.right g!inputs))]) - (-> [(~+ (list#each nullable_type inputsT))] - (~ (|> (nullable_type outputT) + (` (def ((, g!method) + [(,* (list#each product.right g!inputs))]) + (-> [(,* (list#each nullable_type inputsT))] + (, (|> (nullable_type outputT) (try_type try?) (io_type io?)))) (as_expected - (~ (<| (with_io io?) + (, (<| (with_io io?) (with_try try?) (without_null g!temp outputT) (` ("php apply" - (as ..Function (~ source)) - (~+ (list#each (with_null g!temp) g!inputs))))))))))) + (as ..Function (, source)) + (,* (list#each (with_null g!temp) g!inputs))))))))))) (def .public import (syntax (_ [import ..import]) @@ -250,34 +250,34 @@ (text.replaced "[0]" member_name) code.local))) g!type (code.local (maybe.else class alias)) - class_import (` ("php constant" (~ (code.text class))))] - (in (list.partial (` (type (~ g!type) - (..Object (Primitive (~ (code.text class)))))) + class_import (` ("php constant" (, (code.text class))))] + (in (list.partial (` (type (, g!type) + (..Object (Primitive (, (code.text class)))))) (list#each (function (_ member) (case member {#Field [static? field alias fieldT]} (let [g!field (qualify (maybe.else field alias))] (if static? - (` (def (~ g!field) - ((~! syntax) ((~ g!field) []) - (at (~! meta.monad) (~' in) - (list (` (.as (~ (nullable_type fieldT)) - ("php constant" (~ (code.text (%.format class "::" field))))))))))) - (` (def ((~ g!field) (~ g!object)) - (-> (~ g!type) - (~ (nullable_type fieldT))) + (` (def (, g!field) + ((,! syntax) ((, g!field) []) + (at (,! meta.monad) (,' in) + (list (` (.as (, (nullable_type fieldT)) + ("php constant" (, (code.text (%.format class "::" field))))))))))) + (` (def ((, g!field) (, g!object)) + (-> (, g!type) + (, (nullable_type fieldT))) (as_expected - (~ (without_null g!temp fieldT (` ("php object get" (~ (code.text field)) - (as (..Object .Any) (~ g!object))))))))))) + (, (without_null g!temp fieldT (` ("php object get" (, (code.text field)) + (as (..Object .Any) (, g!object))))))))))) {#Method method} (case method {#Static [method alias inputsT io? try? outputT]} (..make_function (qualify (maybe.else method alias)) g!temp - (` ("php object get" (~ (code.text method)) + (` ("php object get" (, (code.text method)) (as (..Object .Any) - ("php constant" (~ (code.text (%.format class "::" method))))))) + ("php constant" (, (code.text (%.format class "::" method))))))) inputsT io? try? @@ -285,26 +285,26 @@ {#Virtual [method alias inputsT io? try? outputT]} (let [g!inputs (input_variables inputsT)] - (` (def ((~ (qualify (maybe.else method alias))) - [(~+ (list#each product.right g!inputs))] - (~ g!object)) - (-> [(~+ (list#each nullable_type inputsT))] - (~ g!type) - (~ (|> (nullable_type outputT) + (` (def ((, (qualify (maybe.else method alias))) + [(,* (list#each product.right g!inputs))] + (, g!object)) + (-> [(,* (list#each nullable_type inputsT))] + (, g!type) + (, (|> (nullable_type outputT) (try_type try?) (io_type io?)))) (as_expected - (~ (<| (with_io io?) + (, (<| (with_io io?) (with_try try?) (without_null g!temp outputT) (` ("php object do" - (~ (code.text method)) - (~ g!object) - (~+ (list#each (with_null g!temp) g!inputs))))))))))))) + (, (code.text method)) + (, g!object) + (,* (list#each (with_null g!temp) g!inputs))))))))))))) members))))) {#Function [name alias inputsT io? try? outputT]} - (let [imported (` ("php constant" (~ (code.text name))))] + (let [imported (` ("php constant" (, (code.text name))))] (in (list (..make_function (code.local (maybe.else name alias)) g!temp imported @@ -314,10 +314,10 @@ outputT)))) {#Constant [_ name alias fieldT]} - (let [imported (` ("php constant" (~ (code.text name)))) + (let [imported (` ("php constant" (, (code.text name)))) g!name (code.local (maybe.else name alias))] - (in (list (` (def (~ g!name) - ((~! syntax) ((~ g!name) []) - (at (~! meta.monad) (~' in) - (list (` (.as (~ (nullable_type fieldT)) (~ imported))))))))))) + (in (list (` (def (, g!name) + ((,! syntax) ((, g!name) []) + (at (,! meta.monad) (,' in) + (list (` (.as (, (nullable_type fieldT)) (, imported))))))))))) )))) diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index 04d157393..a324365fa 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -113,15 +113,15 @@ (def (nilable_type [nilable? type]) (-> Nilable Code) (if nilable? - (` (.Maybe (~ type))) + (` (.Maybe (, type))) type)) (def (with_nil g!temp [nilable? input]) (-> Code [Bit Code] Code) (if nilable? - (` (case (~ input) - {.#Some (~ g!temp)} - (~ g!temp) + (` (case (, input) + {.#Some (, g!temp)} + (, g!temp) {.#None} ("scheme object nil"))) @@ -130,13 +130,13 @@ (def (without_nil g!temp [nilable? outputT] output) (-> Code Nilable Code Code) (if nilable? - (` (let [(~ g!temp) (~ output)] - (if ("scheme object nil?" (~ g!temp)) + (` (let [(, g!temp) (, output)] + (if ("scheme object nil?" (, g!temp)) {.#None} - {.#Some (~ g!temp)}))) - (` (let [(~ g!temp) (~ output)] - (if (not ("scheme object nil?" (~ g!temp))) - (~ g!temp) + {.#Some (, g!temp)}))) + (` (let [(, g!temp) (, output)] + (if (not ("scheme object nil?" (, g!temp))) + (, g!temp) (.panic! "Nil is an invalid value!")))))) (type Import @@ -159,55 +159,55 @@ ... {.#Left error} ... (recover_from_failure error)))} - (in (list (` ("lux try" ((~! io.io) (~ expression)))))))) + (in (list (` ("lux try" ((,! io.io) (, expression)))))))) (def (with_io with? without) (-> Bit Code Code) (if with? - (` ((~! io.io) (~ without))) + (` ((,! io.io) (, without))) without)) (def (io_type io? rawT) (-> Bit Code Code) (if io? - (` ((~! io.IO) (~ rawT))) + (` ((,! io.IO) (, rawT))) rawT)) (def (with_try with? without_try) (-> Bit Code Code) (if with? - (` (..try (~ without_try))) + (` (..try (, without_try))) without_try)) (def (try_type try? rawT) (-> Bit Code Code) (if try? - (` (.Either .Text (~ rawT))) + (` (.Either .Text (, rawT))) rawT)) (def (make_function g!method g!temp source inputsT io? try? outputT) (-> Code Code Code (List Nilable) Bit Bit Nilable Code) (let [g!inputs (input_variables inputsT)] - (` (def ((~ g!method) - [(~+ (list#each product.right g!inputs))]) - (-> [(~+ (list#each nilable_type inputsT))] - (~ (|> (nilable_type outputT) + (` (def ((, g!method) + [(,* (list#each product.right g!inputs))]) + (-> [(,* (list#each nilable_type inputsT))] + (, (|> (nilable_type outputT) (try_type try?) (io_type io?)))) (as_expected - (~ (<| (with_io io?) + (, (<| (with_io io?) (with_try try?) (without_nil g!temp outputT) (` ("scheme apply" - (as ..Function (~ source)) - (~+ (list#each (with_nil g!temp) g!inputs))))))))))) + (as ..Function (, source)) + (,* (list#each (with_nil g!temp) g!inputs))))))))))) (def .public import (syntax (_ [import ..import]) (with_symbols [g!temp] (case import {#Function [name alias inputsT io? try? outputT]} - (let [imported (` ("scheme constant" (~ (code.text name))))] + (let [imported (` ("scheme constant" (, (code.text name))))] (in (list (..make_function (code.local (maybe.else name alias)) g!temp imported @@ -217,10 +217,10 @@ outputT)))) {#Constant [_ name alias fieldT]} - (let [imported (` ("scheme constant" (~ (code.text name)))) + (let [imported (` ("scheme constant" (, (code.text name)))) g!name (code.local (maybe.else name alias))] - (in (list (` (def (~ g!name) - ((~! syntax) ((~ g!name) []) - (at (~! meta.monad) (~' in) - (list (` (.as (~ (nilable_type fieldT)) (~ imported))))))))))) + (in (list (` (def (, g!name) + ((,! syntax) ((, g!name) []) + (at (,! meta.monad) (,' in) + (list (` (.as (, (nilable_type fieldT)) (, imported))))))))))) )))) diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux index 2a0d25f6f..511ef27a2 100644 --- a/stdlib/source/library/lux/ffi/export.js.lux +++ b/stdlib/source/library/lux/ffi/export.js.lux @@ -94,4 +94,4 @@ (monad.each ! ..definition))) (at ! conjoint) (at ! each (list#each (function (_ [name term]) - (` (<extension> (~ (code.text name)) (~ term))))))))))) + (` (<extension> (, (code.text name)) (, term))))))))))) diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux index 876491f0a..95a779da2 100644 --- a/stdlib/source/library/lux/ffi/export.jvm.lux +++ b/stdlib/source/library/lux/ffi/export.jvm.lux @@ -77,32 +77,32 @@ _ {.#None})) exports))] - (in (list (` (//.class "final" (~ (code.local api)) - (~+ (list#each (.function (_ it) + (in (list (` (//.class "final" (, (code.local api)) + (,* (list#each (.function (_ it) (case it {#Constant [name type term]} - (` ("public" "final" "static" (~ (code.local name)) (~ type))) + (` ("public" "final" "static" (, (code.local name)) (, type))) {#Function [[variables name requirements] type term]} (` ("public" "strict" "static" - [(~+ (list#each code.local variables))] - ((~ (code.local name)) - [(~+ (|> requirements + [(,* (list#each code.local variables))] + ((, (code.local name)) + [(,* (|> requirements (list#each (.function (_ [name type]) (list (code.local name) type))) list#conjoint))]) - (~ type) - (~ term))))) + (, type) + (, term))))) exports)) ... Useless constructor - ("private" [] ((~' new) (~' self) []) [] []) - ("public" "strict" "static" [] ((~' <clinit>) []) - (~' void) - [(~+ (list#each (.function (_ [name type term]) + ("private" [] ((,' new) (,' self) []) [] []) + ("public" "strict" "static" [] ((,' <clinit>) []) + (,' void) + [(,* (list#each (.function (_ [name type term]) (` ("jvm member put static" - (~ (code.text api)) - (~ (code.text name)) - ("jvm object cast" (~ term))))) + (, (code.text api)) + (, (code.text name)) + ("jvm object cast" (, term))))) initialization))]) ))))))) diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index ef326c6ab..13efe101b 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -110,4 +110,4 @@ (monad.each ! ..definition))) (at ! conjoint) (at ! each (list#each (function (_ [name term]) - (` (<extension> (~ (code.text name)) (~ term))))))))))) + (` (<extension> (, (code.text name)) (, term))))))))))) diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux index 4c1fe2cc0..9427d0b4c 100644 --- a/stdlib/source/library/lux/ffi/export.py.lux +++ b/stdlib/source/library/lux/ffi/export.py.lux @@ -87,4 +87,4 @@ (monad.each ! ..definition))) (at ! conjoint) (at ! each (list#each (function (_ [name term]) - (` (<extension> (~ (code.text name)) (~ term))))))))))) + (` (<extension> (, (code.text name)) (, term))))))))))) diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux index ff00305b6..f11e4e0c4 100644 --- a/stdlib/source/library/lux/ffi/export.rb.lux +++ b/stdlib/source/library/lux/ffi/export.rb.lux @@ -136,10 +136,10 @@ (monad.each ! ..definition))) (at ! conjoint) (at ! each (list#each (function (_ [name term]) - (` (<extension> (~+ (case name + (` (<extension> (,* (case name {#Method name} (list (code.bit #0) (code.text name)) {#Global name} (list (code.bit #1) (code.text name)))) - (~ term))))))))))) + (, term))))))))))) diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux index f5d9b051f..c5b008d11 100644 --- a/stdlib/source/library/lux/locale/language.lux +++ b/stdlib/source/library/lux/locale/language.lux @@ -39,7 +39,7 @@ Language <definition>)] - (~~ (template.spliced <alias>+))))] + (,, (template.spliced <alias>+))))] <bundle>' ))] diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux index f89f8a619..153e0afd9 100644 --- a/stdlib/source/library/lux/locale/territory.lux +++ b/stdlib/source/library/lux/locale/territory.lux @@ -43,7 +43,7 @@ (`` (with_template [<neighbor>] [(def .public <neighbor> Territory <main>)] - (~~ (template.spliced <neighbor>+))))] + (,, (template.spliced <neighbor>+))))] ["AF" "AFG" 004 "Afghanistan" afghanistan []] ["AX" "ALA" 248 "Åland Islands" aland_islands []] diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux index 612077261..cc5c46d6d 100644 --- a/stdlib/source/library/lux/macro.lux +++ b/stdlib/source/library/lux/macro.lux @@ -121,11 +121,11 @@ (do [! //.monad] [symbol_names (monad.each ! ..local symbols) .let [symbol_defs (list#conjoint (list#each (is (-> Text (List Code)) - (.function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name))))))) + (.function (_ name) (list (code.symbol ["" name]) (` (..symbol (, (code.text name))))))) symbol_names))]] - (in (list (` ((~! do) (~! //.monad) - [(~+ symbol_defs)] - (~ body)))))) + (in (list (` ((,! do) (,! //.monad) + [(,* symbol_defs)] + (, body)))))) _ (//.failure (..wrong_syntax_error (.symbol ..with_symbols)))))) diff --git a/stdlib/source/library/lux/macro/context.lux b/stdlib/source/library/lux/macro/context.lux index e1a127bf9..464d0cfea 100644 --- a/stdlib/source/library/lux/macro/context.lux +++ b/stdlib/source/library/lux/macro/context.lux @@ -62,7 +62,7 @@ (.def .public peek (syntax (_ [g!it (at ?.monad each code.symbol ?code.global)]) - (in (list (` ((~! ..peek') (~ g!it) (.symbol (~ g!it)))))))) + (in (list (` ((,! ..peek') (, g!it) (.symbol (, g!it)))))))) (exception .public no_example) @@ -82,7 +82,7 @@ (.def .public search (syntax (_ [g!context (at ?.monad each code.symbol ?code.global) g!? ?code.any]) - (in (list (` ((~! ..search') (~ g!context) (~ g!?) (.symbol (~ g!context)))))))) + (in (list (` ((,! ..search') (, g!context) (, g!?) (.symbol (, g!context)))))))) (.def (alter on_definition [@ context]) (-> (-> Definition Definition) Symbol (Meta Any)) @@ -114,7 +114,7 @@ (.def .public push (syntax (_ [g!context (at ?.monad each code.symbol ?code.global) g!it ?code.any]) - (in (list (` ((~! ..push') (~ g!context) (~ g!it) (.symbol (~ g!context)))))))) + (in (list (` ((,! ..push') (, g!context) (, g!it) (.symbol (, g!context)))))))) (.def pop' (-> Symbol (Meta Any)) @@ -140,20 +140,20 @@ [@ meta.current_module_name .let [g!context (code.symbol [@ $])]] (//.with_symbols [g!it g!body g!_] - (in (list (` (.def (~ (code.local $)) - (..Stack (~ context_type)) + (in (list (` (.def (, (code.local $)) + (..Stack (, context_type)) (list))) - (` (.def ((~ g!expression) (~ g!it) (~ g!body)) - (-> (~ context_type) Code (Meta Code)) - ((~! do) (~! meta.monad) - [(~ g!_) ((~! ..push) (~ g!context) (~ g!it))] - ((~' in) (` (let [((~' ~') (~ g!body)) ((~' ~) (~ g!body)) - ((~' ~') (~ g!_)) ((~! ..pop) #1 (~ g!context))] - ((~' ~') (~ g!body)))))))) - (` (.def ((~ g!declaration) (~ g!it) (~ g!body)) - (-> (~ context_type) Code (Meta (List Code))) - ((~! do) (~! meta.monad) - [(~ g!_) ((~! ..push) (~ g!context) (~ g!it))] - ((~' in) (list (~ g!body) - (` ((~! ..pop) #0 (~ g!context)))))))) + (` (.def ((, g!expression) (, g!it) (, g!body)) + (-> (, context_type) Code (Meta Code)) + ((,! do) (,! meta.monad) + [(, g!_) ((,! ..push) (, g!context) (, g!it))] + ((,' in) (` (let [((,' ,') (, g!body)) ((,' ,) (, g!body)) + ((,' ,') (, g!_)) ((,! ..pop) #1 (, g!context))] + ((,' ,') (, g!body)))))))) + (` (.def ((, g!declaration) (, g!it) (, g!body)) + (-> (, context_type) Code (Meta (List Code))) + ((,! do) (,! meta.monad) + [(, g!_) ((,! ..push) (, g!context) (, g!it))] + ((,' in) (list (, g!body) + (` ((,! ..pop) #0 (, g!context)))))))) )))))) diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux index 036da756f..9b2ec3156 100644 --- a/stdlib/source/library/lux/macro/local.lux +++ b/stdlib/source/library/lux/macro/local.lux @@ -107,7 +107,7 @@ _ (.let [g!pop (is Symbol ["" (code.format g!pop)])] (..push_one [g!pop (..pop_all (list#each product.left macros) g!pop)]))] - (in (` ((~ g!pop)))))) + (in (` ((, g!pop)))))) (def .public (with macros expression? body) (-> (List [Symbol Macro]) Bit Code (Meta (List Code))) @@ -115,10 +115,10 @@ [g!pop (..push macros)] (.if expression? (//.with_symbols [g!body] - (in (list (` (.let [(~ g!body) (~ body)] + (in (list (` (.let [(, g!body) (, body)] (exec - (~ g!pop) - (~ g!body))))))) + (, g!pop) + (, g!body))))))) (in (list body g!pop))))) diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux index 65b469e2d..affa8273a 100644 --- a/stdlib/source/library/lux/macro/pattern.lux +++ b/stdlib/source/library/lux/macro/pattern.lux @@ -3,15 +3,15 @@ [lux (.except or let with_template |> `)]]) (def partial_list - (`` ("lux in-module" (~~ (static .prelude)) .partial_list))) + (`` ("lux in-module" (,, (static .prelude)) .partial_list))) (def locally (macro (_ tokens lux) (.let [[prelude _] (symbol ._)] (case tokens (pattern (list [@ {.#Symbol ["" name]}])) - {.#Right [lux (list (.` ("lux in-module" (~ [@ {.#Text prelude}]) - (~ [@ {.#Symbol [prelude name]}]))))]} + {.#Right [lux (list (.` ("lux in-module" (, [@ {.#Text prelude}]) + (, [@ {.#Symbol [prelude name]}]))))]} _ {.#Left ""})))) @@ -133,17 +133,17 @@ expected ..expected_type g!temp (..generated_symbol "temp")] (in (list g!temp - (.` ({{.#Some (~ g!temp)} - (~ g!temp) + (.` ({{.#Some (, g!temp)} + (, g!temp) {.#None} - (.case (~ g!temp) - (~+ next_branches))} - ("lux type check" {.#Apply (~ (type_code expected)) Maybe} - (.case (~ g!temp) - (~+ (multi_level_case$ g!temp [mlc body])) + (.case (, g!temp) + (,* next_branches))} + ("lux type check" {.#Apply (, (type_code expected)) Maybe} + (.case (, g!temp) + (,* (multi_level_case$ g!temp [mlc body])) - (~+ (if initial_bind? + (,* (if initial_bind? (list) (list g!temp (.` {.#None}))))))))))) @@ -156,7 +156,7 @@ (pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] pattern)}] body branches)) (.let [g!whole (local$ name)] (meta#in (partial_list g!whole - (.` (case (~ g!whole) (~ pattern) (~ body))) + (.` (case (, g!whole) (, pattern) (, body))) branches))) _ @@ -168,8 +168,8 @@ (pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] [_ {.#Tuple steps}])}] body branches)) (.let [g!name (local$ name)] (meta#in (partial_list g!name - (.` (.let [(~ g!name) (.|> (~ g!name) (~+ steps))] - (~ body))) + (.` (.let [(, g!name) (.|> (, g!name) (,* steps))] + (, body))) branches))) _ @@ -177,7 +177,7 @@ (def (name$ [module name]) (-> Symbol Code) - (.` [(~ (text$ module)) (~ (text$ name))])) + (.` [(, (text$ module)) (, (text$ name))])) (def (untemplated_partial_list last inits) (-> Code (List Code) Code) @@ -186,23 +186,23 @@ last {.#Item [init inits']} - (.` {.#Item (~ init) (~ (untemplated_partial_list last inits'))}))) + (.` {.#Item (, init) (, (untemplated_partial_list last inits'))}))) (.with_template [<tag> <name>] [(def (<name> g!meta untemplated_pattern elems) (-> Code (-> Code (Meta Code)) (-> (List Code) (Meta Code))) (case (list#reversed elems) - {.#Item [_ {.#Form {.#Item [[_ {.#Symbol ["" "~+"]}] {.#Item [spliced {.#End}]}]}}] + {.#Item [_ {.#Form {.#Item [[_ {.#Symbol ["" ",*"]}] {.#Item [spliced {.#End}]}]}}] inits} (do meta#monad [=inits (monad#each meta#monad untemplated_pattern (list#reversed inits))] - (in (.` [(~ g!meta) {<tag> (~ (untemplated_partial_list spliced =inits))}]))) + (in (.` [(, g!meta) {<tag> (, (untemplated_partial_list spliced =inits))}]))) _ (do meta#monad [=elems (monad#each meta#monad untemplated_pattern elems)] - (in (.` [(~ g!meta) {<tag> (~ (untemplated_list =elems))}])))))] + (in (.` [(, g!meta) {<tag> (, (untemplated_list =elems))}])))))] [.#Form untemplated_form] [.#Variant untemplated_variant] @@ -216,7 +216,7 @@ (case pattern (..with_template [<tag> <gen>] [[_ {<tag> value}] - (in (.` [(~ g!meta) {<tag> (~ (<gen> value))}]))]) + (in (.` [(, g!meta) {<tag> (, (<gen> value))}]))]) ([.#Bit bit$] [.#Nat nat$] [.#Int int$] @@ -225,11 +225,11 @@ [.#Text text$] [.#Symbol name$]) - [_ {.#Form {.#Item [[_ {.#Symbol ["" "~"]}] {.#Item [unquoted {.#End}]}]}}] + [_ {.#Form {.#Item [[_ {.#Symbol ["" ","]}] {.#Item [unquoted {.#End}]}]}}] (in unquoted) - [_ {.#Form {.#Item [[_ {.#Symbol ["" "~+"]}] {.#Item [spliced {.#End}]}]}}] - (failure "Cannot use (~+) inside of `code` unless it is the last element in a form or a tuple.") + [_ {.#Form {.#Item [[_ {.#Symbol ["" ",*"]}] {.#Item [spliced {.#End}]}]}}] + (failure "Cannot use (,*) inside of `code` unless it is the last element in a form or a tuple.") (..with_template [<tag> <untemplated>] [[_ {<tag> elems}] diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux index 8e9d32686..5321db403 100644 --- a/stdlib/source/library/lux/macro/syntax.lux +++ b/stdlib/source/library/lux/macro/syntax.lux @@ -57,8 +57,8 @@ (is (-> [Code Code] (Meta [Code Code])) (function (_ [var parser]) (with_expansions [<default> (in [var - (` ((~! ..self_documenting) (' (~ var)) - (~ parser)))])] + (` ((,! ..self_documenting) (' (, var)) + (, parser)))])] (case var [_ {.#Symbol ["" _]}] <default> @@ -80,20 +80,20 @@ (//.symbol "g!state")) this_module meta.current_module_name .let [g!name (code.symbol ["" name])]] - (in (list (` (.macro ((~ g!name) (~ g!tokens) (~ g!state)) - (.case ((~! </>.result) - (is ((~! </>.Parser) (Meta (List Code))) - ((~! do) (~! <>.monad) - [(~+ (..un_paired vars+parsers))] - (.at (~! <>.monad) (~' in) + (in (list (` (.macro ((, g!name) (, g!tokens) (, g!state)) + (.case ((,! </>.result) + (is ((,! </>.Parser) (Meta (List Code))) + ((,! do) (,! <>.monad) + [(,* (..un_paired vars+parsers))] + (.at (,! <>.monad) (,' in) (is (Meta (List Code)) - (~ body))))) - (~ g!tokens)) - {try.#Success (~ g!body)} - ((~ g!body) (~ g!state)) + (, body))))) + (, g!tokens)) + {try.#Success (, g!body)} + ((, g!body) (, g!state)) - {try.#Failure (~ g!error)} - {try.#Failure ((~! text.interposed) (~! text.new_line) (list "Invalid syntax:" (~ g!error)))}))))))) + {try.#Failure (, g!error)} + {try.#Failure ((,! text.interposed) (,! text.new_line) (list "Invalid syntax:" (, g!error)))}))))))) {try.#Failure error} (meta.failure (//.wrong_syntax_error (symbol ..syntax)))))) diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux index 69621e1e2..21a8aff54 100644 --- a/stdlib/source/library/lux/macro/syntax/check.lux +++ b/stdlib/source/library/lux/macro/syntax/check.lux @@ -29,9 +29,9 @@ (def .public (format (open "_[0]")) (-> Check Code) - (` ((~ (code.text ..extension)) - (~ _#type) - (~ _#value)))) + (` ((, (code.text ..extension)) + (, _#type) + (, _#value)))) (def .public parser (Parser Check) diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux index a60ce50ad..1f4a9cccd 100644 --- a/stdlib/source/library/lux/macro/syntax/declaration.lux +++ b/stdlib/source/library/lux/macro/syntax/declaration.lux @@ -41,4 +41,4 @@ g!name arguments - (` ((~ g!name) (~+ (list#each code.local arguments))))))) + (` ((, g!name) (,* (list#each code.local arguments))))))) diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux index 9c8551195..b9627f0a2 100644 --- a/stdlib/source/library/lux/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/macro/syntax/definition.lux @@ -46,21 +46,21 @@ (def dummy Code - (` [.#module (~ (code.text (the .#module location.dummy))) - .#line (~ (code.nat (the .#line location.dummy))) - .#column (~ (code.nat (the .#column location.dummy)))])) + (` [.#module (, (code.text (the .#module location.dummy))) + .#line (, (code.nat (the .#line location.dummy))) + .#column (, (code.nat (the .#column location.dummy)))])) (def .public (format (open "_[0]")) (-> Definition Code) - (` ((~ (code.text ..extension)) - (~ (code.local _#name)) - (~ (case _#value + (` ((, (code.text ..extension)) + (, (code.local _#name)) + (, (case _#value {.#Left check} (//check.format check) {.#Right value} value)) - (~ (code.bit _#export?))))) + (, (code.bit _#export?))))) (def .public (parser compiler) (-> Lux (Parser Definition)) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index cc82b10f3..7b71d005e 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -43,11 +43,11 @@ [g!locals (|> locals (list#each //.symbol) (monad.all !))] - (in (list (` (.with_expansions [(~+ (|> (list.zipped_2 locals g!locals) + (in (list (` (.with_expansions [(,* (|> (list.zipped_2 locals g!locals) (list#each (function (_ [name symbol]) (list (code.local name) symbol))) list#conjoint))] - (~ body)))))))) + (, body)))))))) (def (symbol_side module_side? parser) (-> Bit (Parser Symbol) (Parser Text)) @@ -177,8 +177,9 @@ locals))] (if expression? (//.with_symbols [g!body] - (in (list (` (.let [(~ g!body) (~ body)] - (exec (~ g!pop) - (~ g!body))))))) + (in (list (` (.let [(, g!body) (, body)] + (exec + (, g!pop) + (, g!body))))))) (in (list body g!pop)))))) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index d2c69aede..49a572887 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -90,7 +90,7 @@ (`` (cond (check.subsumes? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) - (~~ (with_template [<type> <0> <+>] + (,, (with_template [<type> <0> <+>] [(check.subsumes? <type> :it:) <0>] @@ -103,7 +103,7 @@ (`` (cond (check.subsumes? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) - (~~ (with_template [<type> <0> <+>] + (,, (with_template [<type> <0> <+>] [(check.subsumes? <type> :it:) (..composite phase archive (` <+>) last prevs)] @@ -113,7 +113,7 @@ (phase.except ..no_arithmetic_for [:it:]))))))) (def .public <name> (syntax (_ [operands (<>.some <code>.any)]) - (in (list (` (<extension> (~+ operands)))))))))] + (in (list (` (<extension> (,* operands)))))))))] [+ [[.Nat (in (analysis.nat 0)) "lux i64 +"] [.Int (in (analysis.int +0)) "lux i64 +"] @@ -156,7 +156,7 @@ (`` (cond (check.subsumes? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) - (~~ (with_template [<type> <+>] + (,, (with_template [<type> <+>] [(check.subsumes? <type> :it:) (..composite phase archive (` <+>) right (list left))] @@ -167,7 +167,7 @@ (def .public <name> (syntax (_ [left <code>.any right <code>.any]) - (in (list (` (<extension> (~ left) (~ right)))))))))] + (in (list (` (<extension> (, left) (, right)))))))))] [= [[.Nat "lux i64 ="] [.Int "lux i64 ="] @@ -212,7 +212,7 @@ (`` (cond (check.subsumes? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) - (~~ (with_template [<type> <+>] + (,, (with_template [<type> <+>] [(check.subsumes? <type> :it:) (..composite phase archive (` <+>) right (list left))] @@ -223,7 +223,7 @@ (def .public <name> (syntax (_ [left <code>.any right <code>.any]) - (in (list (` (<extension> (~ left) (~ right)))))))))] + (in (list (` (<extension> (, left) (, right)))))))))] [% [[.Nat nat.%] [.Int "lux i64 %"] diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux index ee319a0e7..5c4603e99 100644 --- a/stdlib/source/library/lux/math/infix.lux +++ b/stdlib/source/library/lux/math/infix.lux @@ -66,10 +66,10 @@ (code.form parts) {#Unary op subject} - (` ((~ op) (~ (prefix subject)))) + (` ((, op) (, (prefix subject)))) {#Binary left op right} - (` ((~ op) (~ (prefix right)) (~ (prefix left)))))) + (` ((, op) (, (prefix right)) (, (prefix left)))))) (def .public infix (syntax (_ [expr ..expression]) diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 46eb4e45e..57e313bcf 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -50,4 +50,4 @@ (meta.lifted (do try.monad [_ (..modulus divisor)] - (in (list (` ((~! try.trusted) (..modulus (~ (code.int divisor))))))))))) + (in (list (` ((,! try.trusted) (..modulus (, (code.int divisor))))))))))) diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index 5e8161de3..65e28513d 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -27,8 +27,8 @@ (def .public complex (syntax (_ [real <code>.any ?imaginary (<>.maybe <code>.any)]) - (in (list (` [..#real (~ real) - ..#imaginary (~ (maybe.else (' +0.0) ?imaginary))]))))) + (in (list (` [..#real (, real) + ..#imaginary (, (maybe.else (' +0.0) ?imaginary))]))))) (def .public i Complex diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux index d9c927d35..5c11f118c 100644 --- a/stdlib/source/library/lux/math/number/ratio.lux +++ b/stdlib/source/library/lux/math/number/ratio.lux @@ -43,8 +43,8 @@ (def .public ratio (syntax (_ [numerator <code>.any ?denominator (<>.maybe <code>.any)]) - (in (list (` ((~! ..normal) [..#numerator (~ numerator) - ..#denominator (~ (maybe.else (' 1) ?denominator))])))))) + (in (list (` ((,! ..normal) [..#numerator (, numerator) + ..#denominator (, (maybe.else (' 1) ?denominator))])))))) (def .public (= parameter subject) (-> Ratio Ratio Bit) diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index 10f0056d7..63375b626 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -144,7 +144,7 @@ (def (macro_type? type) (-> Type Bit) (`` (case type - {.#Named [(~~ (static .prelude)) "Macro"] {.#Primitive "#Macro" {.#End}}} + {.#Named [(,, (static .prelude)) "Macro"] {.#Primitive "#Macro" {.#End}}} true _ @@ -434,7 +434,7 @@ (type_definition de_aliased) {.#Definition [exported? def_type def_value]} - (let [type_code (`` ("lux in-module" (~~ (static .prelude)) .type_code))] + (let [type_code (`` ("lux in-module" (,, (static .prelude)) .type_code))] (if (or (same? .Type def_type) (at code.equivalence = (type_code .Type) diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux index 061140a94..a9e62dd5f 100644 --- a/stdlib/source/library/lux/meta/location.lux +++ b/stdlib/source/library/lux/meta/location.lux @@ -25,12 +25,12 @@ (let [location (the .#location compiler)] {.#Right [compiler (list (` (.is .Location - [.#module (~ [..dummy {.#Text (the .#module location)}]) - .#line (~ [..dummy {.#Nat (the .#line location)}]) - .#column (~ [..dummy {.#Nat (the .#column location)}])])))]}) + [.#module (, [..dummy {.#Text (the .#module location)}]) + .#line (, [..dummy {.#Nat (the .#line location)}]) + .#column (, [..dummy {.#Nat (the .#column location)}])])))]}) _ - {.#Left (`` (("lux in-module" (~~ (static .prelude)) wrong_syntax_error) (symbol ..here)))}))) + {.#Left (`` (("lux in-module" (,, (static .prelude)) wrong_syntax_error) (symbol ..here)))}))) (def .public (format it) (-> Location Text) @@ -38,9 +38,9 @@ [file line column] it] (all "lux text concat" "@" - (`` (("lux in-module" (~~ (static .prelude)) .text#encoded) file)) separator - (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) line)) separator - (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) column))))) + (`` (("lux in-module" (,, (static .prelude)) .text#encoded) file)) separator + (`` (("lux in-module" (,, (static .prelude)) .nat#encoded) line)) separator + (`` (("lux in-module" (,, (static .prelude)) .nat#encoded) column))))) (def \n ("lux i64 char" +10)) diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux index b2c4173a8..af6ee1351 100644 --- a/stdlib/source/library/lux/meta/type.lux +++ b/stdlib/source/library/lux/meta/type.lux @@ -250,18 +250,18 @@ (-> Type Code) (case type {.#Primitive name params} - (` {.#Primitive (~ (code.text name)) - (.list (~+ (list#each code params)))}) + (` {.#Primitive (, (code.text name)) + (.list (,* (list#each code params)))}) (^.with_template [<tag>] [{<tag> idx} - (` {<tag> (~ (code.nat idx))})]) + (` {<tag> (, (code.nat idx))})]) ([.#Var] [.#Ex] [.#Parameter]) (^.with_template [<tag>] [{<tag> left right} - (` {<tag> (~ (code left)) - (~ (code right))})]) + (` {<tag> (, (code left)) + (, (code right))})]) ([.#Sum] [.#Product] [.#Function] [.#Apply]) {.#Named name sub_type} @@ -269,8 +269,8 @@ (^.with_template [<tag>] [{<tag> env body} - (` {<tag> (.list (~+ (list#each code env))) - (~ (code body))})]) + (` {<tag> (.list (,* (list#each code env))) + (, (code body))})]) ([.#UnivQ] [.#ExQ]) )) @@ -387,7 +387,7 @@ (in (list g!_secret_marker_))))) (def secret_marker - (`` (symbol (~~ (new_secret_marker))))) + (`` (symbol (,, (new_secret_marker))))) (def .public log! (syntax (_ [input (<>.or (<>.and <code>.symbol @@ -413,8 +413,8 @@ {.#Right valueC} (macro.with_symbols [g!value] - (in (list (` (.let [(~ g!value) (~ valueC)] - (..log! (~ valueC) (~ (code.symbol ..secret_marker)) (~ g!value)))))))))) + (in (list (` (.let [(, g!value) (, valueC)] + (..log! (, valueC) (, (code.symbol ..secret_marker)) (, g!value)))))))))) (def type_parameters (Parser (List Text)) @@ -426,15 +426,15 @@ output <code>.any value (<>.maybe <code>.any)]) (macro.with_symbols [g!_] - (.let [casterC (` (is (All ((~ g!_) (~+ (list#each code.local type_vars))) - (-> (~ input) (~ output))) + (.let [casterC (` (is (All ((, g!_) (,* (list#each code.local type_vars))) + (-> (, input) (, output))) (|>> as_expected)))] (case value {.#None} (in (list casterC)) {.#Some value} - (in (list (` ((~ casterC) (~ value)))))))))) + (in (list (` ((, casterC) (, value)))))))))) (type Typed (Record @@ -457,22 +457,22 @@ exemplar (..typed lux) computation (..typed lux)]) (macro.with_symbols [g!_] - (.let [typeC (` (All ((~ g!_) (~+ (list#each code.local type_vars))) - (-> (~ (the #type exemplar)) - (~ (the #type computation))))) - shareC (` (is (~ typeC) - (.function ((~ g!_) (~ g!_)) - (~ (the #expression computation)))))] - (in (list (` ((~ shareC) (~ (the #expression exemplar)))))))))) + (.let [typeC (` (All ((, g!_) (,* (list#each code.local type_vars))) + (-> (, (the #type exemplar)) + (, (the #type computation))))) + shareC (` (is (, typeC) + (.function ((, g!_) (, g!_)) + (, (the #expression computation)))))] + (in (list (` ((, shareC) (, (the #expression exemplar)))))))))) (def .public by_example (syntax (_ lux [type_vars ..type_parameters exemplar (..typed lux) extraction <code>.any]) - (in (list (` (.type_of ((~! ..sharing) [(~+ (list#each code.local type_vars))] - (is (~ (the #type exemplar)) - (~ (the #expression exemplar))) - (is (~ extraction) + (in (list (` (.type_of ((,! ..sharing) [(,* (list#each code.local type_vars))] + (is (, (the #type exemplar)) + (, (the #expression exemplar))) + (is (, extraction) ... The value of this expression will never be relevant, so it doesn't matter what it is. (.as .Nothing []))))))))) @@ -508,8 +508,8 @@ (def .public let (syntax (_ [bindings (<code>.tuple (<>.some (<>.and <code>.any <code>.any))) bodyT <code>.any]) - (in (list (` (..with_expansions [(~+ (|> bindings + (in (list (` (..with_expansions [(,* (|> bindings (list#each (.function (_ [localT valueT]) - (list localT (` (.these (~ valueT)))))) + (list localT (` (.these (, valueT)))))) list#conjoint))] - (~ bodyT))))))) + (, bodyT))))))) diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux index 90c0b3837..eccb312e2 100644 --- a/stdlib/source/library/lux/meta/type/dynamic.lux +++ b/stdlib/source/library/lux/meta/type/dynamic.lux @@ -36,19 +36,19 @@ (def .public dynamic (syntax (_ [value <code>.any]) (with_symbols [g!value] - (in (list (` (.let [(~ g!value) (~ value)] - ((~! ..abstraction) [(.type_of (~ g!value)) (~ g!value)])))))))) + (in (list (` (.let [(, g!value) (, value)] + ((,! ..abstraction) [(.type_of (, g!value)) (, g!value)])))))))) (def .public static (syntax (_ [type <code>.any value <code>.any]) (with_symbols [g!type g!value] - (in (list (` (.let [[(~ g!type) (~ g!value)] ((~! ..representation) (~ value))] - (.is ((~! try.Try) (~ type)) - (.if (.at (~! //.equivalence) (~' =) - (.type_literal (~ type)) (~ g!type)) - {try.#Success (.as (~ type) (~ g!value))} - ((~! exception.except) ..wrong_type [(.type_literal (~ type)) (~ g!type)])))))))))) + (in (list (` (.let [[(, g!type) (, g!value)] ((,! ..representation) (, value))] + (.is ((,! try.Try) (, type)) + (.if (.at (,! //.equivalence) (,' =) + (.type_literal (, type)) (, g!type)) + {try.#Success (.as (, type) (, g!value))} + ((,! exception.except) ..wrong_type [(.type_literal (, type)) (, g!type)])))))))))) (def .public (format value) (-> Dynamic (Try Text)) diff --git a/stdlib/source/library/lux/meta/type/implicit.lux b/stdlib/source/library/lux/meta/type/implicit.lux index bdea9933d..3d92d214c 100644 --- a/stdlib/source/library/lux/meta/type/implicit.lux +++ b/stdlib/source/library/lux/meta/type/implicit.lux @@ -333,7 +333,7 @@ (code.symbol constructor) _ - (` ((~ (code.symbol constructor)) (~+ (list#each instance$ dependencies)))))) + (` ((, (code.symbol constructor)) (,* (list#each instance$ dependencies)))))) (def .public a/an (syntax (_ [member <code>.symbol @@ -351,9 +351,9 @@ (///.failure (format "No implementation could be found for member: " (%.symbol member))) {.#Item chosen {.#End}} - (in (list (` (.at (~ (instance$ chosen)) - (~ (code.local (product.right member))) - (~+ (list#each code.symbol args)))))) + (in (list (` (.at (, (instance$ chosen)) + (, (code.local (product.right member))) + (,* (list#each code.symbol args)))))) _ (///.failure (format "Too many implementations available: " @@ -367,8 +367,8 @@ [labels (|> (macro.symbol "g!parameter") (list.repeated (list.size args)) (monad.all !))] - (in (list (` (let [(~+ (|> args (list.zipped_2 labels) (list#each ..pair_list) list#conjoint))] - (..a/an (~ (code.symbol member)) (~+ labels))))))) + (in (list (` (let [(,* (|> args (list.zipped_2 labels) (list#each ..pair_list) list#conjoint))] + (..a/an (, (code.symbol member)) (,* labels))))))) ))) (def .public a ..a/an) @@ -385,11 +385,11 @@ body <code>.any]) (do ///.monad [g!implicit+ (implicit_bindings (list.size implementations))] - (in (list (` (let [(~+ (|> (list.zipped_2 g!implicit+ implementations) + (in (list (` (let [(,* (|> (list.zipped_2 g!implicit+ implementations) (list#each (function (_ [g!implicit implementation]) (list g!implicit implementation))) list#conjoint))] - (~ body)))))))) + (, body)))))))) (def .public implicitly (syntax (_ [implementations (<>.many <code>.any)]) @@ -397,5 +397,5 @@ [g!implicit+ (implicit_bindings (list.size implementations))] (in (|> (list.zipped_2 g!implicit+ implementations) (list#each (function (_ [g!implicit implementation]) - (` (def .private (~ g!implicit) - (~ implementation)))))))))) + (` (def .private (, g!implicit) + (, implementation)))))))))) diff --git a/stdlib/source/library/lux/meta/type/poly.lux b/stdlib/source/library/lux/meta/type/poly.lux index da8fc8a07..912a22a9b 100644 --- a/stdlib/source/library/lux/meta/type/poly.lux +++ b/stdlib/source/library/lux/meta/type/poly.lux @@ -30,37 +30,37 @@ body <code>.any]) (with_symbols [g!_ g!type g!output] (let [g!name (code.symbol ["" name])] - (in (.list (` ((~! syntax) ((~ g!_) [(~ g!type) (~! <code>.any)]) - ((~! do) (~! ///.monad) - [(~ g!type) ((~! ///.eval) .Type (~ g!type))] + (in (.list (` ((,! syntax) ((, g!_) [(, g!type) (,! <code>.any)]) + ((,! do) (,! ///.monad) + [(, g!type) ((,! ///.eval) .Type (, g!type))] (case (is (.Either .Text .Code) - ((~! <//>.result) ((~! <>.rec) - (function ((~ g!_) (~ g!name)) - (~ body))) - (.as .Type (~ g!type)))) - {.#Right (~ g!output)} - ((~' in) (.list (~ g!output))) + ((,! <//>.result) ((,! <>.rec) + (function ((, g!_) (, g!name)) + (, body))) + (.as .Type (, g!type)))) + {.#Right (, g!output)} + ((,' in) (.list (, g!output))) - {.#Left (~ g!output)} - ((~! ///.failure) (~ g!output)))))))))))) + {.#Left (, g!output)} + ((,! ///.failure) (, g!output)))))))))))) (def .public (code env type) (-> Env Type Code) (case type {.#Primitive name params} - (` {.#Primitive (~ (code.text name)) - (.list (~+ (list#each (code env) params)))}) + (` {.#Primitive (, (code.text name)) + (.list (,* (list#each (code env) params)))}) (^.with_template [<tag>] [{<tag> idx} - (` {<tag> (~ (code.nat idx))})]) + (` {<tag> (, (code.nat idx))})]) ([.#Var] [.#Ex]) {.#Parameter idx} (let [idx (<//>.argument env idx)] (if (n.= 0 idx) (|> (dictionary.value idx env) maybe.trusted product.left (code env)) - (` (.$ (~ (code.nat (-- idx))))))) + (` (.$ (, (code.nat (-- idx))))))) {.#Apply {.#Primitive "" {.#End}} {.#Parameter idx}} @@ -70,13 +70,13 @@ (^.with_template [<tag>] [{<tag> left right} - (` {<tag> (~ (code env left)) - (~ (code env right))})]) + (` {<tag> (, (code env left)) + (, (code env right))})]) ([.#Function] [.#Apply]) (^.with_template [<macro> <tag> <flattener>] [{<tag> left right} - (` (<macro> (~+ (list#each (code env) (<flattener> type)))))]) + (` (<macro> (,* (list#each (code env) (<flattener> type)))))]) ([.Union .#Sum //.flat_variant] [.Tuple .#Product //.flat_tuple]) @@ -85,6 +85,6 @@ (^.with_template [<tag>] [{<tag> scope body} - (` {<tag> (.list (~+ (list#each (code env) scope))) - (~ (code env body))})]) + (` {<tag> (.list (,* (list#each (code env) scope))) + (, (code env body))})]) ([.#UnivQ] [.#ExQ]))) diff --git a/stdlib/source/library/lux/meta/type/primitive.lux b/stdlib/source/library/lux/meta/type/primitive.lux index e58f13f56..339612998 100644 --- a/stdlib/source/library/lux/meta/type/primitive.lux +++ b/stdlib/source/library/lux/meta/type/primitive.lux @@ -53,8 +53,8 @@ {.#None} ..current)] - (in (list (` ((~! //.as) [(~+ type_vars)] (~ <from>) (~ <to>) - (~ value))))))))] + (in (list (` ((,! //.as) [(,* type_vars)] (, <from>) (, <to>) + (, value))))))))] [abstraction representation abstraction] [representation abstraction representation] @@ -83,15 +83,15 @@ [current_module meta.current_module_name g!Representation (macro.symbol "Representation") .let [type_varsC (list#each code.local type_vars) - abstraction_declaration (` ((~ (code.local name)) (~+ type_varsC))) - representation_declaration (` ((~ g!Representation) (~+ type_varsC)))]] + abstraction_declaration (` ((, (code.local name)) (,* type_varsC))) + representation_declaration (` ((, g!Representation) (,* type_varsC)))]] (..declaration [name type_varsC abstraction_declaration representation_declaration] - (` (.these (type (~ export_policy) (~ abstraction_declaration) - (Primitive (~ (code.text (symbol#encoded [current_module name]))) - [(~+ type_varsC)])) - (type (~ representation_declaration) - (~ representation_type)) - (~+ primitives))))))) + (` (.these (type (, export_policy) (, abstraction_declaration) + (Primitive (, (code.text (symbol#encoded [current_module name]))) + [(,* type_varsC)])) + (type (, representation_declaration) + (, representation_type)) + (,* primitives))))))) (def selection (Parser [(List Code) Code]) @@ -100,6 +100,6 @@ (def .public transmutation (syntax (_ [[specific value] ..selection]) - (in (list (` (.|> (~ value) - (..representation (~+ specific)) - (..abstraction (~+ specific)))))))) + (in (list (` (.|> (, value) + (..representation (,* specific)) + (..abstraction (,* specific)))))))) diff --git a/stdlib/source/library/lux/meta/type/quotient.lux b/stdlib/source/library/lux/meta/type/quotient.lux index 6f9c48586..e6553fb40 100644 --- a/stdlib/source/library/lux/meta/type/quotient.lux +++ b/stdlib/source/library/lux/meta/type/quotient.lux @@ -47,20 +47,20 @@ (syntax (_ [class <code>.any]) ... TODO: Switch to the cleaner approach ASAP. (with_symbols [g!t g!c g!% g!_ g!:quotient:] - (in (list (` (let [ ... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!c) (~ g!%)) - ... (..Class (~ g!t) (~ g!c) (~ g!%))) - ... (~ class)) + (in (list (` (let [ ... (, g!_) (.is (.Ex ((, g!_) (, g!t) (, g!c) (, g!%)) + ... (..Class (, g!t) (, g!c) (, g!%))) + ... (, class)) ] - (.case (.type_of (~ class)) - {.#Apply (~ g!%) {.#Apply (~ g!c) {.#Apply (~ g!t) (~ g!:quotient:)}}} - (.type_literal (..Quotient (~ g!t) (~ g!c) (~ g!%))) + (.case (.type_of (, class)) + {.#Apply (, g!%) {.#Apply (, g!c) {.#Apply (, g!t) (, g!:quotient:)}}} + (.type_literal (..Quotient (, g!t) (, g!c) (, g!%))) - (~ g!_) + (, g!_) (.undefined)))) - ... (` ((~! //.by_example) [(~ g!t) (~ g!c) (~ g!%)] - ... (is (..Class (~ g!t) (~ g!c) (~ g!%)) - ... (~ class)) - ... (..Quotient (~ g!t) (~ g!c) (~ g!%)))) + ... (` ((,! //.by_example) [(, g!t) (, g!c) (, g!%)] + ... (is (..Class (, g!t) (, g!c) (, g!%)) + ... (, class)) + ... (..Quotient (, g!t) (, g!c) (, g!%)))) ))))) (def .public (equivalence super) diff --git a/stdlib/source/library/lux/meta/type/refinement.lux b/stdlib/source/library/lux/meta/type/refinement.lux index 45c6d01e6..e5c18decf 100644 --- a/stdlib/source/library/lux/meta/type/refinement.lux +++ b/stdlib/source/library/lux/meta/type/refinement.lux @@ -89,18 +89,18 @@ (syntax (_ [refiner <code>.any]) ... TODO: Switch to the cleaner approach ASAP. (macro.with_symbols [g!t g!% g!_ g!:refiner:] - (in (list (` (let [ ... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!%)) - ... (..Refined (~ g!t) (~ g!%))) - ... (~ refiner)) + (in (list (` (let [ ... (, g!_) (.is (.Ex ((, g!_) (, g!t) (, g!%)) + ... (..Refined (, g!t) (, g!%))) + ... (, refiner)) ] - (.case (.type_of (~ refiner)) - {.#Apply (~ g!%) {.#Apply (~ g!t) (~ g!:refiner:)}} - (.type_literal (..Refined (~ g!t) (~ g!%))) + (.case (.type_of (, refiner)) + {.#Apply (, g!%) {.#Apply (, g!t) (, g!:refiner:)}} + (.type_literal (..Refined (, g!t) (, g!%))) - (~ g!_) + (, g!_) (.undefined)))) - ... (` ((~! //.by_example) [(~ g!t) (~ g!%)] - ... (is (..Refiner (~ g!t) (~ g!%)) - ... (~ refiner)) - ... (..Refined (~ g!t) (~ g!%)))) + ... (` ((,! //.by_example) [(, g!t) (, g!%)] + ... (is (..Refiner (, g!t) (, g!%)) + ... (, refiner)) + ... (..Refined (, g!t) (, g!%)))) ))))) diff --git a/stdlib/source/library/lux/meta/type/resource.lux b/stdlib/source/library/lux/meta/type/resource.lux index 44e9cf7a7..f1e099e72 100644 --- a/stdlib/source/library/lux/meta/type/resource.lux +++ b/stdlib/source/library/lux/meta/type/resource.lux @@ -132,7 +132,7 @@ (macro.with_symbols [g!_ g!context g!!] (case swaps {.#End} - (in (list (` (~! no_op)))) + (in (list (` (,! no_op)))) {.#Item head tail} (do [! meta.monad] @@ -147,16 +147,16 @@ swaps) maybe.trusted sequence.list) - g!inputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!inputs) - g!outputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!outputs)]] - (in (list (` (is (All ((~ g!_) (~ g!!) (~+ g!inputs) (~ g!context)) - (-> ((~! monad.Monad) (~ g!!)) - (Procedure (~ g!!) - [(~+ g!inputsT+) (~ g!context)] - [(~+ g!outputsT+) (~ g!context)] + g!inputsT+ (list#each (|>> (,) (..Key ..Commutative) (`)) g!inputs) + g!outputsT+ (list#each (|>> (,) (..Key ..Commutative) (`)) g!outputs)]] + (in (list (` (is (All ((, g!_) (, g!!) (,* g!inputs) (, g!context)) + (-> ((,! monad.Monad) (, g!!)) + (Procedure (, g!!) + [(,* g!inputsT+) (, g!context)] + [(,* g!outputsT+) (, g!context)] .Any))) - (function ((~ g!_) (~ g!!) [(~+ g!inputs) (~ g!context)]) - (at (~ g!!) (~' in) [[(~+ g!outputs) (~ g!context)] []]))))))))))) + (function ((, g!_) (, g!!) [(,* g!inputs) (, g!context)]) + (at (, g!!) (,' in) [[(,* g!outputs) (, g!context)] []]))))))))))) (def amount (Parser Nat) @@ -174,15 +174,15 @@ [g!keys (|> (macro.symbol "keys") (list.repeated amount) (monad.all !))] - (in (list (` (is (All ((~ g!_) (~ g!!) (~+ g!keys) (~ g!context)) - (-> ((~! monad.Monad) (~ g!!)) - (Procedure (~ g!!) - [<from> (~ g!context)] - [<to> (~ g!context)] + (in (list (` (is (All ((, g!_) (, g!!) (,* g!keys) (, g!context)) + (-> ((,! monad.Monad) (, g!!)) + (Procedure (, g!!) + [<from> (, g!context)] + [<to> (, g!context)] .Any))) - (function ((~ g!_) (~ g!!) [<from> (~ g!context)]) - (at (~ g!!) (~' in) [[<to> (~ g!context)] []]))))))))))] + (function ((, g!_) (, g!!) [<from> (, g!context)]) + (at (, g!!) (,' in) [[<to> (, g!context)] []]))))))))))] - [group (~+ g!keys) [(~+ g!keys)]] - [un_group [(~+ g!keys)] (~+ g!keys)] + [group (,* g!keys) [(,* g!keys)]] + [un_group [(,* g!keys)] (,* g!keys)] ) diff --git a/stdlib/source/library/lux/meta/type/unit.lux b/stdlib/source/library/lux/meta/type/unit.lux index a3fca0079..e0b0af638 100644 --- a/stdlib/source/library/lux/meta/type/unit.lux +++ b/stdlib/source/library/lux/meta/type/unit.lux @@ -85,17 +85,17 @@ (def .public type (syntax (_ [it <code>.any]) (macro.with_symbols [g!a] - (in (list (` ((~! //.by_example) [(~ g!a)] - (is (..Unit (~ g!a)) - (~ it)) - (~ g!a)))))))) + (in (list (` ((,! //.by_example) [(, g!a)] + (is (..Unit (, g!a)) + (, it)) + (, g!a)))))))) (with_template [<unit> <type>] [(def .public <unit> (..unit [])) (.type .public <type> - (~ (..type <unit>)))] + (, (..type <unit>)))] [gram Gram] [meter Meter] diff --git a/stdlib/source/library/lux/meta/type/unit/scale.lux b/stdlib/source/library/lux/meta/type/unit/scale.lux index f8ea57031..f1bbdb08f 100644 --- a/stdlib/source/library/lux/meta/type/unit/scale.lux +++ b/stdlib/source/library/lux/meta/type/unit/scale.lux @@ -52,10 +52,10 @@ (def .public type (syntax (_ [it <code>.any]) (macro.with_symbols [g!a] - (in (list (` ((~! ///.by_example) [(~ g!a)] - (is (..Scale (~ g!a)) - (~ it)) - (~ g!a)))))))) + (in (list (` ((,! ///.by_example) [(, g!a)] + (is (..Scale (, g!a)) + (, it)) + (, g!a)))))))) (with_template [<order_of_magnitude> <up> <up_type> <down> <down_type>] [(def .public <up> @@ -63,14 +63,14 @@ ratio.#denominator 1])) (.type .public <up_type> - (~ (..type <up>))) + (, (..type <up>))) (def .public <down> (scale [ratio.#numerator 1 ratio.#denominator <order_of_magnitude>])) (.type .public <down_type> - (~ (..type <down>)))] + (, (..type <down>)))] [ 1,000 kilo Kilo milli Milli] [ 1,000,000 mega Mega micro Micro] diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux index c02d60c69..442038fdf 100644 --- a/stdlib/source/library/lux/program.lux +++ b/stdlib/source/library/lux/program.lux @@ -35,26 +35,26 @@ @.js body @.python body ... else - (` ((~! do) (~! io.monad) - [(~ g!output) (~ body) - (~ g!_) (~! thread.run!)] - ((~' in) (~ g!output)))))] + (` ((,! do) (,! io.monad) + [(, g!output) (, body) + (, g!_) (,! thread.run!)] + ((,' in) (, g!output)))))] (in (list (` ("lux def program" - (~ (case args + (, (case args {#Raw args} - (` (.function ((~ g!program) (~ (code.symbol ["" args]))) - (~ initialization+event_loop))) + (` (.function ((, g!program) (, (code.symbol ["" args]))) + (, initialization+event_loop))) {#Parsed args} - (` (.function ((~ g!program) (~ g!args)) - (case ((~! </>.result) (.is (~! (</>.Parser (io.IO .Any))) - ((~! do) (~! <>.monad) - [(~+ args) - (~ g!_) (~! </>.end)] - ((~' in) (~ initialization+event_loop)))) - (~ g!args)) - {.#Right (~ g!output)} - (~ g!output) + (` (.function ((, g!program) (, g!args)) + (case ((,! </>.result) (.is (,! (</>.Parser (io.IO .Any))) + ((,! do) (,! <>.monad) + [(,* args) + (, g!_) (,! </>.end)] + ((,' in) (, initialization+event_loop)))) + (, g!args)) + {.#Right (, g!output)} + (, g!output) - {.#Left (~ g!message)} - (.panic! (~ g!message))))))))))))))) + {.#Left (, g!message)} + (.panic! (, g!message))))))))))))))) diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux index 5f4560e52..375664915 100644 --- a/stdlib/source/library/lux/static.lux +++ b/stdlib/source/library/lux/static.lux @@ -44,7 +44,7 @@ expression <code>.any]) (do meta.monad [pair (meta.eval (.type_literal <type>) - (` [(~ format) (~ expression)])) + (` [(, format) (, expression)])) .let [[format expression] (as <type> pair)]] (in (list (format expression))))))) @@ -56,7 +56,7 @@ expression <code>.any]) (do meta.monad [pair (meta.eval (.type_literal <type>) - (` [(~ format) (~ expression)])) + (` [(, format) (, expression)])) .let [[format expression] (as <type> pair)]] (in (list#each format expression)))))) @@ -88,7 +88,7 @@ random <code>.any]) (do meta.monad [pair (meta.eval (type_literal <type>) - (` [(~ format) (~ random)])) + (` [(, format) (, random)])) .let [[format random] (as <type> pair)] seed meta.seed .let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) @@ -103,7 +103,7 @@ random <code>.any]) (do meta.monad [pair (meta.eval (type_literal <type>) - (` [(~ format) (~ random)])) + (` [(, format) (, random)])) .let [[format random] (as <type> pair)] seed meta.seed .let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) @@ -124,9 +124,9 @@ (syntax (_ [test,then/* (<>.some (<>.and <code>.any <code>.any)) else <code>.any]) (in (list (list#mix (function (_ [test then] else) - (` (..if (~ test) - (~ then) - (~ else)))) + (` (..if (, test) + (, then) + (, else)))) else (list.reversed test,then/*)))))) diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux index 06fca5f8c..aeb290691 100644 --- a/stdlib/source/library/lux/target/common_lisp.lux +++ b/stdlib/source/library/lux/target/common_lisp.lux @@ -120,7 +120,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -202,16 +202,16 @@ body))) (with_template [<call> <input_var>+ <input_type>+ <function>+] - [(`` (def .public (<call> [(~~ (template.spliced <input_var>+))] function) - (-> [(~~ (template.spliced <input_type>+))] (Expression Any) (Computation Any)) - (..call/* function (list (~~ (template.spliced <input_var>+)))))) + [(`` (def .public (<call> [(,, (template.spliced <input_var>+))] function) + (-> [(,, (template.spliced <input_type>+))] (Expression Any) (Computation Any)) + (..call/* function (list (,, (template.spliced <input_var>+)))))) (`` (with_template [<lux_name> <host_name>] [(def .public (<lux_name> args) - (-> [(~~ (template.spliced <input_type>+))] (Computation Any)) + (-> [(,, (template.spliced <input_type>+))] (Computation Any)) (<call> args (..var <host_name>)))] - (~~ (template.spliced <function>+))))] + (,, (template.spliced <function>+))))] [call/0 [] [] [[get_universal_time/0 "get-universal-time"] @@ -266,10 +266,10 @@ (with_template [<call> <input_type>+ <function>+] [(`` (with_template [<lux_name> <host_name>] [(def .public (<lux_name> args) - (-> [(~~ (template.spliced <input_type>+))] (Access Any)) + (-> [(,, (template.spliced <input_type>+))] (Access Any)) (transmutation (<call> args (..var <host_name>))))] - (~~ (template.spliced <function>+))))] + (,, (template.spliced <function>+))))] [call/1 [(Expression Any)] [[car/1 "car"] diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux index 0c275562d..29816e610 100644 --- a/stdlib/source/library/lux/target/js.lux +++ b/stdlib/source/library/lux/target/js.lux @@ -1,6 +1,6 @@ (.require [library - [lux (.except Location Code Label or and function if undefined for comment not int try ++ -- the type_of at) + [lux (.except Location Code Label or and function if undefined for comment not int try ++ -- the type_of at ,) [control ["[0]" pipe]] [data @@ -44,7 +44,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive (<brand> brand) Any) - (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -55,7 +55,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive <brand> Any) - (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))] [Var [Location' Computation' Expression' Code]] [Access [Location' Computation' Expression' Code]] @@ -95,7 +95,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<replace> <find>] + (`` (|>> (,, (with_template [<replace> <find>] [(text.replaced <find> <replace>)] ["\\" "\"] @@ -427,14 +427,14 @@ (with_template [<apply> <arg>+ <type>+ <function>+] [(`` (def .public (<apply> function) - (-> Expression (~~ (template.spliced <type>+)) Computation) - (.function (_ (~~ (template.spliced <arg>+))) - (..apply function (list (~~ (template.spliced <arg>+))))))) + (-> Expression (,, (template.spliced <type>+)) Computation) + (.function (_ (,, (template.spliced <arg>+))) + (..apply function (list (,, (template.spliced <arg>+))))))) (`` (with_template [<definition> <function>] [(def .public <definition> (<apply> (..var <function>)))] - (~~ (template.spliced <function>+))))] + (,, (template.spliced <function>+))))] [apply_1 [_0] [Expression] [[not_a_number? "isNaN"]]] diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 267705aa7..ca0c92f65 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -696,7 +696,7 @@ (-> Nat (Bytecode Any)) (with_expansions [<specials>' (template.spliced <specials>)] (`` (case local - (~~ (with_template [<case> <instruction> <registry>] + (,, (with_template [<case> <instruction> <registry>] [<case> (..bytecode $0 <size> <registry> <instruction> [])] <specials>')) @@ -736,7 +736,7 @@ (-> Nat (Bytecode Any)) (with_expansions [<specials>' (template.spliced <specials>)] (`` (case local - (~~ (with_template [<case> <instruction> <registry>] + (,, (with_template [<case> <instruction> <registry>] [<case> (..bytecode <size> $0 <registry> <instruction> [])] <specials>')) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux index 3b613b206..f9e9d4b07 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux @@ -487,7 +487,7 @@ (let [[estimator <arity>'] <arity>] [estimator (function (_ [<input_names>]) - (`` (<arity>' (hex <code>) (~~ (template.spliced <arity_inputs>)))))])))] + (`` (<arity>' (hex <code>) (,, (template.spliced <arity_inputs>)))))])))] <definitions>' ))] diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux index d018f832f..bd9fdd41b 100644 --- a/stdlib/source/library/lux/target/jvm/class.lux +++ b/stdlib/source/library/lux/target/jvm/class.lux @@ -130,7 +130,7 @@ (def .public (format class) (Format Class) (`` (all binaryF#composite - (~~ (with_template [<format> <slot>] + (,, (with_template [<format> <slot>] [(<format> (the <slot> class))] [//magic.format #magic] @@ -140,7 +140,7 @@ [//modifier.format #modifier] [//index.format #this] [//index.format #super])) - (~~ (with_template [<format> <slot>] + (,, (with_template [<format> <slot>] [((binaryF.sequence_16 <format>) (the <slot> class))] [//index.format #interfaces] diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index ae57d805f..fbd207bdc 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -117,8 +117,8 @@ [(def <format_name> (Format <type>) (`` (|>> representation - (~~ (template.spliced <write>)) - (~~ (template.spliced <format>)))))] + (,, (template.spliced <write>)) + (,, (template.spliced <format>)))))] [integer_format Integer [] [binaryF.bits_32]] [float_format Float [java/lang/Float::floatToRawIntBits ffi.of_int .i64] [i32.i32 binaryF.bits_32]] diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux index 44cbaee15..e0561b457 100644 --- a/stdlib/source/library/lux/target/jvm/field.lux +++ b/stdlib/source/library/lux/target/jvm/field.lux @@ -52,7 +52,7 @@ (def .public (format field) (Format Field) (`` (all binaryF#composite - (~~ (with_template [<format> <slot>] + (,, (with_template [<format> <slot>] [(<format> (the <slot> field))] [modifier.format #modifier] diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux index 7fe3c2d7b..3db1be9bc 100644 --- a/stdlib/source/library/lux/target/jvm/method.lux +++ b/stdlib/source/library/lux/target/jvm/method.lux @@ -101,7 +101,7 @@ (def .public (format field) (Format Method) (`` (all \\format#composite - (~~ (with_template [<format> <slot>] + (,, (with_template [<format> <slot>] [(<format> (the <slot> field))] [//modifier.format #modifier] diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux index b12b167cc..b76d05904 100644 --- a/stdlib/source/library/lux/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/target/jvm/modifier.lux @@ -85,9 +85,9 @@ (syntax (_ [ofT <code>.any options (<>.many <code>.any)]) (with_symbols [g!modifier g!code] - (in (list (` (with_template [(~ g!code) (~ g!modifier)] - [(def (~' .public) (~ g!modifier) - (..Modifier (~ ofT)) - ((~! ..modifier) ((~! number.hex) (~ g!code))))] + (in (list (` (with_template [(, g!code) (, g!modifier)] + [(def (,' .public) (, g!modifier) + (..Modifier (, ofT)) + ((,! ..modifier) ((,! number.hex) (, g!code))))] - (~+ options)))))))) + (,* options)))))))) diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index 7a5bdebc0..cf38c5efa 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -134,7 +134,7 @@ (let [class_name (|> class (as (java/lang/Class java/lang/Object)) java/lang/Class::getName)] - (`` (if (or (~~ (with_template [<reflection>] + (`` (if (or (,, (with_template [<reflection>] [(text#= (/reflection.reflection <reflection>) class_name)] @@ -225,7 +225,7 @@ (let [class_name (|> reflection (as (java/lang/Class java/lang/Object)) java/lang/Class::getName)] - (`` (cond (~~ (with_template [<reflection> <type>] + (`` (cond (,, (with_template [<reflection> <type>] [(text#= (/reflection.reflection <reflection>) class_name) {try.#Success <type>}] diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux index 9b90e6c28..f9944b0eb 100644 --- a/stdlib/source/library/lux/target/jvm/type.lux +++ b/stdlib/source/library/lux/target/jvm/type.lux @@ -167,7 +167,7 @@ (def .public (primitive? type) (-> (Type Value) (Either (Type Object) (Type Primitive))) - (if (`` (or (~~ (with_template [<type>] + (if (`` (or (,, (with_template [<type>] [(at ..equivalence = (is (Type Value) <type>) type)] [..boolean] @@ -184,7 +184,7 @@ (def .public (void? type) (-> (Type Return) (Either (Type Value) (Type Void))) - (if (`` (or (~~ (with_template [<type>] + (if (`` (or (,, (with_template [<type>] [(at ..equivalence = (is (Type Return) <type>) type)] [..void])))) diff --git a/stdlib/source/library/lux/target/jvm/type/category.lux b/stdlib/source/library/lux/target/jvm/type/category.lux index bbef2f241..ad293150e 100644 --- a/stdlib/source/library/lux/target/jvm/type/category.lux +++ b/stdlib/source/library/lux/target/jvm/type/category.lux @@ -26,7 +26,7 @@ [(with_expansions [<raw> (template.symbol [<child> "'"])] (primitive <raw> Any) (type .public <child> - (`` (<| Return' Value' (~~ (template.spliced <parents>)) <raw>))))] + (`` (<| Return' Value' (,, (template.spliced <parents>)) <raw>))))] [[] Primitive] [[Object' Parameter'] Var] diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux index 724092721..10160204c 100644 --- a/stdlib/source/library/lux/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/target/jvm/type/lux.lux @@ -176,7 +176,7 @@ (|>> (<>#each (check#each (function (_ elementT) (case elementT {.#Primitive name {.#End}} - (if (`` (or (~~ (with_template [<reflection>] + (if (`` (or (,, (with_template [<reflection>] [(text#= (//reflection.reflection <reflection>) name)] [//reflection.boolean] diff --git a/stdlib/source/library/lux/target/jvm/type/reflection.lux b/stdlib/source/library/lux/target/jvm/type/reflection.lux index de151b35d..4ea86a811 100644 --- a/stdlib/source/library/lux/target/jvm/type/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/type/reflection.lux @@ -63,7 +63,7 @@ elementR (`` (cond (text.starts_with? //descriptor.array_prefix element') element' - (~~ (with_template [<primitive> <descriptor>] + (,, (with_template [<primitive> <descriptor>] [(at ..equivalence = <primitive> element) (//descriptor.descriptor <descriptor>)] diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index 440c3f4ce..b0432cbdd 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -66,7 +66,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive (<brand> brand) Any) - (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -77,7 +77,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive <brand> Any) - (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))] [Literal [Computation' Expression' Code]] [Var [Location' Computation' Expression' Code]] @@ -123,7 +123,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -390,7 +390,7 @@ <types> (arity_types <arity>) <definitions> (template.spliced <function>+)] (with_template [<function>] - [(`` (def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>) + [(`` (def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>) (-> <types> Computation) (..apply (.list <inputs>) (..var <function>))))] diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux index 747a55abf..ef08c945d 100644 --- a/stdlib/source/library/lux/target/php.lux +++ b/stdlib/source/library/lux/target/php.lux @@ -74,7 +74,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive (<brand> brand) Any) - (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -85,7 +85,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive .public <brand> Any) - (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))] [Literal [Computation' Expression' Code]] [Var [Location' Computation' Expression' Code]] @@ -164,7 +164,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -254,7 +254,7 @@ (..apply (.list <inputs>) function)) (with_template [<function>] - [(`` (def .public (~~ (template.symbol [<function> "/" <arity>])) + [(`` (def .public (,, (template.symbol [<function> "/" <arity>])) (<apply> (..constant <function>))))] <definitions>))] diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index a297ad529..e1197964b 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -147,7 +147,7 @@ (.def .public float (-> Frac Literal) - (`` (|>> (pipe.cond (~~ (with_template [<test> <python>] + (`` (|>> (pipe.cond (,, (with_template [<test> <python>] [[<test>] [(pipe.new (format "float(" text.double_quote <python> text.double_quote ")") [])]] @@ -162,7 +162,7 @@ (.def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -467,8 +467,8 @@ [(with_expansions [<inputs> (arity_inputs <arity>) <definitions> (template.spliced <function>+)] (with_template [<function>] - [(`` (.def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>) - (-> (~~ (arity_types <arity>)) (Computation Any)) + [(`` (.def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>) + (-> (,, (arity_types <arity>)) (Computation Any)) (..apply (.list <inputs>) (..var <function>))))] <definitions>))] diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux index 574dcb4bf..3ddfac43d 100644 --- a/stdlib/source/library/lux/target/r.lux +++ b/stdlib/source/library/lux/target/r.lux @@ -28,7 +28,7 @@ (with_template [<type> <super>+] [(with_expansions [<kind> (template.symbol [<type> "'"])] (primitive .public (<kind> kind) Any) - (`` (type .public <type> (|> Any <kind> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> Any <kind> (,, (template.spliced <super>+))))))] [Expression [Code]] ) @@ -36,7 +36,7 @@ (with_template [<type> <super>+] [(with_expansions [<kind> (template.symbol [<type> "'"])] (primitive .public (<kind> kind) Any) - (`` (type .public (<type> <brand>) (|> <brand> <kind> (~~ (template.spliced <super>+))))))] + (`` (type .public (<type> <brand>) (|> <brand> <kind> (,, (template.spliced <super>+))))))] [Var [Expression' Code]] ) @@ -139,7 +139,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -231,7 +231,7 @@ (..apply (.list <inputs>) function)) (with_template [<function>] - [(`` (def .public (~~ (template.symbol [<function> "/" <arity>])) + [(`` (def .public (,, (template.symbol [<function> "/" <arity>])) (-> [<types>] Expression) (<apply> (..var <function>))))] diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux index aa92ae9b3..dd99e29f7 100644 --- a/stdlib/source/library/lux/target/ruby.lux +++ b/stdlib/source/library/lux/target/ruby.lux @@ -60,7 +60,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive (<brand> brand) Any) - (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -73,7 +73,7 @@ (with_template [<type> <super>+] [(with_expansions [<brand> (template.symbol [<type> "'"])] (primitive <brand> Any) - (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+))))))] + (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+))))))] [Literal [Computation' Expression' Code]] [Access [Location' Computation' Expression' Code]] @@ -160,7 +160,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -448,7 +448,7 @@ (representation on)))) (with_template [<name>] - [(`` (def .public ((~~ (template.symbol [<name> "/*"])) attributes) + [(`` (def .public ((,, (template.symbol [<name> "/*"])) attributes) (-> (List Text) Statement) (..statement (..apply (list#each ..string attributes) {.#None} (..manual <name>)))))] @@ -499,7 +499,7 @@ <types> (arity_types <arity>) <definitions> (template.spliced <function>+)] (with_template [<function>] - [(`` (def .public ((~~ (template.symbol [<function> "/" <arity>])) <inputs>) + [(`` (def .public ((,, (template.symbol [<function> "/" <arity>])) <inputs>) (-> <types> Computation) (..apply (.list <inputs>) {.#None} (..manual <function>))))] diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux index 4173b4241..6918a872c 100644 --- a/stdlib/source/library/lux/target/scheme.lux +++ b/stdlib/source/library/lux/target/scheme.lux @@ -49,14 +49,14 @@ (with_template [<type> <brand> <super>+] [(primitive .public (<brand> brand) Any) - (`` (type .public <type> (|> Any <brand> (~~ (template.spliced <super>+)))))] + (`` (type .public <type> (|> Any <brand> (,, (template.spliced <super>+)))))] [Expression Expression' [Code]] ) (with_template [<type> <brand> <super>+] [(primitive .public <brand> Any) - (`` (type .public <type> (|> <brand> (~~ (template.spliced <super>+)))))] + (`` (type .public <type> (|> <brand> (,, (template.spliced <super>+)))))] [Var Var' [Expression' Code]] [Computation Computation' [Expression' Code]] @@ -138,7 +138,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [<find> <replace>] + (`` (|>> (,, (with_template [<find> <replace>] [(text.replaced <find> <replace>)] ["\" "\\"] @@ -201,14 +201,14 @@ (with_template [<apply> <arg>+ <type>+ <function>+] [(`` (def .public (<apply> procedure) - (-> Expression (~~ (template.spliced <type>+)) Computation) - (function (_ (~~ (template.spliced <arg>+))) - (..apply (list (~~ (template.spliced <arg>+))) procedure)))) + (-> Expression (,, (template.spliced <type>+)) Computation) + (function (_ (,, (template.spliced <arg>+))) + (..apply (list (,, (template.spliced <arg>+))) procedure)))) (`` (with_template [<definition> <function>] [(def .public <definition> (<apply> (..var <function>)))] - (~~ (template.spliced <function>+))))] + (,, (template.spliced <function>+))))] [apply/1 [_0] [Expression] [[exact/1 "exact"] diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux index 69db97f42..19f0d287b 100644 --- a/stdlib/source/library/lux/test.lux +++ b/stdlib/source/library/lux/test.lux @@ -338,12 +338,12 @@ (syntax (_ [coverage (<code>.tuple (<>.many <code>.any)) condition <code>.any]) (let [coverage (list#each (function (_ definition) - (` ((~! ..reference) (~ definition)))) + (` ((,! ..reference) (, definition)))) coverage)] - (in (list (` ((~! <function>) + (in (list (` ((,! <function>) (is (.List .Symbol) - (.list (~+ coverage))) - (~ condition))))))))] + (.list (,* coverage))) + (, condition))))))))] [coverage' ..|coverage'|] [coverage ..|coverage|] @@ -353,12 +353,12 @@ (syntax (_ [coverage (<code>.tuple (<>.many <code>.any)) test <code>.any]) (let [coverage (list#each (function (_ definition) - (` ((~! ..reference) (~ definition)))) + (` ((,! ..reference) (, definition)))) coverage)] - (in (list (` ((~! ..|for|) + (in (list (` ((,! ..|for|) (is (.List .Symbol) - (.list (~+ coverage))) - (~ test)))))))) + (.list (,* coverage))) + (, test)))))))) (def (covering' module coverage test) (-> Text Text Test Test) @@ -383,10 +383,10 @@ aggregate)) {.#End}) ..encoded_coverage)]] - (in (list (` ((~! ..covering') - (~ (code.text module)) - (~ (code.text coverage)) - (~ test)))))))) + (in (list (` ((,! ..covering') + (, (code.text module)) + (, (code.text coverage)) + (, test)))))))) (exception .public (error_during_execution [error Text]) (exception.report diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux index 2b58b5bf2..dfc84617e 100644 --- a/stdlib/source/library/lux/time/instant.lux +++ b/stdlib/source/library/lux/time/instant.lux @@ -74,7 +74,7 @@ (Enum Instant) (implementation (def order ..order) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(def <name> (|>> representation (at i.enum <name>) abstraction))] diff --git a/stdlib/source/library/lux/time/year.lux b/stdlib/source/library/lux/time/year.lux index 02062e6aa..a7bdb0dcf 100644 --- a/stdlib/source/library/lux/time/year.lux +++ b/stdlib/source/library/lux/time/year.lux @@ -96,7 +96,7 @@ (-- year) (++ year))] (`` (|> +0 - (~~ (with_template [<polarity> <years>] + (,, (with_template [<polarity> <years>] [(<polarity> (i./ (.int <years>) limit))] [i.+ ..leap] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux index 2d149643e..13d0ba6ed 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux @@ -178,13 +178,13 @@ (syntax (_ [content <code>.any]) (in (list (` (.<| {..#Reference} <tag> - (~ content)))))))] + (, content)))))))] [variable {reference.#Variable}] [constant {reference.#Constant}] - [local ((~! reference.local))] - [foreign ((~! reference.foreign))] + [local ((,! reference.local))] + [foreign ((,! reference.foreign))] ) (with_template [<name> <tag>] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux index e13058163..bbffab2a0 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux @@ -224,8 +224,8 @@ list.reversed)) (with_template [<name> <types> <inputs> <exception> <when> <then>] - [(`` (def .public (<name> (~~ (template.spliced <inputs>)) complex) - (-> (~~ (template.spliced <types>)) Type (Operation Type)) + [(`` (def .public (<name> (,, (template.spliced <inputs>)) complex) + (-> (,, (template.spliced <types>)) Type (Operation Type)) (loop (again [depth 0 it complex]) (case it diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux index b8067a964..bd46c3d8c 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux @@ -251,9 +251,9 @@ (phase.except ..no_buffer_for_saving_code [artifact_id])))) (with_template [<type> <mandatory?> <inputs> <input_types> <name> <artifact>] - [(`` (def .public (<name> it (~~ (template.spliced <inputs>)) dependencies) + [(`` (def .public (<name> it (,, (template.spliced <inputs>)) dependencies) (All (_ anchor expression declaration) - (-> <type> (~~ (template.spliced <input_types>)) (Set unit.ID) (Operation anchor expression declaration artifact.ID))) + (-> <type> (,, (template.spliced <input_types>)) (Set unit.ID) (Operation anchor expression declaration artifact.ID))) (function (_ (^.let stateE [bundle state])) (let [[id registry'] (<artifact> it <mandatory?> dependencies (the #registry state))] {try.#Success [[bundle (has #registry registry' state)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux index adabb8621..5882c78f4 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux @@ -111,25 +111,25 @@ [.#Int /simple.int] [.#Rev /simple.rev]) - (^.` [(~+ elems)]) + (^.` [(,* elems)]) (/complex.record analysis archive elems) - (^.` {(~ [_ {.#Symbol tag}]) (~+ values)}) + (^.` {(, [_ {.#Symbol tag}]) (,* values)}) (..variant_analysis analysis archive tag values) - (^.` ({(~+ branches)} (~ input))) + (^.` ({(,* branches)} (, input))) (..case_analysis analysis archive input branches code) - (^.` ([(~ [_ {.#Symbol ["" function_name]}]) (~ [_ {.#Symbol ["" arg_name]}])] (~ body))) + (^.` ([(, [_ {.#Symbol ["" function_name]}]) (, [_ {.#Symbol ["" arg_name]}])] (, body))) (/function.function analysis function_name arg_name archive body) - (^.` ((~ [_ {.#Text extension_name}]) (~+ extension_args))) + (^.` ((, [_ {.#Text extension_name}]) (,* extension_args))) (//extension.apply archive analysis [extension_name extension_args]) - (^.` ((~ functionC) (~+ argsC+))) + (^.` ((, functionC) (,* argsC+))) (..apply_analysis expander analysis archive functionC argsC+) - (^.` {(~ [_ {.#Nat lefts}]) (~ [_ {.#Bit right?}]) (~+ values)}) + (^.` {(, [_ {.#Nat lefts}]) (, [_ {.#Bit right?}]) (,* values)}) (..sum_analysis analysis archive lefts right? values) _ diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux index db181d050..7301f6b8e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -301,9 +301,9 @@ (n.= (-- num_cases) idx)) (pattern_analysis {.#None} (type.variant (list.after (-- num_cases) flat_sum)) - (` [(~+ values)]) + (` [(,* values)]) next) - (pattern_analysis {.#None} caseT (` [(~+ values)]) next)) + (pattern_analysis {.#None} caseT (` [(,* values)]) next)) _ (/type.check (monad.each check.monad check.forget! @ex_var+))] (in [(/pattern.variant [lefts right? testP]) nextA])) @@ -331,7 +331,7 @@ [idx group variantT] (///extension.lifted (meta.tag tag)) _ (/type.check (check.check :input: variantT)) .let [[lefts right?] (/complex.choice (list.size group) idx)]] - (pattern_analysis {.#Some (list.size group)} :input: (` {(~ (code.nat lefts)) (~ (code.bit right?)) (~+ values)}) next))) + (pattern_analysis {.#Some (list.size group)} :input: (` {(, (code.nat lefts)) (, (code.bit right?)) (,* values)}) next))) _ (/.except ..invalid [pattern]) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux index 4328de2b2..2ee8cae7d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -46,7 +46,7 @@ members (List Code)]) (exception.report "Type" (%.type type) - "Expression" (%.code (` [(~+ members)]))))] + "Expression" (%.code (` [(,* members)]))))] [invalid_tuple_type] [cannot_analyse_tuple] 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 42e4d3e3c..54592b36b 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 @@ -539,7 +539,7 @@ (/////analysis.except ..non_parameter objectT) {.#Primitive name parameters} - (`` (cond (or (~~ (with_template [<type>] + (`` (cond (or (,, (with_template [<type>] [(text#= (..reflection <type>) name)] [jvm.boolean] @@ -597,7 +597,7 @@ (-> .Type (Operation (Type Value))) (case objectT {.#Primitive name {.#End}} - (`` (cond (~~ (with_template [<type>] + (`` (cond (,, (with_template [<type>] [(text#= (..reflection <type>) name) (phase#in <type>)] @@ -610,7 +610,7 @@ [jvm.double] [jvm.char])) - (~~ (with_template [<type>] + (,, (with_template [<type>] [(text#= (..reflection (jvm.array <type>)) name) (phase#in (jvm.array <type>))] @@ -986,7 +986,7 @@ (analyse archive fromC)) source_name (at ! each ..reflection (check_jvm fromT)) can_cast? (is (Operation Bit) - (`` (cond (~~ (with_template [<primitive> <object>] + (`` (cond (,, (with_template [<primitive> <object>] [(let [=primitive (reflection.reflection <primitive>)] (or (and (text#= =primitive source_name) (or (text#= <object> target_name) @@ -1175,7 +1175,7 @@ (list#each (|>> again (as (Type Parameter)))) (jvm.class name)) {.#None}) - (~~ (with_template [<read> <as> <write>] + (,, (with_template [<read> <as> <write>] [(case (<read> it) {.#Some :sub:} (<write> (as (Type <as>) (again :sub:))) @@ -1258,8 +1258,8 @@ (with_template [<name> <type> <params>] [(`` (def <name> - (-> (<type> (~~ (template.spliced <params>))) (List (Type Class))) - (|>> (~~ (template.symbol [<type> "::getExceptionTypes"])) + (-> (<type> (,, (template.spliced <params>))) (List (Type Class))) + (|>> (,, (template.symbol [<type> "::getExceptionTypes"])) (array.list {.#None}) (list#each ..lux_class))))] @@ -2508,7 +2508,7 @@ (^.with_template [<tag> <type> <constant>] [[_ {<tag> value}] (do pool.monad - [constant (`` (|> value (~~ (template.spliced <constant>)))) + [constant (`` (|> value (,, (template.spliced <constant>)))) attribute (attribute.constant constant)] (field.field ..constant::modifier name #1 <type> (sequence.sequence attribute)))]) ([.#Bit jvm.boolean [(pipe.case #0 +0 #1 +1) .i64 i32.i32 constant.integer pool.integer]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux index 556a622be..9f74950cb 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux @@ -113,7 +113,7 @@ (def visibility' (<text>.Parser (Modifier field.Field)) (`` (all <>.either - (~~ (with_template [<label> <modifier>] + (,, (with_template [<label> <modifier>] [(<>.after (<text>.this <label>) (<>#in <modifier>))] ["public" field.public] @@ -128,7 +128,7 @@ (def inheritance (Parser (Modifier class.Class)) (`` (all <>.either - (~~ (with_template [<label> <modifier>] + (,, (with_template [<label> <modifier>] [(<>.after (<code>.this_text <label>) (<>#in <modifier>))] ["final" class.final] @@ -138,7 +138,7 @@ (def state (Parser (Modifier field.Field)) (`` (all <>.either - (~~ (with_template [<label> <modifier>] + (,, (with_template [<label> <modifier>] [(<>.after (<code>.this_text <label>) (<>#in <modifier>))] ["volatile" field.volatile] @@ -235,7 +235,7 @@ (^.with_template [<tag> <type> <constant>] [[_ {<tag> value}] (do pool.monad - [constant (`` (|> value (~~ (template.spliced <constant>)))) + [constant (`` (|> value (,, (template.spliced <constant>)))) attribute (attribute.constant constant)] (field.field ..constant::modifier name #1 <type> (sequence.sequence attribute)))]) ([.#Bit type.boolean [(pipe.case #0 +0 #1 +1) .i64 i32.i32 constant.integer pool.integer]] @@ -431,7 +431,7 @@ (<load> jvm_register) (value.wrap <type>) (_.astore lux_register))]]] - (`` (cond (~~ (with_template [<shift> <load> <type>] + (`` (cond (,, (with_template [<shift> <load> <type>] [(at type.equivalence = <type> argumentT) (wrap_primitive <shift> <load> <type>)] @@ -517,7 +517,7 @@ [(all _.composite (value.unwrap <type>) <return>)]] - (`` (cond (~~ (with_template [<return> <type>] + (`` (cond (,, (with_template [<return> <type>] [(at type.equivalence = <type> returnT) (unwrap_primitive <return> <type>)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux index 73c27d038..13662d1c3 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux @@ -608,7 +608,7 @@ (function (_ extension_name generate archive [from to valueS]) (do //////.monad [valueG (generate archive valueS)] - (in (`` (cond (~~ (with_template [<object> <type>] + (in (`` (cond (,, (with_template [<object> <type>] [(and (text#= (..reflection <type>) from) (text#= <object> to)) (all _.composite @@ -1181,7 +1181,7 @@ [(all _.composite (///value.unwrap <type>) <return>)]] - (`` (cond (~~ (with_template [<return> <type>] + (`` (cond (,, (with_template [<return> <type>] [(at type.equivalence = <type> returnT) (unwrap_primitive <return> <type>)] @@ -1236,7 +1236,7 @@ (<load> jvm_register) (///value.wrap <type>) (_.astore lux_register))]]] - (`` (cond (~~ (with_template [<shift> <load> <type>] + (`` (cond (,, (with_template [<shift> <load> <type>] [(at type.equivalence = <type> argumentT) (wrap_primitive <shift> <load> <type>)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux index 5667e47db..434d214e0 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux @@ -92,13 +92,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def runtime (syntax (_ [declaration (<>.or <code>.local @@ -109,18 +109,18 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (~ (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (let [g!name (code.local name) code_nameC (code.local (format "@" name))] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) _.Var/1 - (~ runtime_name))) + (, runtime_name))) - (` (def (~ code_nameC) + (` (def (, code_nameC) (_.Expression Any) - (_.defparameter (~ runtime_name) (~ code))))))) + (_.defparameter (, runtime_name) (, code))))))) {.#Right [name inputs]} (let [g!name (code.local name) @@ -129,15 +129,15 @@ inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` (_.Expression Any))) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) (_.Computation Any)) - (_.call/* (~ runtime_name) (list (~+ inputsC))))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) (_.Computation Any)) + (_.call/* (, runtime_name) (list (,* inputsC))))) - (` (def (~ code_nameC) + (` (def (, code_nameC) (_.Expression Any) - (..with_vars [(~+ inputsC)] - (_.defun (~ runtime_name) (_.args (list (~+ inputsC))) - (~ code)))))))))))))) + (..with_vars [(,* inputsC)] + (_.defun (, runtime_name) (_.args (list (,* inputsC))) + (, code)))))))))))))) (runtime (lux//try op) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux index 0f8d68aea..0ccc9cbd3 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux @@ -22,7 +22,7 @@ (def Vector (syntax (_ [size <code>.nat elemT <code>.any]) - (in (list (` [(~+ (list.repeated size elemT))]))))) + (in (list (` [(,* (list.repeated size elemT))]))))) (def Arity (template (_ arity) @@ -34,24 +34,24 @@ (with_symbols [g!_ g!extension g!name g!phase g!archive g!inputs g!anchor g!expression g!declaration] (do [! meta.monad] [g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))] - (in (list (` (is (All ((~ g!_) (~ g!anchor) (~ g!expression) (~ g!declaration)) - (-> ((Arity (~ (code.nat arity))) (~ g!expression)) - (generation.Handler (~ g!anchor) (~ g!expression) (~ g!declaration)))) - (function ((~ g!_) (~ g!extension)) - (function ((~ g!_) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs)) - (case (~ g!inputs) - (pattern (list (~+ g!input+))) + (in (list (` (is (All ((, g!_) (, g!anchor) (, g!expression) (, g!declaration)) + (-> ((Arity (, (code.nat arity))) (, g!expression)) + (generation.Handler (, g!anchor) (, g!expression) (, g!declaration)))) + (function ((, g!_) (, g!extension)) + (function ((, g!_) (, g!name) (, g!phase) (, g!archive) (, g!inputs)) + (case (, g!inputs) + (pattern (list (,* g!input+))) (do ///.monad - [(~+ (|> g!input+ + [(,* (|> g!input+ (list#each (function (_ g!input) - (list g!input (` ((~ g!phase) (~ g!archive) (~ g!input)))))) + (list g!input (` ((, g!phase) (, g!archive) (, g!input)))))) list.together))] - ((~' in) ((~ g!extension) [(~+ g!input+)]))) + ((,' in) ((, g!extension) [(,* g!input+)]))) - (~ g!_) - (///.except ///extension.incorrect_arity [(~ g!name) - (~ (code.nat arity)) - (list.size (~ g!inputs))])) + (, g!_) + (///.except ///extension.incorrect_arity [(, g!name) + (, (code.nat arity)) + (list.size (, g!inputs))])) )))))))))) (with_template [<arity> <type> <term>] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux index cc2e746e4..75762cc34 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux @@ -86,13 +86,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def runtime (syntax (_ [declaration (<>.or <code>.local @@ -100,35 +100,35 @@ (<>.some <code>.local)))) code <code>.any]) (macro.with_symbols [g!_ runtime] - (let [runtime_name (` (_.var (~ (code.text (%.code runtime)))))] + (let [runtime_name (` (_.var (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (let [g!name (code.local name)] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) Var - (~ runtime_name))) + (, runtime_name))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!name)) - (~ code)))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!name)) + (, code)))))))) {.#Right [name inputs]} (let [g!name (code.local name) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) Computation) - (_.apply (~ runtime_name) (list (~+ inputsC))))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) Computation) + (_.apply (, runtime_name) (list (,* inputsC))))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!_)) - (..with_vars [(~+ inputsC)] - (_.function (~ g!_) (list (~+ inputsC)) - (~ code))))))))))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!_)) + (..with_vars [(,* inputsC)] + (_.function (, g!_) (list (,* inputsC)) + (, code))))))))))))))) (def length (-> Expression Computation) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux index 365da0d4d..d44068070 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux @@ -13,7 +13,7 @@ (with_template [<name> <boolean> <byte> <short> <int> <long> <float> <double> <char>] [(def (<name> type) (-> (Type Primitive) Text) - (`` (cond (~~ (with_template [<type> <output>] + (`` (cond (,, (with_template [<type> <output>] [(type#= <type> type) <output>] [type.boolean <boolean>] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux index 1c22af9cc..0d3d0f783 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux @@ -108,13 +108,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def module_id 0) @@ -128,20 +128,20 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (~ (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (macro.with_symbols [g!_] (let [g!name (code.local name)] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) Var - (~ runtime_name))) + (, runtime_name))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!name)) - (_.set (~ g!name) (~ code)))))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!name)) + (_.set (, g!name) (, code)))))))))) {.#Right [name inputs]} (macro.with_symbols [g!_] @@ -149,17 +149,17 @@ inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) Computation) - (_.apply (list (~+ inputsC)) (~ runtime_name)))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) Computation) + (_.apply (list (,* inputsC)) (, runtime_name)))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!_)) - (..with_vars [(~+ inputsC)] - (_.function (~ g!_) (list (~+ inputsC)) - (~ code))))))))))))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!_)) + (..with_vars [(,* inputsC)] + (_.function (, g!_) (list (,* inputsC)) + (, code))))))))))))))))) (def (item index table) (-> Expression Expression Location) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux index fa45c35b0..2e525be79 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux @@ -75,13 +75,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def module_id 0) @@ -95,20 +95,20 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.constant (~ (code.text (%.code runtime)))))] + runtime_name (` (_.constant (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (macro.with_symbols [g!_] (let [g!name (code.local name)] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) Var - (~ runtime_name))) + (, runtime_name))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!name)) - (_.define (~ g!name) (~ code)))))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!name)) + (_.define (, g!name) (, code)))))))))) {.#Right [name inputs]} (macro.with_symbols [g!_] @@ -116,18 +116,18 @@ inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) Computation) - (_.apply (list (~+ inputsC)) (~ runtime_name)))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) Computation) + (_.apply (list (,* inputsC)) (, runtime_name)))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..feature (~ runtime_name) - (function ((~ g!_) (~ g!_)) - (..with_vars [(~+ inputsC)] - (_.define_function (~ g!_) - (list (~+ (list#each (|>> (~) [false] (`)) inputsC))) - (~ code))))))))))))))))) + (..feature (, runtime_name) + (function ((, g!_) (, g!_)) + (..with_vars [(,* inputsC)] + (_.define_function (, g!_) + (list (,* (list#each (|>> (,) [false] (`)) inputsC))) + (, code))))))))))))))))) (runtime (io//log! message) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux index 93f0477c7..19c967248 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux @@ -114,13 +114,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def runtime (syntax (_ [declaration (<>.or <code>.local @@ -132,32 +132,32 @@ (macro.with_symbols [g!_] (let [nameC (code.local name) code_nameC (code.local (format "@" name)) - runtime_nameC (` (runtime_name (~ (code.text name))))] - (in (list (` (def .public (~ nameC) SVar (~ runtime_nameC))) - (` (def (~ code_nameC) + runtime_nameC (` (runtime_name (, (code.text name))))] + (in (list (` (def .public (, nameC) SVar (, runtime_nameC))) + (` (def (, code_nameC) (Statement Any) - (..feature (~ runtime_nameC) - (function ((~ g!_) (~ g!_)) - (_.set (list (~ g!_)) (~ code)))))))))) + (..feature (, runtime_nameC) + (function ((, g!_) (, g!_)) + (_.set (list (, g!_)) (, code)))))))))) {.#Right [name inputs]} (macro.with_symbols [g!_] (let [nameC (code.local name) code_nameC (code.local (format "@" name)) - runtime_nameC (` (runtime_name (~ (code.text name)))) + runtime_nameC (` (runtime_name (, (code.text name)))) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` (_.Expression Any))) inputs)] - (in (list (` (def .public ((~ nameC) (~+ inputsC)) - (-> (~+ inputs_typesC) (Computation Any)) - (_.apply (list (~+ inputsC)) (~ runtime_nameC)))) - (` (def (~ code_nameC) + (in (list (` (def .public ((, nameC) (,* inputsC)) + (-> (,* inputs_typesC) (Computation Any)) + (_.apply (list (,* inputsC)) (, runtime_nameC)))) + (` (def (, code_nameC) (Statement Any) - (..feature (~ runtime_nameC) - (function ((~ g!_) (~ g!_)) - (..with_vars [(~+ inputsC)] - (_.def (~ g!_) (list (~+ inputsC)) - (~ code)))))))))))))) + (..feature (, runtime_nameC) + (function ((, g!_) (, g!_)) + (..with_vars [(,* inputsC)] + (_.def (, g!_) (list (,* inputsC)) + (, code)))))))))))))) (runtime (lux::try op) @@ -292,7 +292,7 @@ (runtime (i64::64 input) (with_vars [temp] - (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>] + (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>] [(_.if (|> input <scenario>) (all _.then (_.set (list temp) (_.% <iteration> input)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux index b0d02c095..49dfb21af 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux @@ -81,13 +81,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def runtime (syntax (_ [declaration (<>.or <code>.local @@ -98,33 +98,33 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (~ (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (let [g!name (code.local name)] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) _.SVar - (~ runtime_name))) + (, runtime_name))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) _.Expression - (_.set! (~ runtime_name) (~ code))))))) + (_.set! (, runtime_name) (, code))))))) {.#Right [name inputs]} (let [g!name (code.local name) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) _.Expression) - (_.apply (list (~+ inputsC)) (~ runtime_name)))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) _.Expression) + (_.apply (list (,* inputsC)) (, runtime_name)))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) _.Expression - (..with_vars [(~+ inputsC)] - (_.set! (~ runtime_name) - (_.function (list (~+ inputsC)) - (~ code))))))))))))))) + (..with_vars [(,* inputsC)] + (_.set! (, runtime_name) + (_.function (list (,* inputsC)) + (, code))))))))))))))) (def .public variant_tag_field "luxVT") (def .public variant_flag_field "luxVF") diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux index a3d1fe4ab..6684e6a59 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux @@ -73,13 +73,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.local (~ (code.text (format "v" (%.nat id))))))))) + (` (_.local (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def module_id 0) @@ -116,41 +116,41 @@ {.#Left name} (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.constant (~ (code.text (%.code runtime))))) + runtime_name (` (_.constant (, (code.text (%.code runtime))))) g!name (code.local name)] - (in (list (` (def .public (~ g!name) _.CVar (~ runtime_name))) - (` (def (~ (code.local (format "@" name))) + (in (list (` (def .public (, g!name) _.CVar (, runtime_name))) + (` (def (, (code.local (format "@" name))) Statement - (~ (list#mix (function (_ [when then] else) - (` (_.if (~ when) - (_.set (list (~ runtime_name)) (~ then)) - (~ else)))) - (` (_.set (list (~ runtime_name)) (~ default_implementation))) + (, (list#mix (function (_ [when then] else) + (` (_.if (, when) + (_.set (list (, runtime_name)) (, then)) + (, else)))) + (` (_.set (list (, runtime_name)) (, default_implementation))) conditional_implementations)))))))) {.#Right [name inputs]} (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.local (~ (code.text (%.code runtime))))) + runtime_name (` (_.local (, (code.text (%.code runtime))))) g!name (code.local name) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) Computation) - (_.apply (list (~+ inputsC)) {.#None} - (~ runtime_name)))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) Computation) + (_.apply (list (,* inputsC)) {.#None} + (, runtime_name)))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) Statement - (..with_vars [(~+ inputsC)] - (~ (list#mix (function (_ [when then] else) - (` (_.if (~ when) - (_.function (~ runtime_name) (list (~+ inputsC)) - (~ then)) - (~ else)))) - (` (_.function (~ runtime_name) (list (~+ inputsC)) - (~ default_implementation))) + (..with_vars [(,* inputsC)] + (, (list#mix (function (_ [when then] else) + (` (_.if (, when) + (_.function (, runtime_name) (list (,* inputsC)) + (, then)) + (, else)))) + (` (_.function (, runtime_name) (list (,* inputsC)) + (, default_implementation))) conditional_implementations)))))))))))))) (def tuple_size @@ -295,7 +295,7 @@ (i64::i64 input) [..mruby? (_.return input)] (with_vars [temp] - (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>] + (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>] [(_.if (|> input <scenario>) (all _.then (_.set (list temp) (_.% <iteration> input)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux index 215e6af9a..1bf3f72eb 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux @@ -63,13 +63,13 @@ body <code>.any]) (do [! meta.monad] [ids (monad.all ! (list.repeated (list.size vars) meta.seed))] - (in (list (` (let [(~+ (|> vars + (in (list (` (let [(,* (|> vars (list.zipped_2 ids) (list#each (function (_ [id var]) (list (code.local var) - (` (_.var (~ (code.text (format "v" (%.nat id))))))))) + (` (_.var (, (code.text (format "v" (%.nat id))))))))) list.together))] - (~ body)))))))) + (, body)))))))) (def runtime (syntax (_ [declaration (<>.or <code>.local @@ -80,32 +80,32 @@ [runtime_id meta.seed] (macro.with_symbols [g!_] (let [runtime (code.local (///reference.artifact [..module_id runtime_id])) - runtime_name (` (_.var (~ (code.text (%.code runtime)))))] + runtime_name (` (_.var (, (code.text (%.code runtime)))))] (case declaration {.#Left name} (let [g!name (code.local name)] - (in (list (` (def .public (~ g!name) + (in (list (` (def .public (, g!name) Var - (~ runtime_name))) + (, runtime_name))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) _.Computation - (_.define_constant (~ runtime_name) (~ code))))))) + (_.define_constant (, runtime_name) (, code))))))) {.#Right [name inputs]} (let [g!name (code.local name) inputsC (list#each code.local inputs) inputs_typesC (list#each (function.constant (` _.Expression)) inputs)] - (in (list (` (def .public ((~ g!name) (~+ inputsC)) - (-> (~+ inputs_typesC) _.Computation) - (_.apply (list (~+ inputsC)) (~ runtime_name)))) + (in (list (` (def .public ((, g!name) (,* inputsC)) + (-> (,* inputs_typesC) _.Computation) + (_.apply (list (,* inputsC)) (, runtime_name)))) - (` (def (~ (code.local (format "@" name))) + (` (def (, (code.local (format "@" name))) _.Computation - (..with_vars [(~+ inputsC)] - (_.define_function (~ runtime_name) [(list (~+ inputsC)) {.#None}] - (~ code)))))))))))))) + (..with_vars [(,* inputsC)] + (_.define_function (, runtime_name) [(list (,* inputsC)) {.#None}] + (, code)))))))))))))) (def last_index (-> Expression Computation) @@ -263,7 +263,7 @@ (runtime (i64//64 input) (with_vars [temp] - (`` (<| (~~ (with_template [<scenario> <iteration> <cap> <entrance>] + (`` (<| (,, (with_template [<scenario> <iteration> <cap> <entrance>] [(_.if (|> input <scenario>) (_.let (list [temp (_.remainder/2 <iteration> input)]) (_.if (|> temp <scenario>) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux index a3872dfa5..cba888c44 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -64,7 +64,7 @@ [(for @.python (def <declaration> <type> <body>) ... TODO: No longer skip inlining Lua after Rembulan isn't being used anymore. @.lua (def <declaration> <type> <body>) - (`` (def (~~ (..declaration_name <declaration>)) + (`` (def (,, (..declaration_name <declaration>)) (template <declaration> [<body>]))))])) @@ -297,7 +297,7 @@ (with_expansions [<digits> (these "0" "1" "2" "3" "4" "5" "6" "7" "8" "9") <non_symbol_chars> (with_template [<char>] - [(~~ (static <char>))] + [(,, (static <char>))] [text.space] [text.new_line] [text.carriage_return] @@ -322,7 +322,7 @@ [[<digits> <digit_separator>] @then - (~~ (template.spliced @else_options))] + (,, (template.spliced @else_options))] ... else @else))])) @@ -372,7 +372,7 @@ <failure> (!failure ..frac_parser where offset source_code) <frac_separator> (static ..frac_separator) <signs> (with_template [<sign>] - [(~~ (static <sign>))] + [(,, (static <sign>))] [..positive_sign] [..negative_sign])] @@ -463,7 +463,7 @@ (-> Nat Text (Parser Symbol)) (<| (!with_char+ source_code//size source_code offset/0 char/0 (!end_of_file where offset/0 source_code current_module)) - (if (!n/= (char (~~ (static ..symbol_separator))) char/0) + (if (!n/= (char (,, (static ..symbol_separator))) char/0) (<| (let [offset/1 (!++ offset/0)]) (!with_char+ source_code//size source_code offset/1 char/1 (!end_of_file where offset/1 source_code current_module)) @@ -482,7 +482,7 @@ (..symbol_part_parser start where offset source_code))) (let [[where' offset' source_code'] source']) (!with_char source_code' offset' char/separator <simple>) - (if (!n/= (char (~~ (static ..symbol_separator))) char/separator) + (if (!n/= (char (,, (static ..symbol_separator))) char/separator) (<| (let [offset'' (!++ offset')]) (!letE [source'' complex] (..symbol_part_parser offset'' (!forward 1 where') offset'' source_code')) (if ("lux text =" "" complex) @@ -530,10 +530,10 @@ (<| (!with_char+ source_code//size source_code offset/0 char/0 (!end_of_file where offset/0 source_code current_module)) (with_expansions [<composites> (with_template [<open> <close> <parser>] - [[(~~ (static <open>))] + [[(,, (static <open>))] (<parser> <again> <consume_1>) - [(~~ (static <close>))] + [(,, (static <close>))] (!close <close>)] [..open_form ..close_form form_parser] @@ -541,23 +541,23 @@ [..open_tuple ..close_tuple tuple_parser] )] (`` ("lux syntax char case!" char/0 - [[(~~ (static text.space)) - (~~ (static text.carriage_return))] + [[(,, (static text.space)) + (,, (static text.carriage_return))] (again (!horizontal where offset/0 source_code)) ... New line - [(~~ (static text.new_line))] + [(,, (static text.new_line))] (again (!vertical where offset/0 source_code)) <composites> ... Text - [(~~ (static ..text_delimiter))] + [(,, (static ..text_delimiter))] (text_parser where (!++ offset/0) source_code) ... Coincidentally (= ..symbol_separator ..frac_separator) - [(~~ (static ..symbol_separator)) - ... (~~ (static ..frac_separator)) + [(,, (static ..symbol_separator)) + ... (,, (static ..frac_separator)) ] ... It's either a Rev, a symbol, or a comment. (with_expansions [<rev_parser> (rev_parser source_code//size offset/0 where (!++ offset/1) source_code) @@ -576,13 +576,13 @@ <rev_parser> ... It's either a symbol, or a comment. ("lux syntax char case!" char/1 - [[(~~ (static ..symbol_separator))] + [[(,, (static ..symbol_separator))] ... It's either a symbol, or a comment. (<| (let [offset/2 (!++ offset/1)]) (!with_char+ source_code//size source_code offset/2 char/2 (!end_of_file where offset/2 source_code current_module)) ("lux syntax char case!" char/2 - [[(~~ (static ..symbol_separator))] + [[(,, (static ..symbol_separator))] ... It's a comment. <comment_parser>] ... It's a symbol. @@ -590,17 +590,17 @@ ... It's a symbol. <short_symbol_parser>)))) - [(~~ (static ..positive_sign)) - (~~ (static ..negative_sign))] + [(,, (static ..positive_sign)) + (,, (static ..negative_sign))] (!signed_parser source_code//size offset/0 where source_code aliases (!end_of_file where offset/0 source_code current_module)) - [(~~ (static ..sigil))] + [(,, (static ..sigil))] (<| (let [offset/1 (!++ offset/0)]) (!with_char+ source_code//size source_code offset/1 char/1 (!end_of_file where offset/1 source_code current_module)) ("lux syntax char case!" char/1 - [(~~ (with_template [<char> <bit>] + [(,, (with_template [<char> <bit>] [[<char>] (..bit_syntax <bit> [where offset/0 source_code])] diff --git a/stdlib/source/library/lux/tool/compiler/reference.lux b/stdlib/source/library/lux/tool/compiler/reference.lux index 9f4b502c8..c4a64ae2e 100644 --- a/stdlib/source/library/lux/tool/compiler/reference.lux +++ b/stdlib/source/library/lux/tool/compiler/reference.lux @@ -81,7 +81,7 @@ (`` (def .public self (template (self) - [(..variable (~~ (/variable.self)))]))) + [(..variable (,, (/variable.self)))]))) (def .public format (Format Reference) diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux index ac50d96e0..943c16c23 100644 --- a/stdlib/source/library/lux/world/console.lux +++ b/stdlib/source/library/lux/world/console.lux @@ -31,7 +31,7 @@ (def .public (async console) (-> (Console IO) (Console Async)) (`` (implementation - (~~ (with_template [<capability>] + (,, (with_template [<capability>] [(def <capability> (|>> (at console <capability>) async.future))] @@ -184,7 +184,7 @@ (All (_ s) (-> (Mock s) s (Console IO))) (let [state (atom.atom init)] (`` (implementation - (~~ (with_template [<method> <mock>] + (,, (with_template [<method> <mock>] [(def (<method> _) (do [! io.monad] [|state| (atom.read! state)] diff --git a/stdlib/source/library/lux/world/db/jdbc.lux b/stdlib/source/library/lux/world/db/jdbc.lux index 1577e7104..71ffeb1db 100644 --- a/stdlib/source/library/lux/world/db/jdbc.lux +++ b/stdlib/source/library/lux/world/db/jdbc.lux @@ -107,7 +107,7 @@ (def .public (async db) (-> (DB IO) (DB Async)) (`` (implementation - (~~ (with_template [<name> <forge>] + (,, (with_template [<name> <forge>] [(def <name> (<forge> (|>> (!.use (at db <name>)) async.future)))] [execute can_execute] diff --git a/stdlib/source/library/lux/world/db/jdbc/input.lux b/stdlib/source/library/lux/world/db/jdbc/input.lux index 47cc12b51..94a0b399e 100644 --- a/stdlib/source/library/lux/world/db/jdbc/input.lux +++ b/stdlib/source/library/lux/world/db/jdbc/input.lux @@ -22,7 +22,7 @@ ) (`` (import java/sql/PreparedStatement - (~~ (with_template [<name> <type>] + (,, (with_template [<name> <type>] [(<name> [int <type>] "try" void)] [setBoolean boolean] diff --git a/stdlib/source/library/lux/world/db/jdbc/output.lux b/stdlib/source/library/lux/world/db/jdbc/output.lux index 92f52b003..809015e50 100644 --- a/stdlib/source/library/lux/world/db/jdbc/output.lux +++ b/stdlib/source/library/lux/world/db/jdbc/output.lux @@ -24,7 +24,7 @@ (import java/sql/Timestamp) (`` (import java/sql/ResultSet - (~~ (with_template [<method_name> <return_class>] + (,, (with_template [<method_name> <return_class>] [(<method_name> [int] "try" <return_class>)] [getBoolean boolean] diff --git a/stdlib/source/library/lux/world/db/sql.lux b/stdlib/source/library/lux/world/db/sql.lux index a41ccf85b..834e43081 100644 --- a/stdlib/source/library/lux/world/db/sql.lux +++ b/stdlib/source/library/lux/world/db/sql.lux @@ -261,7 +261,7 @@ (with_template [<name> <sql> <variables> <input> <output>] [(`` (def .public (<name> value query) - (All (_ (~~ (template.spliced <variables>))) + (All (_ (,, (template.spliced <variables>))) (-> Nat <input> <output>)) (abstraction (format (representation query) diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux index 2955c5343..dc055f98d 100644 --- a/stdlib/source/library/lux/world/environment.lux +++ b/stdlib/source/library/lux/world/environment.lux @@ -22,9 +22,9 @@ ["[0]" dictionary (.only Dictionary)] ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" ffi (.only import) - (.~~ (.for "JavaScript" (.~~ (.these ["[0]" node_js])) - "{old}" (.~~ (.these ["node_js" //math])) - (.~~ (.these))))] + (.,, (.for "JavaScript" (.,, (.these ["[0]" node_js])) + "{old}" (.,, (.these ["node_js" //math])) + (.,, (.these))))] ["[0]" macro (.only) ["[0]" template]] [math @@ -72,7 +72,7 @@ (`` (def .public (async environment) (-> (Environment IO) (Environment Async)) (implementation - (~~ (with_template [<method>] + (,, (with_template [<method>] [(def <method> (at environment <method>))] @@ -80,7 +80,7 @@ [directory] )) - (~~ (with_template [<method>] + (,, (with_template [<method>] [(def <method> (|>> (at environment <method>) async.future))] diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 9db2c4547..3b768f0a1 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -25,9 +25,9 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" dictionary (.only Dictionary)]]] ["[0]" ffi (.only) - (.~~ (.for "JavaScript" (.~~ (.these ["[0]" node_js])) - "{old}" (.~~ (.these ["node_js" //control/thread])) - (.~~ (.these))))] + (.,, (.for "JavaScript" (.,, (.these ["[0]" node_js])) + "{old}" (.,, (.these ["node_js" //control/thread])) + (.,, (.these))))] [macro ["[0]" template]] [math @@ -46,7 +46,7 @@ (is Text separator) - (~~ (with_template [<name> <output>] + (,, (with_template [<name> <output>] [(is (-> Path (! <output>)) <name>)] @@ -54,7 +54,7 @@ [directory? Bit] )) - (~~ (with_template [<name> <output>] + (,, (with_template [<name> <output>] [(is (-> Path (! (Try <output>))) <name>)] @@ -69,7 +69,7 @@ [delete Any] )) - (~~ (with_template [<name> <input>] + (,, (with_template [<name> <input>] [(is (-> Path <input> (! (Try Any))) <name>)] @@ -112,7 +112,7 @@ (def separator (at fs separator)) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(def <name> (|>> (at fs <name>) async.future))] @@ -130,7 +130,7 @@ [read] [delete])) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(def (<name> path input) (async.future (at fs <name> path input)))] @@ -163,7 +163,7 @@ (`` (ffi.import java/io/File "[1]::[0]" (new [java/lang/String]) - (~~ (with_template [<name>] + (,, (with_template [<name>] [(<name> [] "io" "try" boolean)] [createNewFile] [mkdir] @@ -206,7 +206,7 @@ (def separator (ffi.of_string (java/io/File::separator))) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def <name> (|>> ffi.as_string java/io/File::new @@ -222,7 +222,7 @@ java/io/File::new java/io/File::mkdir)) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> path) (do [! (try.with io.monad)] [?children (java/io/File::listFiles (java/io/File::new (ffi.as_string path)))] @@ -281,7 +281,7 @@ java/io/File::new (java/io/File::setLastModified (|> time_stamp instant.relative duration.millis ffi.as_long)))) - (~~ (with_template [<flag> <name>] + (,, (with_template [<flag> <name>] [(def (<name> path data) (do (try.with io.monad) [stream (java/io/FileOutputStream::new (java/io/File::new (ffi.as_string path)) (ffi.as_boolean <flag>)) @@ -388,7 +388,7 @@ (def separator js_separator) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> path) (do async.monad [?stats (with_async write! (Try Stats) @@ -420,7 +420,7 @@ (with_async write! (Try Any) (Fs::mkdir path (..any_callback write!) node_fs))))) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> path) (do [! (try.with async.monad)] [subs (with_async write! (Try (Array ffi.String)) @@ -494,7 +494,7 @@ (Fs::utimes path when when (..any_callback write!) node_fs)))) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> path data) (with_async write! (Try Any) (<method> path (Buffer::from data) (..any_callback write!) @@ -554,7 +554,7 @@ (def separator ..python_separator) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def <name> (|>> <method> (io#each (|>> (try.else false)))))] @@ -566,7 +566,7 @@ (def make_directory os::mkdir) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> path) (let [! (try.with io.monad)] (|> path @@ -615,7 +615,7 @@ (let [when (|> time_stamp instant.relative duration.millis (i./ +1,000))] (os::utime path (..tuple [when when])))) - (~~ (with_template [<name> <mode>] + (,, (with_template [<name> <mode>] [(def (<name> path data) (do (try.with io.monad) [file (..open path <mode>) @@ -680,7 +680,7 @@ (def separator ..ruby_separator) - (~~ (with_template [<name> <test>] + (,, (with_template [<name> <test>] [(def <name> (|>> <test> (io#each (|>> (try.else false)))))] @@ -692,7 +692,7 @@ (def make_directory FileUtils::mkdir) - (~~ (with_template [<name> <test>] + (,, (with_template [<name> <test>] [(def (<name> path) (do [! (try.with io.monad)] [self (Dir::open path) @@ -719,11 +719,11 @@ [sub_directories RubyFile::directory?] )) - (~~ (with_template [<name> <pipeline>] + (,, (with_template [<name> <pipeline>] [(def <name> (let [! (try.with io.monad)] (|>> RubyFile::stat - (at ! each (`` (|>> (~~ (template.spliced <pipeline>))))))))] + (at ! each (`` (|>> (,, (template.spliced <pipeline>))))))))] [file_size [Stat::size .nat]] [last_modified [Stat::mtime @@ -758,7 +758,7 @@ Time::at)] (RubyFile::utime moment moment path))) - (~~ (with_template [<mode> <name>] + (,, (with_template [<mode> <name>] [(def (<name> path data) (do [! (try.with io.monad)] [file (RubyFile::open path <mode>) @@ -821,7 +821,7 @@ ... (`` (def (file path) ... (-> Path (File IO)) ... (implementation - ... (~~ (with_template [<name> <mode>] + ... (,, (with_template [<name> <mode>] ... [(def (<name> data) ... (do [! (try.with io.monad)] ... [outcome (..file_put_contents [path ("php pack" ..byte_array_format data) <mode>])] @@ -843,13 +843,13 @@ ... (def path ... path) - ... (~~ (with_template [<name> <ffi> <pipeline>] + ... (,, (with_template [<name> <ffi> <pipeline>] ... [(def (<name> _) ... (do [! (try.with io.monad)] ... [value (<ffi> [path])] ... (if (bit#= false (as Bit value)) ... (at io.monad in (exception.except ..cannot_find_file [path])) - ... (in (`` (|> value (~~ (template.spliced <pipeline>))))))))] + ... (in (`` (|> value (,, (template.spliced <pipeline>))))))))] ... [size ..filesize [.nat]] ... [last_modified ..filemtime [(i.* +1,000) duration.of_millis instant.absolute]] @@ -886,7 +886,7 @@ ... (def scope ... path) - ... (~~ (with_template [<name> <test> <constructor> <capability>] + ... (,, (with_template [<name> <test> <constructor> <capability>] ... [(def (<name> _) ... (do [! (try.with io.monad)] ... [children (..scandir [path])] @@ -923,7 +923,7 @@ ... (`` (def .public default ... (System IO) ... (implementation - ... (~~ (with_template [<name> <test> <constructor> <exception>] + ... (,, (with_template [<name> <test> <constructor> <exception>] ... [(def (<name> path) ... (do [! (try.with io.monad)] ... [verdict (<test> path)] @@ -1153,7 +1153,7 @@ (def separator separator) - (~~ (with_template [<method> <retrieve>] + (,, (with_template [<method> <retrieve>] [(def (<method> path) (|> store stm.read @@ -1179,7 +1179,7 @@ {try.#Failure error} (in {try.#Failure error}))))) - (~~ (with_template [<method> <tag>] + (,, (with_template [<method> <tag>] [(def (<method> path) (stm.commit! (do stm.monad diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux index f9d7a6fd6..c218f3bf5 100644 --- a/stdlib/source/library/lux/world/shell.lux +++ b/stdlib/source/library/lux/world/shell.lux @@ -61,7 +61,7 @@ (def (async_process process) (-> (Process IO) (Process Async)) (`` (implementation - (~~ (with_template [<method>] + (,, (with_template [<method>] [(def <method> (|>> (at process <method>) async.future))] @@ -245,7 +245,7 @@ java/io/BufferedReader::new)]] (in (is (Process IO) (`` (implementation - (~~ (with_template [<name> <stream>] + (,, (with_template [<name> <stream>] [(def (<name> _) (do ! [output (java/io/BufferedReader::readLine <stream>)] @@ -261,7 +261,7 @@ )) (def (write message) (java/io/OutputStream::write (at utf8.codec encoded message) jvm_output)) - (~~ (with_template [<name> <method>] + (,, (with_template [<name> <method>] [(def (<name> _) (|> process <method>))] @@ -327,7 +327,7 @@ (`` (def (mock_process state mock) (All (_ s) (-> (Atom s) (Mock s) (Process IO))) (implementation - (~~ (with_template [<name> <mock>] + (,, (with_template [<name> <mock>] [(def (<name> _) (do [! io.monad] [|state| (atom.read! state)] diff --git a/stdlib/source/parser/lux/data/binary.lux b/stdlib/source/parser/lux/data/binary.lux index 00c3d3656..5cb5e0e93 100644 --- a/stdlib/source/parser/lux/data/binary.lux +++ b/stdlib/source/parser/lux/data/binary.lux @@ -140,7 +140,7 @@ (with_expansions [<case>+' (template.spliced <case>+)] (case flag (^.with_template [<number> <tag> <parser>] - [<number> (`` (at ! each (|>> {(~~ (template.spliced <tag>))}) <parser>))]) + [<number> (`` (at ! each (|>> {(,, (template.spliced <tag>))}) <parser>))]) (<case>+') _ (//.lifted (exception.except ..invalid_tag [(template.amount [<case>+]) flag])))))])) diff --git a/stdlib/source/parser/lux/meta/type.lux b/stdlib/source/parser/lux/meta/type.lux index 46f89fec7..f1acda29d 100644 --- a/stdlib/source/parser/lux/meta/type.lux +++ b/stdlib/source/parser/lux/meta/type.lux @@ -201,7 +201,7 @@ (let [partialI (|> current_arg (n.* 2) (n.+ funcI)) partial_varI (++ partialI) partial_varL (label partial_varI) - partialC (` ((~ funcL) (~+ (|> (list.indices num_args) + partialC (` ((, funcL) (,* (|> (list.indices num_args) (list#each (|>> (n.* 2) ++ (n.+ funcI) label)) list.reversed))))] (again (++ current_arg) @@ -349,4 +349,4 @@ (|> allT (monad.each ! (function.constant ..parameter)) (local allT)))] - (in (` ((~+ allC)))))) + (in (` ((,* allC)))))) diff --git a/stdlib/source/polytypic/lux/abstract/equivalence.lux b/stdlib/source/polytypic/lux/abstract/equivalence.lux index 0c83b9ab5..bc044fe6b 100644 --- a/stdlib/source/polytypic/lux/abstract/equivalence.lux +++ b/stdlib/source/polytypic/lux/abstract/equivalence.lux @@ -48,50 +48,50 @@ inputT <type>.next .let [@Equivalence (is (-> Type Code) (function (_ type) - (` ((~! /.Equivalence) (~ (poly.code *env* type))))))]] + (` ((,! /.Equivalence) (, (poly.code *env* type))))))]] (all <>.either ... Basic types - (~~ (with_template [<matcher> <eq>] + (,, (with_template [<matcher> <eq>] [(do ! [_ <matcher>] - (in (` (is (~ (@Equivalence inputT)) + (in (` (is (, (@Equivalence inputT)) <eq>))))] - [(<type>.exactly Any) (function ((~ g!_) (~ g!_) (~ g!_)) #1)] - [(<type>.sub Bit) (~! bit.equivalence)] - [(<type>.sub Nat) (~! nat.equivalence)] - [(<type>.sub Int) (~! int.equivalence)] - [(<type>.sub Rev) (~! rev.equivalence)] - [(<type>.sub Frac) (~! frac.equivalence)] - [(<type>.sub Text) (~! text.equivalence)])) + [(<type>.exactly Any) (function ((, g!_) (, g!_) (, g!_)) #1)] + [(<type>.sub Bit) (,! bit.equivalence)] + [(<type>.sub Nat) (,! nat.equivalence)] + [(<type>.sub Int) (,! int.equivalence)] + [(<type>.sub Rev) (,! rev.equivalence)] + [(<type>.sub Frac) (,! frac.equivalence)] + [(<type>.sub Text) (,! text.equivalence)])) ... Composite types - (~~ (with_template [<name> <eq>] + (,, (with_template [<name> <eq>] [(do ! [[_ argC] (<type>.applied (<>.and (<type>.exactly <name>) equivalence))] - (in (` (is (~ (@Equivalence inputT)) - (<eq> (~ argC))))))] + (in (` (is (, (@Equivalence inputT)) + (<eq> (, argC))))))] - [.Maybe (~! maybe.equivalence)] - [.List (~! list.equivalence)] - [sequence.Sequence (~! sequence.equivalence)] - [array.Array (~! array.equivalence)] - [queue.Queue (~! queue.equivalence)] - [set.Set (~! set.equivalence)] - [tree.Tree (~! tree.equivalence)] + [.Maybe (,! maybe.equivalence)] + [.List (,! list.equivalence)] + [sequence.Sequence (,! sequence.equivalence)] + [array.Array (,! array.equivalence)] + [queue.Queue (,! queue.equivalence)] + [set.Set (,! set.equivalence)] + [tree.Tree (,! tree.equivalence)] )) (do ! [[_ _ valC] (<type>.applied (all <>.and (<type>.exactly dictionary.Dictionary) <type>.any equivalence))] - (in (` (is (~ (@Equivalence inputT)) - ((~! dictionary.equivalence) (~ valC)))))) + (in (` (is (, (@Equivalence inputT)) + ((,! dictionary.equivalence) (, valC)))))) ... Models - (~~ (with_template [<type> <eq>] + (,, (with_template [<type> <eq>] [(do ! [_ (<type>.exactly <type>)] - (in (` (is (~ (@Equivalence inputT)) + (in (` (is (, (@Equivalence inputT)) <eq>))))] [duration.Duration duration.equivalence] @@ -103,7 +103,7 @@ (do ! [_ (<type>.applied (<>.and (<type>.exactly unit.Measure) <type>.any))] - (in (` (is (~ (@Equivalence inputT)) + (in (` (is (, (@Equivalence inputT)) unit.equivalence)))) ... Variants (do ! @@ -112,19 +112,19 @@ g!_ (code.local "_____________") g!left (code.local "_____________left") g!right (code.local "_____________right")]] - (in (` (is (~ (@Equivalence inputT)) - (function ((~ g!_) (~ g!left) (~ g!right)) - (case [(~ g!left) (~ g!right)] - (~+ (list#conjoint (list#each (function (_ [tag g!eq]) + (in (` (is (, (@Equivalence inputT)) + (function ((, g!_) (, g!left) (, g!right)) + (case [(, g!left) (, g!right)] + (,* (list#conjoint (list#each (function (_ [tag g!eq]) (if (nat.= last tag) - (list (` [{(~ (code.nat (-- tag))) #1 (~ g!left)} - {(~ (code.nat (-- tag))) #1 (~ g!right)}]) - (` ((~ g!eq) (~ g!left) (~ g!right)))) - (list (` [{(~ (code.nat tag)) #0 (~ g!left)} - {(~ (code.nat tag)) #0 (~ g!right)}]) - (` ((~ g!eq) (~ g!left) (~ g!right)))))) + (list (` [{(, (code.nat (-- tag))) #1 (, g!left)} + {(, (code.nat (-- tag))) #1 (, g!right)}]) + (` ((, g!eq) (, g!left) (, g!right)))) + (list (` [{(, (code.nat tag)) #0 (, g!left)} + {(, (code.nat tag)) #0 (, g!right)}]) + (` ((, g!eq) (, g!left) (, g!right)))))) (list.enumeration members)))) - (~ g!_) + (, g!_) #0)))))) ... Tuples (do ! @@ -133,33 +133,33 @@ indices (list.indices (list.size g!eqs)) g!lefts (list#each (|>> nat#encoded (text#composite "left") code.local) indices) g!rights (list#each (|>> nat#encoded (text#composite "right") code.local) indices)]] - (in (` (is (~ (@Equivalence inputT)) - (function ((~ g!_) [(~+ g!lefts)] [(~+ g!rights)]) - (and (~+ (|> (list.zipped_3 g!eqs g!lefts g!rights) + (in (` (is (, (@Equivalence inputT)) + (function ((, g!_) [(,* g!lefts)] [(,* g!rights)]) + (and (,* (|> (list.zipped_3 g!eqs g!lefts g!rights) (list#each (function (_ [g!eq g!left g!right]) - (` ((~ g!eq) (~ g!left) (~ g!right))))))))))))) + (` ((, g!eq) (, g!left) (, g!right))))))))))))) ... Type recursion (do ! [[g!self bodyC] (<type>.recursive equivalence) .let [g!_ (code.local "_____________")]] - (in (` (is (~ (@Equivalence inputT)) - ((~! /.rec) (.function ((~ g!_) (~ g!self)) - (~ bodyC))))))) + (in (` (is (, (@Equivalence inputT)) + ((,! /.rec) (.function ((, g!_) (, g!self)) + (, bodyC))))))) <type>.recursive_self ... Type applications (do ! [[funcC argsC] (<type>.applied (<>.and equivalence (<>.many equivalence)))] - (in (` ((~ funcC) (~+ argsC))))) + (in (` ((, funcC) (,* argsC))))) ... Parameters <type>.parameter ... Polymorphism (do ! [[funcC varsC bodyC] (<type>.polymorphic equivalence)] - (in (` (is (All ((~ g!_) (~+ varsC)) - (-> (~+ (list#each (|>> (~) ((~! /.Equivalence)) (`)) varsC)) - ((~! /.Equivalence) ((~ (poly.code *env* inputT)) (~+ varsC))))) - (function ((~ funcC) (~+ varsC)) - (~ bodyC)))))) + (in (` (is (All ((, g!_) (,* varsC)) + (-> (,* (list#each (|>> (,) ((,! /.Equivalence)) (`)) varsC)) + ((,! /.Equivalence) ((, (poly.code *env* inputT)) (,* varsC))))) + (function ((, funcC) (,* varsC)) + (, bodyC)))))) <type>.recursive_call ... If all else fails... (|> <type>.any diff --git a/stdlib/source/polytypic/lux/abstract/functor.lux b/stdlib/source/polytypic/lux/abstract/functor.lux index db17e49ac..43b8b2902 100644 --- a/stdlib/source/polytypic/lux/abstract/functor.lux +++ b/stdlib/source/polytypic/lux/abstract/functor.lux @@ -37,10 +37,10 @@ .let [@Functor (is (-> Type Code) (function (_ unwrappedT) (if (n.= 1 num_vars) - (` ((~! /.Functor) (~ (poly.code *env* unwrappedT)))) + (` ((,! /.Functor) (, (poly.code *env* unwrappedT)))) (let [paramsC (|> num_vars -- list.indices (list#each (|>> %.nat code.local)))] - (` (All ((~ g!_) (~+ paramsC)) - ((~! /.Functor) ((~ (poly.code *env* unwrappedT)) (~+ paramsC))))))))) + (` (All ((, g!_) (,* paramsC)) + ((,! /.Functor) ((, (poly.code *env* unwrappedT)) (,* paramsC))))))))) Arg<?> (is (-> Code (<type>.Parser Code)) (function (Arg<?> valueC) (all <>.either @@ -48,19 +48,19 @@ (do <>.monad [.let [varI (|> num_vars (n.* 2) --)] _ (<type>.this_parameter varI)] - (in (` ((~ funcC) (~ valueC))))) + (in (` ((, funcC) (, valueC))))) ... Variants (do ! [_ (in []) membersC (<type>.variant (<>.many (Arg<?> valueC))) .let [last (-- (list.size membersC))]] - (in (` (case (~ valueC) - (~+ (list#conjoint (list#each (function (_ [tag memberC]) + (in (` (case (, valueC) + (,* (list#conjoint (list#each (function (_ [tag memberC]) (if (n.= last tag) - (list (` {(~ (code.nat (-- tag))) #1 (~ valueC)}) - (` {(~ (code.nat (-- tag))) #1 (~ memberC)})) - (list (` {(~ (code.nat tag)) #0 (~ valueC)}) - (` {(~ (code.nat tag)) #0 (~ memberC)})))) + (list (` {(, (code.nat (-- tag))) #1 (, valueC)}) + (` {(, (code.nat (-- tag))) #1 (, memberC)})) + (list (` {(, (code.nat tag)) #0 (, valueC)}) + (` {(, (code.nat tag)) #0 (, memberC)})))) (list.enumeration membersC)))))))) ... Tuples (do <>.monad @@ -75,9 +75,9 @@ (again (++ idx) (list#composite pairsCC (list [slotC memberC]))))) (in pairsCC)))))] - (in (` (case (~ valueC) - [(~+ (list#each product.left pairsCC))] - [(~+ (list#each product.right pairsCC))])))) + (in (` (case (, valueC) + [(,* (list#each product.left pairsCC))] + [(,* (list#each product.right pairsCC))])))) ... Functions (do ! [_ (in []) @@ -88,13 +88,13 @@ .let [inC+ (|> (list.size inT+) list.indices (list#each (|>> %.nat (format "____________inC") code.local)))]] - (in (` (function ((~ g!) (~+ inC+)) - (let [(~ outL) ((~ valueC) (~+ inC+))] - (~ outC)))))) + (in (` (function ((, g!) (,* inC+)) + (let [(, outL) ((, valueC) (,* inC+))] + (, outC)))))) ... Recursion (do <>.monad [_ <type>.recursive_call] - (in (` ((~' each) (~ funcC) (~ valueC))))) + (in (` ((,' each) (, funcC) (, valueC))))) ... Parameters (do <>.monad [_ <type>.any] @@ -104,7 +104,7 @@ (<>.either (<type>.polymorphic (Arg<?> inputC)) (<>.failure (format "Cannot create Functor for: " (%.type inputT)))))] - (in (` (is (~ (@Functor inputT)) + (in (` (is (, (@Functor inputT)) (implementation - (def ((~' each) (~ funcC) (~ inputC)) - (~ outputC))))))))) + (def ((,' each) (, funcC) (, inputC)) + (, outputC))))))))) diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux index a8eee64d0..5f79d7fe4 100644 --- a/stdlib/source/polytypic/lux/data/format/json.lux +++ b/stdlib/source/polytypic/lux/data/format/json.lux @@ -105,20 +105,20 @@ [(do ! [.let [g!_ (code.local "_______")] _ <matcher>] - (in (` (is (~ (@JSON#encoded inputT)) + (in (` (is (, (@JSON#encoded inputT)) <encoder>))))] - [(<type>.exactly Any) (function ((~ g!_) (~ (code.symbol ["" "0"]))) {/.#Null})] + [(<type>.exactly Any) (function ((, g!_) (, (code.symbol ["" "0"]))) {/.#Null})] [(<type>.sub Bit) (|>> {/.#Boolean})] - [(<type>.sub Nat) (at (~! ..nat_codec) (~' encoded))] - [(<type>.sub Int) (at (~! ..int_codec) (~' encoded))] + [(<type>.sub Nat) (at (,! ..nat_codec) (,' encoded))] + [(<type>.sub Int) (at (,! ..int_codec) (,' encoded))] [(<type>.sub Frac) (|>> {/.#Number})] [(<type>.sub Text) (|>> {/.#String})]) <time> (with_template [<type> <codec>] [(do ! [_ (<type>.exactly <type>)] - (in (` (is (~ (@JSON#encoded inputT)) - (|>> (at (~! <codec>) (~' encoded)) {/.#String})))))] + (in (` (is (, (@JSON#encoded inputT)) + (|>> (at (,! <codec>) (,' encoded)) {/.#String})))))] ... [duration.Duration duration.codec] ... [instant.Instant instant.codec] @@ -130,7 +130,7 @@ .let [g!_ (code.local "_______") @JSON#encoded (is (-> Type Code) (function (_ type) - (` (-> (~ (poly.code *env* type)) /.JSON))))] + (` (-> (, (poly.code *env* type)) /.JSON))))] inputT <type>.next] (all <>.either <basic> @@ -138,8 +138,8 @@ (do ! [unitT (<type>.applied (<>.after (<type>.exactly unit.Measure) <type>.any))] - (in (` (is (~ (@JSON#encoded inputT)) - (at (~! measure_codec) (~' encoded)))))) + (in (` (is (, (@JSON#encoded inputT)) + (at (,! measure_codec) (,' encoded)))))) (do ! [.let [g!_ (code.local "_______") g!key (code.local "_______key") @@ -148,42 +148,42 @@ (<type>.exactly dictionary.Dictionary) (<type>.exactly .Text) encoded))] - (in (` (is (~ (@JSON#encoded inputT)) - (|>> ((~! dictionary.entries)) - ((~! list#each) (function ((~ g!_) [(~ g!key) (~ g!val)]) - [(~ g!key) ((~ =val=) (~ g!val))])) - ((~! dictionary.of_list) (~! text.hash)) + (in (` (is (, (@JSON#encoded inputT)) + (|>> ((,! dictionary.entries)) + ((,! list#each) (function ((, g!_) [(, g!key) (, g!val)]) + [(, g!key) ((, =val=) (, g!val))])) + ((,! dictionary.of_list) (,! text.hash)) {/.#Object}))))) (do ! [[_ =sub=] (<type>.applied (all <>.and (<type>.exactly .Maybe) encoded))] - (in (` (is (~ (@JSON#encoded inputT)) - ((~! ..nullable) (~ =sub=)))))) + (in (` (is (, (@JSON#encoded inputT)) + ((,! ..nullable) (, =sub=)))))) (do ! [[_ =sub=] (<type>.applied (all <>.and (<type>.exactly .List) encoded))] - (in (` (is (~ (@JSON#encoded inputT)) - (|>> ((~! list#each) (~ =sub=)) ((~! sequence.of_list)) {/.#Array}))))) + (in (` (is (, (@JSON#encoded inputT)) + (|>> ((,! list#each) (, =sub=)) ((,! sequence.of_list)) {/.#Array}))))) (do ! [.let [g!_ (code.local "_______") g!input (code.local "_______input")] members (<type>.variant (<>.many encoded)) .let [last (-- (list.size members))]] - (in (` (is (~ (@JSON#encoded inputT)) - (function ((~ g!_) (~ g!input)) - (case (~ g!input) - (~+ (list#conjoint (list#each (function (_ [tag g!encoded]) + (in (` (is (, (@JSON#encoded inputT)) + (function ((, g!_) (, g!input)) + (case (, g!input) + (,* (list#conjoint (list#each (function (_ [tag g!encoded]) (if (n.= last tag) - (.list (` {(~ (code.nat (-- tag))) #1 (~ g!input)}) - (` ((~! /.json) [(~ (code.frac (..tag (-- tag)))) + (.list (` {(, (code.nat (-- tag))) #1 (, g!input)}) + (` ((,! /.json) [(, (code.frac (..tag (-- tag)))) #1 - ((~ g!encoded) (~ g!input))]))) - (.list (` {(~ (code.nat tag)) #0 (~ g!input)}) - (` ((~! /.json) [(~ (code.frac (..tag tag))) + ((, g!encoded) (, g!input))]))) + (.list (` {(, (code.nat tag)) #0 (, g!input)}) + (` ((,! /.json) [(, (code.frac (..tag tag))) #0 - ((~ g!encoded) (~ g!input))]))))) + ((, g!encoded) (, g!input))]))))) (list.enumeration members)))))))))) (do ! [g!encoders (<type>.tuple (<>.many encoded)) @@ -191,33 +191,33 @@ g!members (|> (list.size g!encoders) list.indices (list#each (|>> n#encoded code.local)))]] - (in (` (is (~ (@JSON#encoded inputT)) - (function ((~ g!_) [(~+ g!members)]) - ((~! /.json) [(~+ (list#each (function (_ [g!member g!encoded]) - (` ((~ g!encoded) (~ g!member)))) + (in (` (is (, (@JSON#encoded inputT)) + (function ((, g!_) [(,* g!members)]) + ((,! /.json) [(,* (list#each (function (_ [g!member g!encoded]) + (` ((, g!encoded) (, g!member)))) (list.zipped_2 g!members g!encoders)))])))))) ... Type recursion (do ! [[selfC non_recC] (<type>.recursive encoded) .let [g! (code.local "____________")]] - (in (` (is (~ (@JSON#encoded inputT)) - ((~! ..rec_encoded) (.function ((~ g!) (~ selfC)) - (~ non_recC))))))) + (in (` (is (, (@JSON#encoded inputT)) + ((,! ..rec_encoded) (.function ((, g!) (, selfC)) + (, non_recC))))))) <type>.recursive_self ... Type applications (do ! [partsC (<type>.applied (<>.many encoded))] - (in (` ((~+ partsC))))) + (in (` ((,* partsC))))) ... Polymorphism (do ! [[funcC varsC bodyC] (<type>.polymorphic encoded)] - (in (` (is (All ((~ g!_) (~+ varsC)) - (-> (~+ (list#each (function (_ varC) (` (-> (~ varC) /.JSON))) + (in (` (is (All ((, g!_) (,* varsC)) + (-> (,* (list#each (function (_ varC) (` (-> (, varC) /.JSON))) varsC)) - (-> ((~ (poly.code *env* inputT)) (~+ varsC)) + (-> ((, (poly.code *env* inputT)) (,* varsC)) /.JSON))) - (function ((~ funcC) (~+ varsC)) - (~ bodyC)))))) + (function ((, funcC) (,* varsC)) + (, bodyC)))))) <type>.parameter <type>.recursive_call ... If all else fails... @@ -230,8 +230,8 @@ [<basic> (with_template [<matcher> <decoder>] [(do ! [_ <matcher>] - (in (` (is (~ (@JSON#decoded inputT)) - (~! <decoder>)))))] + (in (` (is (, (@JSON#decoded inputT)) + (,! <decoder>)))))] [(<type>.exactly Any) </>.null] [(<type>.sub Bit) </>.boolean] @@ -242,8 +242,8 @@ <time> (with_template [<type> <codec>] [(do ! [_ (<type>.exactly <type>)] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! <>.codec) (~! <codec>) (~! </>.string))))))] + (in (` (is (, (@JSON#decoded inputT)) + ((,! <>.codec) (,! <codec>) (,! </>.string))))))] ... [duration.Duration duration.codec] ... [instant.Instant instant.codec] @@ -255,7 +255,7 @@ .let [g!_ (code.local "_______") @JSON#decoded (is (-> Type Code) (function (_ type) - (` (</>.Parser (~ (poly.code *env* type))))))] + (` (</>.Parser (, (poly.code *env* type))))))] inputT <type>.next] (all <>.either <basic> @@ -263,65 +263,65 @@ (do ! [unitT (<type>.applied (<>.after (<type>.exactly unit.Measure) <type>.any))] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! <>.codec) (~! measure_codec) (~! </>.any)))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! <>.codec) (,! measure_codec) (,! </>.any)))))) (do ! [[_ _ valC] (<type>.applied (all <>.and (<type>.exactly dictionary.Dictionary) (<type>.exactly .Text) decoded))] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! </>.dictionary) (~ valC)))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! </>.dictionary) (, valC)))))) (do ! [[_ subC] (<type>.applied (<>.and (<type>.exactly .Maybe) decoded))] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! </>.nullable) (~ subC)))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! </>.nullable) (, subC)))))) (do ! [[_ subC] (<type>.applied (<>.and (<type>.exactly .List) decoded))] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! </>.array) ((~! <>.some) (~ subC))))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! </>.array) ((,! <>.some) (, subC))))))) (do ! [members (<type>.variant (<>.many decoded)) .let [last (-- (list.size members))]] - (in (` (is (~ (@JSON#decoded inputT)) - (all ((~! <>.or)) - (~+ (list#each (function (_ [tag memberC]) + (in (` (is (, (@JSON#decoded inputT)) + (all ((,! <>.or)) + (,* (list#each (function (_ [tag memberC]) (if (n.= last tag) - (` (|> (~ memberC) - ((~! <>.after) ((~! </>.this_boolean) (~ (code.bit #1)))) - ((~! <>.after) ((~! </>.this_number) (~ (code.frac (..tag (-- tag)))))) - ((~! </>.array)))) - (` (|> (~ memberC) - ((~! <>.after) ((~! </>.this_boolean) (~ (code.bit #0)))) - ((~! <>.after) ((~! </>.this_number) (~ (code.frac (..tag tag))))) - ((~! </>.array)))))) + (` (|> (, memberC) + ((,! <>.after) ((,! </>.this_boolean) (, (code.bit #1)))) + ((,! <>.after) ((,! </>.this_number) (, (code.frac (..tag (-- tag)))))) + ((,! </>.array)))) + (` (|> (, memberC) + ((,! <>.after) ((,! </>.this_boolean) (, (code.bit #0)))) + ((,! <>.after) ((,! </>.this_number) (, (code.frac (..tag tag))))) + ((,! </>.array)))))) (list.enumeration members)))))))) (do ! [g!decoders (<type>.tuple (<>.many decoded))] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! </>.array) (all ((~! <>.and)) (~+ g!decoders))))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! </>.array) (all ((,! <>.and)) (,* g!decoders))))))) ... Type recursion (do ! [[selfC bodyC] (<type>.recursive decoded) .let [g! (code.local "____________")]] - (in (` (is (~ (@JSON#decoded inputT)) - ((~! <>.rec) (.function ((~ g!) (~ selfC)) - (~ bodyC))))))) + (in (` (is (, (@JSON#decoded inputT)) + ((,! <>.rec) (.function ((, g!) (, selfC)) + (, bodyC))))))) <type>.recursive_self ... Type applications (do ! [[funcC argsC] (<type>.applied (<>.and decoded (<>.many decoded)))] - (in (` ((~ funcC) (~+ argsC))))) + (in (` ((, funcC) (,* argsC))))) ... Polymorphism (do ! [[funcC varsC bodyC] (<type>.polymorphic decoded)] - (in (` (is (All ((~ g!_) (~+ varsC)) - (-> (~+ (list#each (|>> (~) </>.Parser (`)) varsC)) - (</>.Parser ((~ (poly.code *env* inputT)) (~+ varsC))))) - (function ((~ funcC) (~+ varsC)) - (~ bodyC)))))) + (in (` (is (All ((, g!_) (,* varsC)) + (-> (,* (list#each (|>> (,) </>.Parser (`)) varsC)) + (</>.Parser ((, (poly.code *env* inputT)) (,* varsC))))) + (function ((, funcC) (,* varsC)) + (, bodyC)))))) <type>.parameter <type>.recursive_call ... If all else fails... @@ -330,10 +330,10 @@ (def .public codec (syntax (_ [inputT <code>.any]) - (in (.list (` (is (codec.Codec /.JSON (~ inputT)) + (in (.list (` (is (codec.Codec /.JSON (, inputT)) (implementation - (def (~' encoded) - ((~! ..encoded) (~ inputT))) - (def (~' decoded) - ((~! </>.result) ((~! ..decoded) (~ inputT)))) + (def (,' encoded) + ((,! ..encoded) (, inputT))) + (def (,' decoded) + ((,! </>.result) ((,! ..decoded) (, inputT)))) ))))))) diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index 72473bbe9..044ca9e4d 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -133,7 +133,7 @@ (`` (def write_only (Console IO) (implementation - (~~ (with_template [<name>] + (,, (with_template [<name>] [(def (<name> _) (io.io (exception.except ..invalid_operation [])))] diff --git a/stdlib/source/program/aedifex/format.lux b/stdlib/source/program/aedifex/format.lux index 7be3a1752..5ba5ab385 100644 --- a/stdlib/source/program/aedifex/format.lux +++ b/stdlib/source/program/aedifex/format.lux @@ -28,9 +28,9 @@ (def (license [name url type]) (Format /.License) - (`' [#name (~ (code.text name)) - #url (~ (code.text url)) - #type (~ (case type + (`' [#name (, (code.text name)) + #url (, (code.text url)) + #type (, (case type {/.#Repo} (' "repo") @@ -39,20 +39,20 @@ (def (organization [name url]) (Format /.Organization) - (`' [#name (~ (code.text name)) - #url (~ (code.text url))])) + (`' [#name (, (code.text name)) + #url (, (code.text url))])) (def (developer [name url organization]) (Format /.Developer) (case organization {.#None} - (`' [#name (~ (code.text name)) - #url (~ (code.text url))]) + (`' [#name (, (code.text name)) + #url (, (code.text url))]) {.#Some value} - (`' [#name (~ (code.text name)) - #url (~ (code.text url)) - #organization (~ (..organization value))]))) + (`' [#name (, (code.text name)) + #url (, (code.text url)) + #organization (, (..organization value))]))) (def contributor (Format /.Contributor) @@ -91,7 +91,7 @@ aggregate value - (dictionary.has field (` [(~+ (list#each format value))]) aggregate))) + (dictionary.has field (` [(,* (list#each format value))]) aggregate))) (def (on_set field value format aggregate) (All (_ a) @@ -133,28 +133,28 @@ (def (artifact value) (Format Artifact) - (` [(~+ (..artifact' value))])) + (` [(,* (..artifact' value))])) (def (dependency [artifact type]) (Format Dependency) (if (text#= //artifact/type.lux_library type) - (` [(~+ (..artifact' artifact))]) - (` [(~+ (..artifact' artifact)) - (~ (code.text type))]))) + (` [(,* (..artifact' artifact))]) + (` [(,* (..artifact' artifact)) + (, (code.text type))]))) (def (runtime [environment program parameters]) (Format Runtime) - (` [(~+ (list#each (function (_ [var value]) - (` [(~ (code.text var)) - (~ (code.text value))])) + (` [(,* (list#each (function (_ [var value]) + (` [(, (code.text var)) + (, (code.text value))])) (dictionary.entries environment))) - (~ (code.text program)) - (~+ (list#each code.text parameters))])) + (, (code.text program)) + (,* (list#each code.text parameters))])) (def (compiler [definition parameters]) (Format Compiler) - (` [(~ (code.symbol definition)) - (~+ (list#each code.text parameters))])) + (` [(, (code.symbol definition)) + (,* (list#each code.text parameters))])) (def .public lux_compiler_label "lux") @@ -174,7 +174,7 @@ (..on_maybe "program" (the /.#program value) code.text) (..on_maybe "test" (the /.#test value) code.text) (..on_dictionary "deploy_repositories" (the /.#deploy_repositories value) code.text code.text) - (~~ (with_template [<tag>] + (,, (with_template [<tag>] [(dictionary.has (template.text [<tag>]) (..runtime (the <tag> value)))] [/.#java] diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux index 6b0a9dbc9..981ca9b12 100644 --- a/stdlib/source/program/aedifex/runtime.lux +++ b/stdlib/source/program/aedifex/runtime.lux @@ -32,9 +32,9 @@ (with_template [<name> <command> <environment> <parameters>] [(def .public <name> Runtime - [#environment (dictionary.of_list text.hash (`` (list (~~ (template.spliced <environment>))))) + [#environment (dictionary.of_list text.hash (`` (list (,, (template.spliced <environment>))))) #program <command> - #parameters (`` (list (~~ (template.spliced <parameters>))))])] + #parameters (`` (list (,, (template.spliced <parameters>))))])] [default_java "java" [] ["-Xss16m" "--add-opens" "java.base/java.lang=ALL-UNNAMED" "-jar"]] [default_js "node" [] ["--stack_size=8192"]] diff --git a/stdlib/source/specification/compositor/analysis/type.lux b/stdlib/source/specification/compositor/analysis/type.lux index abeed68de..edf3cc14b 100644 --- a/stdlib/source/specification/compositor/analysis/type.lux +++ b/stdlib/source/specification/compositor/analysis/type.lux @@ -24,7 +24,7 @@ (-> Expander State+ Text (List Code) Type Bit) (|> (analysis/scope.with_scope "" (analysis/type.with_type output_type - (analysis.phase expander (` ((~ (code.text extension)) (~+ params)))))) + (analysis.phase expander (` ((, (code.text extension)) (,* params)))))) (phase.result state) (pipe.case {try.#Success _} @@ -36,7 +36,7 @@ (def check (Random [Code Type Code]) (`` (all r.either - (~~ (with_template [<random> <type> <code>] + (,, (with_template [<random> <type> <code>] [(do r.monad [value <random>] (in [(` <type>) diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 86c09da51..8d902977c 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -55,7 +55,7 @@ [value r.i64] (in [(synthesis.i64 value) synthesis.path/pop])) - (~~ (with_template [<gen> <synth> <path>] + (,, (with_template [<gen> <synth> <path>] [(do r.monad [value <gen>] (in [(<synth> value) diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index ec8adb582..8c3545262 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -82,7 +82,7 @@ [param (|> r.i64 (r.only (|>> ("lux i64 =" 0) not))) subject r.i64] (`` (all _.and - (~~ (with_template [<extension> <type> <prepare> <comp> <subject_expr>] + (,, (with_template [<extension> <type> <prepare> <comp> <subject_expr>] [(_.property <extension> (|> {synthesis.#Extension <extension> (list (synthesis.i64 subject))} (run (..safe <extension>)) @@ -100,7 +100,7 @@ (n.% (i64.left_shifted 8 1)) (as Int))] )) - (~~ (with_template [<extension> <reference> <outputT> <comp>] + (,, (with_template [<extension> <reference> <outputT> <comp>] [(_.property <extension> (|> {synthesis.#Extension <extension> (list (synthesis.i64 param) (synthesis.i64 subject))} @@ -132,7 +132,7 @@ [param (|> ..simple_frac (r.only (|>> (f.= +0.0) not))) subject ..simple_frac] (`` (all _.and - (~~ (with_template [<extension> <reference> <comp>] + (,, (with_template [<extension> <reference> <comp>] [(_.property <extension> (|> {synthesis.#Extension <extension> (list (synthesis.f64 param) (synthesis.f64 subject))} @@ -145,7 +145,7 @@ ["lux f64 /" f./ f.=] ["lux f64 %" f.% f.=] )) - (~~ (with_template [<extension> <text>] + (,, (with_template [<extension> <text>] [(_.property <extension> (|> {synthesis.#Extension <extension> (list (synthesis.f64 param) (synthesis.f64 subject))} @@ -161,7 +161,7 @@ ["lux f64 =" f.=] ["lux f64 <" f.<] )) - (~~ (with_template [<extension> <reference>] + (,, (with_template [<extension> <reference>] [(_.property <extension> (|> {synthesis.#Extension <extension> (list)} (run (..safe <extension>)) diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux index 0a21ad67b..f5861b006 100644 --- a/stdlib/source/specification/compositor/generation/primitive.lux +++ b/stdlib/source/specification/compositor/generation/primitive.lux @@ -29,7 +29,7 @@ (def .public (spec run) (-> Runner Test) (`` (all _.and - (~~ (with_template [<evaluation_name> <synthesis> <gen> <test>] + (,, (with_template [<evaluation_name> <synthesis> <gen> <test>] [(do r.monad [expected <gen>] (_.property (%.symbol (symbol <synthesis>)) diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux index bf2127d23..7024ed43b 100644 --- a/stdlib/source/test/aedifex/artifact/extension.lux +++ b/stdlib/source/test/aedifex/artifact/extension.lux @@ -30,7 +30,7 @@ (n.= (list.size options) (set.size uniques)))) (_.coverage [/.extension /.type] - (`` (and (~~ (with_template [<type> <extension>] + (`` (and (,, (with_template [<type> <extension>] [(and (text#= <extension> (/.extension <type>)) (text#= <type> diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index 5aedb67a9..7ae2a8c72 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -115,7 +115,7 @@ ///dependency.#type ///artifact/type.js_library]]] (`` (all random.either (in js_compiler) - (~~ (with_template [<compiler>] + (,, (with_template [<compiler>] [(in [///dependency.#artifact [///artifact.#group /.lux_group ///artifact.#name <compiler> ///artifact.#version lux_version] @@ -219,7 +219,7 @@ expected/1 (random.alphabetic 5) expected/2 (random.alphabetic 5)] (`` (all _.and - (~~ (with_template [<error?> <log!>] + (,, (with_template [<error?> <log!>] [(let [console (@version.echo "") shell (|> (list expected/0 expected/1 expected/2) (..reader_shell <error?>) diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 1507398b6..e724392a5 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -271,7 +271,7 @@ {try.#Failure _} false)))) - (~~ (with_template [<exception> <bad>] + (,, (with_template [<exception> <bad>] [(in (do async.monad [actual_package (/.one (///repository.mock <bad> []) [///dependency.#artifact expected_artifact diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux index 1d8569413..0bce4febc 100644 --- a/stdlib/source/test/aedifex/hash.lux +++ b/stdlib/source/test/aedifex/hash.lux @@ -45,7 +45,7 @@ )) (_.for [/.data] (all _.and - (~~ (with_template [<hash> <constructor> <exception>] + (,, (with_template [<hash> <constructor> <exception>] [(do random.monad [expected (..random <hash>)] (_.coverage [<hash> <constructor> <exception>] @@ -67,7 +67,7 @@ [/.sha-1 /.as_sha-1 /.not_a_sha-1] [/.md5 /.as_md5 /.not_a_md5] )))) - (~~ (with_template [<codec> <hash>] + (,, (with_template [<codec> <hash>] [(_.for [<codec>] ($codec.spec /.equivalence <codec> (..random <hash>)))] @@ -76,7 +76,7 @@ )) (_.for [/.not_a_hash] (all _.and - (~~ (with_template [<codec> <hash>] + (,, (with_template [<codec> <hash>] [(do random.monad [expected (..random <hash>)] (_.coverage [<codec>] diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux index 25471077d..2a10e763e 100644 --- a/stdlib/source/test/aedifex/runtime.lux +++ b/stdlib/source/test/aedifex/runtime.lux @@ -41,7 +41,7 @@ (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) - (~~ (with_template [<command>] + (,, (with_template [<command>] [(_.coverage [/.default_java /.default_js /.default_python /.default_lua /.default_ruby] (let [listing (|> (list /.default_java /.default_js /.default_python /.default_lua /.default_ruby) (list#each (the /.#program))) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index a7cb9cfa9..1e997b2cf 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -63,13 +63,13 @@ ["[1][0]" ffi] ["[1][0]" extension] ["[1][0]" target (.only) - (.~~ (.for "{old}" (.~~ (.these ["[1]/[0]" jvm])) - "JVM" (.~~ (.these ["[1]/[0]" jvm])) - "JavaScript" (.~~ (.these ["[1]/[0]" js])) - "Lua" (.~~ (.these ["[1]/[0]" lua])) - "Python" (.~~ (.these ["[1]/[0]" python])) - "Ruby" (.~~ (.these ["[1]/[0]" ruby])) - (.~~ (.these))))] + (.,, (.for "{old}" (.,, (.these ["[1]/[0]" jvm])) + "JVM" (.,, (.these ["[1]/[0]" jvm])) + "JavaScript" (.,, (.these ["[1]/[0]" js])) + "Lua" (.,, (.these ["[1]/[0]" lua])) + "Python" (.,, (.these ["[1]/[0]" python])) + "Ruby" (.,, (.these ["[1]/[0]" ruby])) + (.,, (.these))))] ]))) (def for_bit @@ -287,7 +287,7 @@ (code.symbol ["" "i8"]))) (/.' [+9.0 "9" i8])) (not (code#= (code.nat example_nat) - (/.' (~ (code.nat example_nat))))) + (/.' (, (code.nat example_nat))))) )))) (def for_code/` @@ -317,7 +317,7 @@ (code.symbol [..current_module "i8"]))) (/.` [+9.0 "9" i8])) (code#= (code.nat example_nat) - (/.` (~ (code.nat example_nat)))))))) + (/.` (, (code.nat example_nat)))))))) (def for_code/`' Test @@ -346,7 +346,7 @@ (code.symbol ["" "i8"]))) (/.`' [+9.0 "9" i8])) (code#= (code.nat example_nat) - (/.`' (~ (code.nat example_nat)))))))) + (/.`' (, (code.nat example_nat)))))))) (def for_code Test @@ -397,7 +397,7 @@ (same? (is Any macro)))) (_.coverage [/.macro] (same? expected (..identity_macro expected))) - (~~ (for @.old (~~ (these)) + (,, (for @.old (,, (these)) (_.coverage [/.Source] (..found_crosshair?)))) (_.coverage [/.require] @@ -419,21 +419,21 @@ <m2/1> (template.text [<module/2> "/" <module/1>]) <m0/1/2> (template.text [<module/0> "/" <module/1> "/" <module/2>]) <open/0> (template.text [<module/0> "#[0]"])] - (and (~~ (with_template [<input> <module> <referrals>] + (and (,, (with_template [<input> <module> <referrals>] [(with_expansions [<input>' (macro.final <input>)] (let [scenario (is (-> Any Bit) (function (_ _) ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. (`` (for @.python (case (' [<input>']) (^.` [<module> - ("lux def" (~ [_ {.#Symbol ["" _]}]) [] #0) - (~~ (template.spliced <referrals>))]) + ("lux def" (, [_ {.#Symbol ["" _]}]) [] #0) + (,, (template.spliced <referrals>))]) true _ false) (case (' [<input>']) - (^.` [<module> (~~ (template.spliced <referrals>))]) + (^.` [<module> (,, (template.spliced <referrals>))]) true _ @@ -655,7 +655,7 @@ Test (`` (all _.and (_.coverage [/.with_template] - (let [bits (list (~~ (/.with_template [_] + (let [bits (list (,, (/.with_template [_] [true] [0] [1] [2] @@ -686,7 +686,7 @@ (pattern (/.static option/1)) true _ false)) (_.coverage [/.char] - (|> (`` (/.char (~~ (/.static static_char)))) + (|> (`` (/.char (,, (/.static static_char)))) text.of_char (text#= static_char))) ))) @@ -815,7 +815,7 @@ .let [expected (n.+ left right)]] (all _.and (_.coverage [/.these] - (`` (and (~~ (these true + (`` (and (,, (these true true true))))) (_.coverage [/.with_expansions] @@ -830,8 +830,8 @@ (_.coverage [/.``] (n.= expected (/.`` (all n.+ - (~~ (these left right)) - (~~ (/.comment dummy)))))) + (,, (these left right)) + (,, (/.comment dummy)))))) (_.coverage [/.for] (and (n.= expected (/.for "fake host" dummy @@ -1196,8 +1196,8 @@ ..for_def ..for_meta ..for_export - (~~ (for @.old (~~ (these)) - (~~ (these ..for_bindings)))) + (,, (for @.old (,, (these)) + (,, (these ..for_bindings)))) )))) (def test @@ -1226,16 +1226,16 @@ /world.test /ffi.test - (~~ (for @.old (~~ (these)) - (~~ (these /extension.test)))) + (,, (for @.old (,, (these)) + (,, (these /extension.test)))) /target.test - (~~ (for @.jvm (~~ (these /target/jvm.test)) - @.old (~~ (these /target/jvm.test)) - @.js (~~ (these /target/js.test)) - @.lua (~~ (these /target/lua.test)) - @.python (~~ (these /target/python.test)) - @.ruby (~~ (these /target/ruby.test)))) + (,, (for @.jvm (,, (these /target/jvm.test)) + @.old (,, (these /target/jvm.test)) + @.js (,, (these /target/js.test)) + @.lua (,, (these /target/lua.test)) + @.python (,, (these /target/python.test)) + @.ruby (,, (these /target/ruby.test)))) )))))) (program: args diff --git a/stdlib/source/test/lux/control/concatenative.lux b/stdlib/source/test/lux/control/concatenative.lux index ced371a06..7634e19fe 100644 --- a/stdlib/source/test/lux/control/concatenative.lux +++ b/stdlib/source/test/lux/control/concatenative.lux @@ -65,7 +65,7 @@ /.&&))] (and (n.= sample left) (n.= dummy right)))) - (~~ (with_template [<function> <tag>] + (,, (with_template [<function> <tag>] [(_.coverage [<function>] ((sum.equivalence n.= n.=) {<tag> sample} @@ -100,7 +100,7 @@ [parameter (|> <generator> (random.only <only>)) subject <generator>] (`` (all _.and - (~~ (with_template [<concatenative> <functional>] + (,, (with_template [<concatenative> <functional>] [(_.coverage [<concatenative>] (<=> (<functional> parameter subject) (/.value (|>> (/.push subject) @@ -108,7 +108,7 @@ <concatenative>))))] <arithmetic>')) - (~~ (with_template [<concatenative> <functional>] + (,, (with_template [<concatenative> <functional>] [(_.coverage [<concatenative>] (bit#= (<functional> parameter subject) (/.value (|>> (/.push subject) diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux index 738a8b739..6cecb66d4 100644 --- a/stdlib/source/test/lux/control/parser.lux +++ b/stdlib/source/test/lux/control/parser.lux @@ -68,11 +68,11 @@ (syntax (_ [pattern <code>.any then <code>.any input <code>.any]) - (in (list (` (case (~ input) - (pattern {try.#Success [(~' _) (~ pattern)]}) - (~ then) + (in (list (` (case (, input) + (pattern {try.#Success [(,' _) (, pattern)]}) + (, then) - (~' _) + (,' _) #0)))))) (def combinators_0 diff --git a/stdlib/source/test/lux/control/remember.lux b/stdlib/source/test/lux/control/remember.lux index 8d6c21767..17440088a 100644 --- a/stdlib/source/test/lux/control/remember.lux +++ b/stdlib/source/test/lux/control/remember.lux @@ -33,10 +33,10 @@ (def (memory macro deadline message focus) (-> Symbol Date Text (Maybe Code) Code) - (` ((~ (code.symbol macro)) - (~ (code.text (%.date deadline))) - (~ (code.text message)) - (~+ (case focus + (` ((, (code.symbol macro)) + (, (code.text (%.date deadline))) + (, (code.text message)) + (,* (case focus {.#None} (list) {.#Some focus} (list focus)))))) diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 4fde0e1f9..d3fcc968a 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -135,7 +135,7 @@ Test (<| (_.for [\\parser.Size]) (`` (all _.and - (~~ (with_template [<size> <parser> <format>] + (,, (with_template [<size> <parser> <format>] [(do [! random.monad] [expected (at ! each (i64.and (i64.mask <size>)) random.nat)] @@ -155,7 +155,7 @@ (def binary Test (`` (all _.and - (~~ (with_template [<parser> <format>] + (,, (with_template [<parser> <format>] [(do [! random.monad] [expected (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))] (_.coverage [<parser> <format>] @@ -173,7 +173,7 @@ (def utf8 Test (`` (all _.and - (~~ (with_template [<parser> <format>] + (,, (with_template [<parser> <format>] [(do [! random.monad] [expected (random.ascii ..segment_size)] (_.coverage [<parser> <format>] @@ -192,7 +192,7 @@ (def sequence Test (`` (all _.and - (~~ (with_template [<parser> <format>] + (,, (with_template [<parser> <format>] [(do [! random.monad] [expected (random.sequence ..segment_size random.nat)] (_.coverage [<parser> <format>] @@ -211,7 +211,7 @@ (def simple Test (`` (all _.and - (~~ (with_template [<parser> <format> <random> <equivalence>] + (,, (with_template [<parser> <format> <random> <equivalence>] [(do [! random.monad] [expected <random>] (_.coverage [<parser> <format>] @@ -250,7 +250,7 @@ (def complex Test (`` (all _.and - (~~ (with_template [<parser> <format> <random> <equivalence>] + (,, (with_template [<parser> <format> <random> <equivalence>] [(do [! random.monad] [expected <random>] (_.coverage [<parser> <format>] @@ -264,7 +264,7 @@ [\\parser.code \\format.code random_code code.equivalence] [\\parser.type \\format.type random_type type.equivalence] )) - (~~ (with_template [<parser_coverage> <parser> <coverage_format> <format> <random> <equivalence>] + (,, (with_template [<parser_coverage> <parser> <coverage_format> <format> <random> <equivalence>] [(do [! random.monad] [expected <random>] (_.coverage [<parser_coverage> <coverage_format>] @@ -494,7 +494,7 @@ (!.= (!.empty size) (!.empty size))) (_.coverage [!.size] (|> (!.empty size) !.size (n.= size))) - (~~ (with_template [<power> <bytes/?> <has/?>] + (,, (with_template [<power> <bytes/?> <has/?>] [(_.coverage [<bytes/?> <has/?>] (let [bytes (i64.left_shifted <power> 1) binary (!.empty bytes) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index c90d09e27..2e5734c23 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -246,7 +246,7 @@ (_.coverage [/.member?] (/.every? (/.member? n.equivalence sample) sample)) - (~~ (with_template [<head> <tail> <pre>] + (,, (with_template [<head> <tail> <pre>] [(all _.and (_.coverage [<head>] (case [(<pre> sample) (<head> sample)] diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index a0dd01e06..64b07d09c 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -59,7 +59,7 @@ sample (..random diversity n.hash ..count random.nat) another (..random diversity n.hash ..count random.nat)] (`` (all _.and - (~~ (with_template [<name> <composition>] + (,, (with_template [<name> <composition>] [(_.coverage [<name>] (let [|sample| (/.support sample) |another| (/.support another) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 8827b719f..51688a128 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -71,7 +71,7 @@ (|> setL /.list (/.of_list n.order) (/#= setL))) - (~~ (with_template [<coverage> <comparison>] + (,, (with_template [<coverage> <comparison>] [(_.coverage [<coverage>] (case (<coverage> setL) {.#Some value} @@ -123,7 +123,7 @@ (and self! empty! symmetry!))) - (~~ (with_template [<coverage> <relation> <empty?>] + (,, (with_template [<coverage> <relation> <empty?>] [(_.coverage [<coverage>] (let [self! (at /.equivalence = diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index f03c2725f..aec7a93e5 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -171,7 +171,7 @@ (do [! random.monad] [dummy random.nat] (_.coverage [\\parser.cannot_move_further] - (`` (and (~~ (with_template [<parser>] + (`` (and (,, (with_template [<parser>] [(|> (\\parser.result <parser> (/.leaf dummy)) (!expect (^.multi {try.#Failure error} diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux index aa77f88f9..fa4d1f9d3 100644 --- a/stdlib/source/test/lux/data/color.lux +++ b/stdlib/source/test/lux/data/color.lux @@ -140,7 +140,7 @@ spread (at ! each (|>> f.abs (f.% spread_space) (f.+ min_spread)) random.safe_frac)] (`` (all _.and - (~~ (with_template [<brightness> <palette>] + (,, (with_template [<brightness> <palette>] [(_.coverage [<palette>] (let [eB <brightness> expected (/.of_hsb [eH eS eB]) @@ -150,7 +150,7 @@ [+1.0 /.analogous] [+0.5 /.monochromatic] )) - (~~ (with_template [<palette>] + (,, (with_template [<palette>] [(_.coverage [<palette>] (let [expected (/.of_hsb [eH eS +0.5]) [c0 c1 c2] (<palette> expected)] @@ -161,7 +161,7 @@ [/.triad] [/.clash] [/.split_complement])) - (~~ (with_template [<palette>] + (,, (with_template [<palette>] [(_.coverage [<palette>] (let [expected (/.of_hsb [eH eS +0.5]) [c0 c1 c2 c3] (<palette> expected)] diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux index 49aeb9f7f..d98340a31 100644 --- a/stdlib/source/test/lux/data/color/named.lux +++ b/stdlib/source/test/lux/data/color/named.lux @@ -201,10 +201,10 @@ /.yellow_green]] )] (def all_colors - (list.together (`` (list (~~ (with_template [<definition> <by_letter>] + (list.together (`` (list (,, (with_template [<definition> <by_letter>] [((is (-> Any (List //.Color)) (function (_ _) - (`` (list (~~ (template.spliced <by_letter>)))))) + (`` (list (,, (template.spliced <by_letter>)))))) 123)] <colors>)))))) @@ -228,7 +228,7 @@ Test (<| (_.covering /._) (`` (all _.and - (~~ (with_template [<definition> <by_letter>] + (,, (with_template [<definition> <by_letter>] [<definition>] <colors>)) diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 7177b268d..bfc2b7d89 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -77,7 +77,7 @@ (_.coverage [\\parser.null] (|> (\\parser.result \\parser.null {/.#Null}) (!expect {try.#Success _}))) - (~~ (with_template [<query> <test> <check> <random> <json> <equivalence>] + (,, (with_template [<query> <test> <check> <random> <json> <equivalence>] [(do [! random.monad] [expected <random> dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))] @@ -368,7 +368,7 @@ true)]] (in (and can_find_known_key! cannot_find_unknown_key!)))))) - (~~ (with_template [<type> <field> <tag> <random> <equivalence>] + (,, (with_template [<type> <field> <tag> <random> <equivalence>] [(do random.monad [key (random.alphabetic 1) value <random>] @@ -400,7 +400,7 @@ <key6> (string)] (_.coverage [/.json] (and (/#= {/.#Null} (/.json ())) - (~~ (with_template [<tag> <value>] + (,, (with_template [<tag> <value>] [(/#= {<tag> <value>} (/.json <value>))] [/.#Boolean <boolean>] diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index 349149b22..4a4426fd9 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -166,7 +166,7 @@ text.together (at utf8.codec encoded))]] (`` (all _.and - (~~ (with_template [<type> <tag>] + (,, (with_template [<type> <tag>] [(_.coverage [<type>] (|> (do try.monad [expected_path (/.path expected_path) @@ -187,7 +187,7 @@ )) (_.for [/.File /.Content /.content /.data] (all _.and - (~~ (with_template [<type> <tag>] + (,, (with_template [<type> <tag>] [(_.coverage [<type>] (|> (do try.monad [expected_path (/.path expected_path) @@ -268,7 +268,7 @@ _ false))) (try.else false))) - (~~ (with_template [<expected_mode>] + (,, (with_template [<expected_mode>] [(_.coverage [<expected_mode>] (|> (do try.monad [path (/.path path) diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index a01fab3e8..dfdc7ac0e 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -47,7 +47,7 @@ (do [! random.monad] [expected (random.alphabetic 1)] (_.coverage [<exception>] - (`` (and (~~ (with_template [<parser> <input>] + (`` (and (,, (with_template [<parser> <input>] [(|> (\\parser.result <parser> (list <input>)) (!expect (^.multi {try.#Failure error} (exception.match? <exception> error))))] @@ -237,7 +237,7 @@ (do [! random.monad] [(^.let symbol [namespace name]) ..symbol] (`` (all _.and - (~~ (with_template [<type> <format>] + (,, (with_template [<type> <format>] [(_.coverage [<type> <format>] (and (text#= name (<format> ["" name])) (let [symbol (<format> symbol)] diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index 04c67ac15..ef8bf11ec 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -99,7 +99,7 @@ (def codec Test (`` (all _.and - (~~ (with_template [<format> <codec> <random>] + (,, (with_template [<format> <codec> <random>] [(do random.monad [sample <random>] (_.coverage [<format>] @@ -165,7 +165,7 @@ (/#= (\\format.format left mid right) (all "lux text concat" left mid right)))) ..codec - (~~ (with_template [<format> <alias> <random>] + (,, (with_template [<format> <alias> <random>] [(do random.monad [sample <random>] (_.coverage [<format>] @@ -651,7 +651,7 @@ .let [full (at /.monoid composite inner outer) fake_index (-- 0)]] (`` (all _.and - (~~ (with_template [<affix> <predicate>] + (,, (with_template [<affix> <predicate>] [(_.coverage [<affix> <predicate>] (<predicate> outer (<affix> outer inner)))] @@ -721,7 +721,7 @@ (all _.and (_.for [/.Char /.of_char] (`` (all _.and - (~~ (with_template [<short> <long>] + (,, (with_template [<short> <long>] [(_.coverage [<short> <long>] (at /.equivalence = <short> <long>))] @@ -755,8 +755,8 @@ {.#None} false))) (_.coverage [/.space /.space?] - (`` (and (~~ (with_template [<char>] - [(/.space? (`` (.char (~~ (static <char>)))))] + (`` (and (,, (with_template [<char>] + [(/.space? (`` (.char (,, (static <char>)))))] [/.tab] [/.vertical_tab] diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux index 15c1b5bbb..47a1ddbb7 100644 --- a/stdlib/source/test/lux/data/text/encoding.lux +++ b/stdlib/source/test/lux/data/text/encoding.lux @@ -185,7 +185,7 @@ <named> (with_template [<definition> <by_letter>] [((is (-> Any (List /.Encoding)) (function (_ _) - (`` (list (~~ (template.spliced <by_letter>)))))) + (`` (list (,, (template.spliced <by_letter>)))))) [])] <encodings>)] @@ -205,7 +205,7 @@ (with_template [<definition> <by_letter>] [(def <definition> Test - (`` (_.coverage [/.name (~~ (template.spliced <by_letter>))] + (`` (_.coverage [/.name (,, (template.spliced <by_letter>))] ..verdict)))] <encodings>) @@ -222,7 +222,7 @@ (<| (_.covering /._) (_.for [/.Encoding]) (`` (all _.and - (~~ (with_template [<definition> <by_letter>] + (,, (with_template [<definition> <by_letter>] [<definition>] <encodings>)) diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux index 94808d95b..da90e8f24 100644 --- a/stdlib/source/test/lux/data/text/escape.lux +++ b/stdlib/source/test/lux/data/text/escape.lux @@ -88,7 +88,7 @@ (do random.monad [ascii ..ascii_range] (_.coverage [/.escapable?] - (`` (if (or (~~ (with_template [<char>] + (`` (if (or (,, (with_template [<char>] [(n.= (debug.private <char>) ascii)] [/.\0] [/.\a] [/.\b] [/.\t] @@ -155,5 +155,5 @@ (!invalid code))))) (_.coverage [/.literal] (with_expansions [<example> (..static_sample)] - (text#= <example> (`` (/.literal (~~ (..static_escaped <example>))))))) + (text#= <example> (`` (/.literal (,, (..static_escaped <example>))))))) ))) diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux index 4d480632b..5dabc0a9b 100644 --- a/stdlib/source/test/lux/data/text/regex.lux +++ b/stdlib/source/test/lux/data/text/regex.lux @@ -60,13 +60,13 @@ regex <code>.any input <code>.any]) (macro.with_symbols [g!message g!_] - (in (list (` (|> (~ input) - (<text>.result (~ regex)) + (in (list (` (|> (, input) + (<text>.result (, regex)) (pipe.case - (pattern {try.#Success (~ pattern)}) + (pattern {try.#Success (, pattern)}) true - (~ g!_) + (, g!_) false)))))))) (def basics diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux index ff4c5b773..7149a441c 100644 --- a/stdlib/source/test/lux/data/text/unicode/block.lux +++ b/stdlib/source/test/lux/data/text/unicode/block.lux @@ -149,14 +149,14 @@ <named> (with_template [<definition> <part>] [((is (-> Any (List /.Block)) (function (_ _) - (`` (list (~~ (template.spliced <part>)))))) + (`` (list (,, (template.spliced <part>)))))) [])] <blocks>)] (with_template [<definition> <part>] [(def <definition> Test - (`` (_.coverage [(~~ (template.spliced <part>))] + (`` (_.coverage [(,, (template.spliced <part>))] (let [all (list.together (list <named>)) unique (set.of_list /.hash all)] (n.= (list.size all) @@ -205,7 +205,7 @@ (and (/.within? sample inside) (not (/.within? sample (-- (/.start sample)))) (not (/.within? sample (++ (/.end sample)))))) - (~~ (with_template [<definition> <part>] + (,, (with_template [<definition> <part>] [<definition>] <blocks>)))) diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux index da4ea8e60..bdca45423 100644 --- a/stdlib/source/test/lux/data/text/unicode/set.lux +++ b/stdlib/source/test/lux/data/text/unicode/set.lux @@ -73,7 +73,7 @@ (n.= (n.max (block.end left) (block.end right)) (/.end composed))))) - (~~ (with_template [<set>] + (,, (with_template [<set>] [(do random.monad [char (random.char <set>) .let [start (/.start <set>) diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 245f5bdba..cda9456f2 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -56,7 +56,7 @@ sample_text (random.upper_case 10) sample_nat random.nat sample_rev random.rev] - (in (`` (and (~~ (with_template [<type> <format> <sample>] + (in (`` (and (,, (with_template [<type> <format> <sample>] [(|> (/.representation <type> <sample>) (try#each (text#= (<format> <sample>))) (try.else false))] @@ -87,7 +87,7 @@ {try.#Failure error} false) ... TODO: Uncomment after switching from the old (tag+last?) to the new (lefts+right?) representation for variants - ... (~~ (with_template [<lefts> <right?> <value> <format>] + ... (,, (with_template [<lefts> <right?> <value> <format>] ... [(|> (/.representation (type_literal (Or Bit Int Frac)) ... (is (Or Bit Int Frac) ... (<lefts> <right?> <value>))) @@ -112,7 +112,7 @@ sample_code $//code.random sample_xml $//xml.random sample_json $//json.random] - (in (`` (and (~~ (with_template [<type> <format> <sample>] + (in (`` (and (,, (with_template [<type> <format> <sample>] [(|> (/.representation <type> <sample>) (try#each (text#= (<format> <sample>))) (try.else false))] @@ -135,7 +135,7 @@ sample_month random.month sample_time random.time sample_day random.day] - (in (`` (and (~~ (with_template [<type> <format> <sample>] + (in (`` (and (,, (with_template [<type> <format> <sample>] [(|> (/.representation <type> <sample>) (try#each (text#= (<format> <sample>))) (try.else false))] @@ -173,7 +173,7 @@ (|> (/.representation (type_literal (List Nat)) (is (List Nat) (list sample_nat))) (try#each (text#= (%.list %.nat (list sample_nat)))) (try.else false)) - (~~ (with_template [<sample>] + (,, (with_template [<sample>] [(|> (/.representation (type_literal (Maybe Nat)) (is (Maybe Nat) <sample>)) (try#each (text#= (%.maybe %.nat <sample>))) (try.else false))] @@ -199,7 +199,7 @@ sample_frac random.frac sample_text (random.upper_case 10)] (_.coverage [/.inspection] - (`` (and (~~ (with_template [<format> <sample>] + (`` (and (,, (with_template [<format> <sample>] [(text#= (<format> <sample>) (/.inspection <sample>))] [%.bit sample_bit] @@ -245,8 +245,8 @@ bar random.nat baz random.bit] (_.coverage [/.here] - (with_expansions [<no_parameters> (for @.js (~~ (these)) - (~~ (these (/.here))))] + (with_expansions [<no_parameters> (for @.js (,, (these)) + (,, (these (/.here))))] (`` (exec <no_parameters> (/.here foo diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux index bac10e185..9a22ca625 100644 --- a/stdlib/source/test/lux/documentation.lux +++ b/stdlib/source/test/lux/documentation.lux @@ -54,7 +54,7 @@ (_.for [/.Definition] (all _.and (_.coverage [/.default] - (case (`` (/.default (~~ (template.symbol [.._] [g!default])))) + (case (`` (/.default (,, (template.symbol [.._] [g!default])))) (pattern (list definition)) (and (|> definition (the /.#definition) @@ -85,11 +85,11 @@ (all _.and (_.coverage [/.module /.markdown] (let [sub (`` (/.module /._ - (~~ (template.text ['sub_description'])) + (,, (template.text ['sub_description'])) [] [])) super (`` (/.module .._ - (~~ (template.text ['super_description'])) + (,, (template.text ['super_description'])) [..documentation] [sub]))] (and (text.contains? (template.text ['sub_description']) @@ -107,12 +107,12 @@ false)))) )) (_.coverage [/.unqualified_symbol] - (`` (and (~~ (with_template [<example>] + (`` (and (,, (with_template [<example>] [(macro_error <example>)] [(/.default g!default)] [(/.documentation g!default - (~~ (template.text ['definition_description'])))] + (,, (template.text ['definition_description'])))] [(/.module g!default "" [..documentation] diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux index 27a8a4cc8..a50ff37ac 100644 --- a/stdlib/source/test/lux/extension.lux +++ b/stdlib/source/test/lux/extension.lux @@ -10,12 +10,12 @@ ["[0]" php] ["[0]" scheme] ["[0]" jvm - (.~~ (.for "JVM" (.~~ (.these ["[1]" bytecode] + (.,, (.for "JVM" (.,, (.these ["[1]" bytecode] ["[0]" class] ["[0]" version] [encoding ["[0]" name]])) - (.~~ (.these))))]] + (.,, (.these))))]] [abstract ["[0]" monad (.only do)]] [control @@ -56,9 +56,9 @@ ["<[1]>" \\parser]] [phase [generation - (.~~ (.for "JVM" (.~~ (.these ["[0]" jvm + (.,, (.for "JVM" (.,, (.these ["[0]" jvm ["[1]/[0]" runtime]])) - (.~~ (.these))))]]]]]] + (.,, (.these))))]]]]]] ["_" test (.only Test)]]] [\\library ["[0]" / (.only analysis synthesis generation declaration)]]))) @@ -68,7 +68,7 @@ (with_template [<name>] [(def <name> Text - (`` (%.symbol (symbol (~~ (template.symbol [.._ <name>]))))))] + (`` (%.symbol (symbol (,, (template.symbol [.._ <name>]))))))] [my_analysis] [my_synthesis] @@ -179,7 +179,7 @@ (generation.log! commentary))))] (in declaration.no_requirements))) - (`` ((~~ (static ..my_declaration)) (n.* 2 3))) + (`` ((,, (static ..my_declaration)) (n.* 2 3))) )) (def .public test @@ -188,20 +188,20 @@ (do random.monad [expected random.nat] (`` (all _.and - (~~ (with_template [<macro> <extension>] + (,, (with_template [<macro> <extension>] [(_.coverage [<macro>] (for @.old false (n.= expected - (`` ((~~ (static <extension>)) expected)))))] + (`` ((,, (static <extension>)) expected)))))] [/.analysis ..my_analysis] [/.synthesis ..my_synthesis])) (_.coverage [/.generation] (for @.old false (and (n.= expected - (`` ((~~ (static ..my_generation)) expected))) + (`` ((,, (static ..my_generation)) expected))) (text#= ..dummy_generation - (`` ((~~ (static ..dummy_generation)))))))) + (`` ((,, (static ..dummy_generation)))))))) (_.coverage [/.declaration] true) ))))) diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index 658afb55b..2312f1d9f 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -59,7 +59,7 @@ object random.nat] (<| (_.covering /._) (`` (all _.and - (~~ (with_template [<type> <value>] + (,, (with_template [<type> <value>] [(_.coverage [<type>] (exec (is <type> <value>) @@ -71,7 +71,7 @@ )) (_.for [/.Object] (all _.and - (~~ (with_template [<type>] + (,, (with_template [<type>] [(_.coverage [<type>] (exec (is (Ex (_ a) (/.Object a)) diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 375de540a..642075157 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -94,7 +94,7 @@ (random.only (|>> f.not_a_number? not)) (at ! each (|>> /.as_float)))] (`` (all _.and - (~~ (with_template [<sample> <=> <to> <from>] + (,, (with_template [<sample> <=> <to> <from>] [(_.coverage [<to> <from>] (or (|> <sample> <to> <from> (<=> <sample>)) (let [capped (|> <sample> <to> <from>)] @@ -197,7 +197,7 @@ /.!!! /.null? not))) - (~~ (with_template [<object> <primitive> <jvm#value> <jvm#=> + (,, (with_template [<object> <primitive> <jvm#value> <jvm#=> <lux#value> <as> <of> <lux#=>] [(_.coverage [<object> <primitive>] (|> <jvm#value> diff --git a/stdlib/source/test/lux/ffi.lua.lux b/stdlib/source/test/lux/ffi.lua.lux index 7fa095e17..a78f7c516 100644 --- a/stdlib/source/test/lux/ffi.lua.lux +++ b/stdlib/source/test/lux/ffi.lua.lux @@ -24,7 +24,7 @@ string (random.lower_case 1)] (<| (_.covering /._) (`` (all _.and - (~~ (with_template [<type> <sample>] + (,, (with_template [<type> <sample>] [(_.coverage [<type>] (exec (is <type> <sample>) @@ -37,7 +37,7 @@ )) (_.for [/.Object] (all _.and - (~~ (with_template [<type>] + (,, (with_template [<type>] [(_.coverage [<type>] (exec (|> [] diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux index e768fbff8..b8d9ea20a 100644 --- a/stdlib/source/test/lux/ffi.old.lux +++ b/stdlib/source/test/lux/ffi.old.lux @@ -100,7 +100,7 @@ (random.only (|>> f.not_a_number? not)) (at ! each (|>> /.double_to_float)))] (`` (all _.and - (~~ (with_template [<=> <sample> <to> <from>] + (,, (with_template [<=> <sample> <to> <from>] [(_.coverage [<to> <from>] (or (|> <sample> <to> <from> (<=> <sample>)) (let [capped (|> <sample> <to> <from>)] @@ -115,7 +115,7 @@ [f.= double /.double_to_float /.float_to_double] [f.= double /.double_to_int /.int_to_double] )) - (~~ (with_template [<to> <from>] + (,, (with_template [<to> <from>] [(_.coverage [<to>] (or (|> int <to> <from> (i.= (/.int_to_long int))) (let [capped (|> int <to> <from>)] @@ -125,7 +125,7 @@ [/.int_to_short /.short_to_long] [/.int_to_char /.char_to_long] )) - (~~ (with_template [<sample> <to> <from>] + (,, (with_template [<sample> <to> <from>] [(_.coverage [<to> <from>] (or (|> <sample> <to> <from> /.float_to_double (f.= (/.float_to_double <sample>))) (let [capped (|> <sample> <to> <from>)] @@ -133,7 +133,7 @@ [float /.float_to_int /.int_to_float] )) - (~~ (with_template [<to> <from>] + (,, (with_template [<to> <from>] [(_.coverage [<to>] (or (|> char <to> <from> (i.= (|> char /.char_to_int /.int_to_long))) (let [capped (|> char <to> <from>)] diff --git a/stdlib/source/test/lux/ffi.py.lux b/stdlib/source/test/lux/ffi.py.lux index 55a2597ca..3a8529e2e 100644 --- a/stdlib/source/test/lux/ffi.py.lux +++ b/stdlib/source/test/lux/ffi.py.lux @@ -27,7 +27,7 @@ string (random.lower_case 1)] (<| (_.covering /._) (`` (all _.and - (~~ (with_template [<type> <sample>] + (,, (with_template [<type> <sample>] [(_.coverage [<type>] (exec (is <type> <sample>) @@ -40,7 +40,7 @@ )) (_.for [/.Object] (all _.and - (~~ (with_template [<type>] + (,, (with_template [<type>] [(_.coverage [<type>] (exec (|> [] diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index 1fc224a9d..305de1e59 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -24,7 +24,7 @@ string (random.lower_case 1)] (<| (_.covering /._) (`` (all _.and - (~~ (with_template [<type> <sample>] + (,, (with_template [<type> <sample>] [(_.coverage [<type>] (exec (is <type> <sample>) @@ -37,7 +37,7 @@ )) (_.for [/.Object] (all _.and - (~~ (with_template [<type>] + (,, (with_template [<type>] [(_.coverage [<type>] (exec (|> [] diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index 8ad59d6ed..a567e8df4 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -46,14 +46,14 @@ (actual_double double ..expected_double) ... Methods - (~~ (with_template [<type> <+>] - [(((~~ (template.symbol [<type> "_method"])) + (,, (with_template [<type> <+>] + [(((,, (template.symbol [<type> "_method"])) [left <type> right <type>]) <type> - ((~~ (template.symbol [//._] ["as_" <type>])) - (<+> ((~~ (template.symbol [//._] ["of_" <type>])) left) - ((~~ (template.symbol [//._] ["of_" <type>])) right))))] + ((,, (template.symbol [//._] ["as_" <type>])) + (<+> ((,, (template.symbol [//._] ["of_" <type>])) left) + ((,, (template.symbol [//._] ["of_" <type>])) right))))] [boolean and] [byte int.+] @@ -77,8 +77,8 @@ ("read_only" "static" actual_float float) ("read_only" "static" actual_double double) - (~~ (with_template [<type>] - [("static" (~~ (template.symbol [<type> "_method"])) [<type> <type>] <type>)] + (,, (with_template [<type>] + [("static" (,, (template.symbol [<type> "_method"])) [<type> <type>] <type>)] [boolean] [byte] @@ -126,9 +126,9 @@ Test (<| (_.covering /._) (do [! random.monad] - [(~~ (with_template [<type> <as> <random>] - [(~~ (template.symbol [left_ <type>])) (at ! each (|>> <as>) <random>) - (~~ (template.symbol [right_ <type>])) (at ! each (|>> <as>) <random>)] + [(,, (with_template [<type> <as> <random>] + [(,, (template.symbol [left_ <type>])) (at ! each (|>> <as>) <random>) + (,, (template.symbol [right_ <type>])) (at ! each (|>> <as>) <random>)] [boolean //.as_boolean random.bit] [byte //.as_byte ..tiny_int] @@ -151,7 +151,7 @@ (frac#= (//.of_float ..expected_float) (//.of_float (Primitives::actual_float))) (frac#= (//.of_double ..expected_double) (//.of_double (Primitives::actual_double))) - (~~ (with_template [<=> <+> <type>] + (,, (with_template [<=> <+> <type>] [(with_expansions [<left> (template.symbol ["left_" <type>]) <right> (template.symbol ["right_" <type>]) <of> (template.symbol [//._] ["of_" <type>]) diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux index 12603ae23..4c4f2d62e 100644 --- a/stdlib/source/test/lux/locale/language.lux +++ b/stdlib/source/test/lux/locale/language.lux @@ -36,7 +36,7 @@ Bundle (let [amount (template.amount <languages>) languages (is (List /.Language) - (`` (list (~~ (template.spliced <languages>)))))] + (`` (list (,, (template.spliced <languages>)))))] [#amount amount #names (|> languages (list#each /.name) (set.of_list text.hash)) #codes (|> languages (list#each /.code) (set.of_list text.hash)) @@ -202,7 +202,7 @@ (list#each (the #test)) (list#mix _.and (`` (all _.and - (~~ (with_template [<lens> <tag> <hash>] + (,, (with_template [<lens> <tag> <hash>] [(let [[amount set] (..aggregate (the <tag>) <hash> ..languages)] (_.coverage [<lens>] (n.= amount (set.size set))))] @@ -217,7 +217,7 @@ (template (_ <reference> <aliases>) [(_.coverage <aliases> (list.every? (at /.equivalence = <reference>) - (`` (list (~~ (template.spliced <aliases>))))))])) + (`` (list (,, (template.spliced <aliases>))))))])) (def aliases_test/0 Test diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux index 16483d620..514009dc0 100644 --- a/stdlib/source/test/lux/locale/territory.lux +++ b/stdlib/source/test/lux/locale/territory.lux @@ -37,7 +37,7 @@ [(def <bundle> Bundle (let [amount (template.amount <territories>) - territories (`` (list (~~ (template.spliced <territories>))))] + territories (`` (list (,, (template.spliced <territories>))))] [#amount amount #names (|> territories (list#each /.name) (set.of_list text.hash)) #shorts (|> territories (list#each /.short_code) (set.of_list text.hash)) @@ -157,7 +157,7 @@ (list#each (the #test)) (list#mix _.and (`` (all _.and - (~~ (with_template [<lens> <tag> <hash>] + (,, (with_template [<lens> <tag> <hash>] [(let [[amount set] (..aggregate (the <tag>) <hash> ..territories)] (_.coverage [<lens>] (n.= amount (set.size set))))] @@ -174,7 +174,7 @@ (template (_ <reference> <aliases>) [(_.coverage <aliases> (list.every? (at /.equivalence = <reference>) - (`` (list (~~ (template.spliced <aliases>))))))])) + (`` (list (,, (template.spliced <aliases>))))))])) (def aliases_test Test diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux index 555a47c03..948acd4cd 100644 --- a/stdlib/source/test/lux/macro.lux +++ b/stdlib/source/test/lux/macro.lux @@ -48,11 +48,11 @@ (def pow/2 (syntax (_ [number <code>.any]) - (in (list (` (n.* (~ number) (~ number))))))) + (in (list (` (n.* (, number) (, number))))))) (def pow/4 (syntax (_ [number <code>.any]) - (in (list (` (..pow/2 (..pow/2 (~ number)))))))) + (in (list (` (..pow/2 (..pow/2 (, number)))))))) (def repeated (syntax (_ [times <code>.nat @@ -115,7 +115,7 @@ it <code>.any]) (in (list (case cycle 0 it - _ (` (..iterated (~ (code.nat (-- cycle))) (~ it)))))))) + _ (` (..iterated (, (code.nat (-- cycle))) (, it)))))))) (def test|expansion Test @@ -125,26 +125,26 @@ pow/1 (at ! each code.nat random.nat) repetitions (at ! each (n.% 10) random.nat) - .let [single_expansion (` (..pow/2 (..pow/2 (~ pow/1)))) - expansion (` (n.* (..pow/2 (~ pow/1)) - (..pow/2 (~ pow/1)))) - full_expansion (` (n.* (n.* (~ pow/1) (~ pow/1)) - (n.* (~ pow/1) (~ pow/1))))]] + .let [single_expansion (` (..pow/2 (..pow/2 (, pow/1)))) + expansion (` (n.* (..pow/2 (, pow/1)) + (..pow/2 (, pow/1)))) + full_expansion (` (n.* (n.* (, pow/1) (, pow/1)) + (n.* (, pow/1) (, pow/1))))]] (`` (all _.and - (~~ (with_template [<expander> <logger> <expansion>] + (,, (with_template [<expander> <logger> <expansion>] [(_.coverage [<expander>] - (|> (<expander> (` (..pow/4 (~ pow/1)))) + (|> (<expander> (` (..pow/4 (, pow/1)))) (meta.result lux) (try#each (at (list.equivalence code.equivalence) = (list <expansion>))) (try.else false))) (_.coverage [<logger>] - (and (|> (/.single_expansion (` (<logger> "omit" (..pow/4 (~ pow/1))))) + (and (|> (/.single_expansion (` (<logger> "omit" (..pow/4 (, pow/1))))) (meta.result lux) (try#each (at (list.equivalence code.equivalence) = (list))) (try.else false)) - (|> (/.single_expansion (` (<logger> (..pow/4 (~ pow/1))))) + (|> (/.single_expansion (` (<logger> (..pow/4 (, pow/1))))) (meta.result lux) (try#each (at (list.equivalence code.equivalence) = (list <expansion>))) (try.else false))))] @@ -155,7 +155,7 @@ )) (_.coverage [/.one_expansion] (bit#= (not (n.= 1 repetitions)) - (|> (/.one_expansion (` (..repeated (~ (code.nat repetitions)) (~ pow/1)))) + (|> (/.one_expansion (` (..repeated (, (code.nat repetitions)) (, pow/1)))) (meta.result lux) (!expect {try.#Failure _})))) (_.coverage [/.final] @@ -178,7 +178,7 @@ <actual> (/.times <cycles> (..iterated <max> <expected>))] (let [expected_remaining (n.- <cycles> <max>)] (case (` <actual>) - (^.` (..iterated (~ [_ {.#Nat actual_remaining}]) (~ [_ {.#Nat actual}]))) + (^.` (..iterated (, [_ {.#Nat actual_remaining}]) (, [_ {.#Nat actual}]))) (and (n.= expected_remaining actual_remaining) (n.= <expected> actual)) diff --git a/stdlib/source/test/lux/macro/local.lux b/stdlib/source/test/lux/macro/local.lux index eb904eed8..75b8b68ca 100644 --- a/stdlib/source/test/lux/macro/local.lux +++ b/stdlib/source/test/lux/macro/local.lux @@ -64,9 +64,10 @@ {try.#Success [(revised .#modules (property.revised module remove_macro!) lux) []]})) (in []))] - (let [pre_expansion (` (let [(~ g!output) (~ body)] - (exec (~ pop!) - (~ g!output))))] + (let [pre_expansion (` (let [(, g!output) (, body)] + (exec + (, pop!) + (, g!output))))] (if pre_remove (macro.full_expansion pre_expansion) (in (list pre_expansion)))))))) diff --git a/stdlib/source/test/lux/macro/syntax.lux b/stdlib/source/test/lux/macro/syntax.lux index 84304452c..5c6b392f1 100644 --- a/stdlib/source/test/lux/macro/syntax.lux +++ b/stdlib/source/test/lux/macro/syntax.lux @@ -26,7 +26,7 @@ (/.syntax (_ [a <code>.any b <code>.any c <code>.any]) - (in (list (` (all n.+ (~ a) (~ b) (~ c))))))) + (in (list (` (all n.+ (, a) (, b) (, c))))))) (def .public test Test diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index d279edfeb..1269484f8 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -53,7 +53,7 @@ (_.coverage [/.spliced] (at (list.equivalence nat.equivalence) = (list left mid right) - (`` (list (~~ (/.spliced [left mid right])))))) + (`` (list (,, (/.spliced [left mid right])))))) (_.coverage [/.amount] (case (/.amount [left mid right]) 3 true @@ -63,10 +63,10 @@ <short>' true _ false)) (_.coverage [/.symbol] - (and (case (`` (symbol (~~ (/.symbol <short>)))) + (and (case (`` (symbol (,, (/.symbol <short>)))) ["" <short>'] true _ false) - (case (`` (symbol (~~ (/.symbol <module> <short>)))) + (case (`` (symbol (,, (/.symbol <module> <short>)))) [<module>' <short>'] true _ false) )) diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux index ad1107e49..382b84009 100644 --- a/stdlib/source/test/lux/math.lux +++ b/stdlib/source/test/lux/math.lux @@ -58,10 +58,10 @@ parameterC (random.only (|>> (complex.= complex/0) not) random.complex) subjectC random.complex]) (`` (all _.and - (~~ (with_template [</> <scenarios>'] + (,, (with_template [</> <scenarios>'] [(_.coverage [</>] (with_expansions [<scenarios> (template.spliced <scenarios>')] - (`` (and (~~ (with_template [<=> <//> <parameter> <subject>] + (`` (and (,, (with_template [<=> <//> <parameter> <subject>] [(<=> (<//> <parameter> <subject>) (</> <parameter> <subject>))] @@ -98,10 +98,10 @@ [ratio.= ratio.% parameter/ subject/] [complex.= complex.% parameterC subjectC]]] )) - (~~ (with_template [</> <scenarios>'] + (,, (with_template [</> <scenarios>'] [(_.coverage [</>] (with_expansions [<scenarios> (template.spliced <scenarios>')] - (`` (and (~~ (with_template [<//> <parameter> <subject>] + (`` (and (,, (with_template [<//> <parameter> <subject>] [(bit#= (<//> <parameter> <subject>) (</> <parameter> <subject>))] diff --git a/stdlib/source/test/lux/math/logic/continuous.lux b/stdlib/source/test/lux/math/logic/continuous.lux index b16d7d3db..d0f0a33a1 100644 --- a/stdlib/source/test/lux/math/logic/continuous.lux +++ b/stdlib/source/test/lux/math/logic/continuous.lux @@ -21,7 +21,7 @@ mid random.rev right random.rev] (`` (all _.and - (~~ (with_template [<monoid>] + (,, (with_template [<monoid>] [(_.for [<monoid>] ($monoid.spec r.= <monoid> random.rev))] diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux index 60734f83d..5393d75ef 100644 --- a/stdlib/source/test/lux/math/modular.lux +++ b/stdlib/source/test/lux/math/modular.lux @@ -54,7 +54,7 @@ ($equivalence.spec /.equivalence (..random subject::%))) (_.for [/.order /.<] ($order.spec /.order (..random subject::%))) - (~~ (with_template [<composite> <monoid>] + (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] ($monoid.spec /.equivalence (<monoid> subject::%) (..random subject::%)))] diff --git a/stdlib/source/test/lux/math/number.lux b/stdlib/source/test/lux/math/number.lux index eee2638dc..d0142f7bf 100644 --- a/stdlib/source/test/lux/math/number.lux +++ b/stdlib/source/test/lux/math/number.lux @@ -33,7 +33,7 @@ (<| (_.covering /._) (all _.and (_.coverage [/.bin] - (`` (and (~~ (with_template [<=> <codec> <number>] + (`` (and (,, (with_template [<=> <codec> <number>] [(case (at <codec> decoded (..clean_commas <number>)) {try.#Success actual} (<=> (/.bin <number>) actual) @@ -52,7 +52,7 @@ [f.= f.binary "-11,00.10,01"] ))))) (_.coverage [/.oct] - (`` (and (~~ (with_template [<=> <codec> <number>] + (`` (and (,, (with_template [<=> <codec> <number>] [(case (at <codec> decoded (..clean_commas <number>)) {try.#Success actual} (<=> (/.oct <number>) actual) @@ -71,7 +71,7 @@ [f.= f.octal "-61,52.43"] ))))) (_.coverage [/.hex] - (`` (and (~~ (with_template [<=> <codec> <number>] + (`` (and (,, (with_template [<=> <codec> <number>] [(case (at <codec> decoded (..clean_commas <number>)) {try.#Success actual} (<=> (/.hex <number>) actual) diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index 6dd688c59..adefb43e7 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -102,7 +102,7 @@ ($hash.spec /.hash random.frac)) (_.for [/.order /.<] ($order.spec /.order random.safe_frac)) - (~~ (with_template [<composite> <monoid>] + (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] ($monoid.spec /.equivalence <monoid> ..random))] @@ -112,7 +112,7 @@ [/.min /.minimum] [/.max /.maximum] )) - (~~ (with_template [<codec>] + (,, (with_template [<codec>] [(_.for [<codec>] ($codec.spec /.equivalence <codec> random.safe_frac))] diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux index c5fb9e6a2..27f66d3a2 100644 --- a/stdlib/source/test/lux/math/number/int.lux +++ b/stdlib/source/test/lux/math/number/int.lux @@ -36,7 +36,7 @@ ($enum.spec /.enum random.int)) (_.for [/.interval] ($interval.spec /.interval random.int)) - (~~ (with_template [<monoid>] + (,, (with_template [<monoid>] [(_.for [<monoid>] ($monoid.spec /.equivalence <monoid> random.int))] @@ -46,7 +46,7 @@ [/.minimum] [/.maximum] )) - (~~ (with_template [<codec>] + (,, (with_template [<codec>] [(_.for [<codec>] ($codec.spec /.equivalence <codec> random.int))] diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux index a2ac6589b..cb31da701 100644 --- a/stdlib/source/test/lux/math/number/nat.lux +++ b/stdlib/source/test/lux/math/number/nat.lux @@ -34,7 +34,7 @@ ($enum.spec /.enum random.nat)) (_.for [/.interval] ($interval.spec /.interval random.nat)) - (~~ (with_template [<composite> <monoid>] + (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] ($monoid.spec /.equivalence <monoid> random.nat))] @@ -44,7 +44,7 @@ [/.min /.minimum] [/.max /.maximum] )) - (~~ (with_template [<codec>] + (,, (with_template [<codec>] [(_.for [<codec>] ($codec.spec /.equivalence <codec> random.nat))] diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux index 9865db7ed..ec4f2e7d5 100644 --- a/stdlib/source/test/lux/math/number/ratio.lux +++ b/stdlib/source/test/lux/math/number/ratio.lux @@ -43,7 +43,7 @@ ($equivalence.spec /.equivalence ..random)) (_.for [/.order /.<] ($order.spec /.order ..random)) - (~~ (with_template [<composite> <monoid>] + (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] ($monoid.spec /.equivalence <monoid> ..random))] diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux index 570013717..ae6de035a 100644 --- a/stdlib/source/test/lux/math/number/rev.lux +++ b/stdlib/source/test/lux/math/number/rev.lux @@ -36,7 +36,7 @@ ($enum.spec /.enum random.rev)) (_.for [/.interval] ($interval.spec /.interval random.rev)) - (~~ (with_template [<composite> <monoid>] + (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] ($monoid.spec /.equivalence <monoid> random.rev))] @@ -45,7 +45,7 @@ [/.min /.minimum] [/.max /.maximum] )) - (~~ (with_template [<codec>] + (,, (with_template [<codec>] [(_.for [<codec>] ($codec.spec /.equivalence <codec> random.rev))] @@ -58,7 +58,7 @@ (<| (_.covering /._) (_.for [.Rev]) (`` (all _.and - (~~ (with_template [<half> <whole>] + (,, (with_template [<half> <whole>] [(_.coverage [<half>] (/.= <whole> (/.+ <half> <half>)))] diff --git a/stdlib/source/test/lux/meta/code.lux b/stdlib/source/test/lux/meta/code.lux index a566b030d..49db56a18 100644 --- a/stdlib/source/test/lux/meta/code.lux +++ b/stdlib/source/test/lux/meta/code.lux @@ -77,7 +77,7 @@ (!expect {try.#Success _})) (|> (\\parser.result \\parser.any (list)) (!expect {try.#Failure _}))))) - (~~ (with_template [<query> <check> <random> <code> <equivalence>] + (,, (with_template [<query> <check> <random> <code> <equivalence>] [(do [! random.monad] [expected <random> dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))] @@ -104,7 +104,7 @@ [\\parser.global \\parser.this_global ..global /.symbol symbol.equivalence] [\\parser.symbol \\parser.this_symbol ..any_symbol /.symbol symbol.equivalence] )) - (~~ (with_template [<query> <code>] + (,, (with_template [<query> <code>] [(do [! random.monad] [expected_left random.nat expected_right random.int] @@ -246,7 +246,7 @@ (def for_format Test (`` (all _.and - (~~ (with_template [<coverage> <random> <tag>] + (,, (with_template [<coverage> <random> <tag>] [(do [! random.monad] [expected <random>] (_.coverage [<coverage>] @@ -272,7 +272,7 @@ [/.form (..random_sequence ..random) .#Form] [/.variant (..random_sequence ..random) .#Variant] [/.tuple (..random_sequence ..random) .#Tuple])) - (~~ (with_template [<coverage> <random> <tag>] + (,, (with_template [<coverage> <random> <tag>] [(do [! random.monad] [expected <random>] (_.coverage [<coverage>] diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index 59ca03061..86359c7de 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -100,7 +100,7 @@ expected_middle ..primitive expected_right ..primitive] (`` (all _.and - (~~ (with_template [<parser> <exception> <good_constructor> <bad_constructor>] + (,, (with_template [<parser> <exception> <good_constructor> <bad_constructor>] [(_.coverage [<parser> <exception>] (and (|> (\\parser.result (<parser> (all <>.and \\parser.any \\parser.any \\parser.any)) (<good_constructor> (list expected_left expected_middle expected_right))) @@ -282,7 +282,7 @@ (do [! random.monad] [expected ..primitive] (_.coverage [\\parser.empty_input] - (`` (and (~~ (with_template [<parser>] + (`` (and (,, (with_template [<parser>] [(|> (\\parser.result (do <>.monad [_ \\parser.any] <parser>) @@ -411,7 +411,7 @@ .let [(open "/#[0]") /.equivalence (open "list#[0]") (list.equivalence /.equivalence)]] (`` (all _.and - (~~ (with_template [<ctor> <dtor> <unit>] + (,, (with_template [<ctor> <dtor> <unit>] [(_.coverage [<ctor> <dtor>] (let [flat (|> members <ctor> <dtor>)] (or (list#= members flat) @@ -464,7 +464,7 @@ #1)))) .let [(open "/#[0]") /.equivalence]] (`` (all _.and - (~~ (with_template [<ctor> <dtor>] + (,, (with_template [<ctor> <dtor>] [(_.coverage [<ctor> <dtor>] (let [[flat_size flat_body] (|> body_type (<ctor> size) <dtor>)] (and (n.= size flat_size) diff --git a/stdlib/source/test/lux/meta/type/check.lux b/stdlib/source/test/lux/meta/type/check.lux index b630d37a1..d568d5b76 100644 --- a/stdlib/source/test/lux/meta/type/check.lux +++ b/stdlib/source/test/lux/meta/type/check.lux @@ -695,7 +695,7 @@ anonymousT dirty_type] (in (function (_ holeT) {.#Named [module short] (anonymousT holeT)}))) - (~~ (with_template [<tag>] + (,, (with_template [<tag>] [(do random.monad [leftT dirty_type rightT dirty_type] @@ -712,7 +712,7 @@ parameterT dirty_type] (in (function (_ holeT) {.#Primitive name (list (parameterT holeT))}))) - (~~ (with_template [<tag>] + (,, (with_template [<tag>] [(do [! random.monad] [funcT dirty_type argT dirty_type diff --git a/stdlib/source/test/lux/meta/type/resource.lux b/stdlib/source/test/lux/meta/type/resource.lux index f7d04d659..00bb863c3 100644 --- a/stdlib/source/test/lux/meta/type/resource.lux +++ b/stdlib/source/test/lux/meta/type/resource.lux @@ -33,7 +33,7 @@ .let [! identity.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and - (~~ (with_template [<coverage> <bindings>] + (,, (with_template [<coverage> <bindings>] [(_.coverage <coverage> (<| (text#= (format pre post)) (is (Identity Text)) @@ -75,7 +75,7 @@ .let [! io.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and - (~~ (with_template [<coverage> <bindings>] + (,, (with_template [<coverage> <bindings>] [(_.coverage <coverage> (<| (text#= (format pre post)) io.run! @@ -118,7 +118,7 @@ .let [! async.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and - (~~ (with_template [<coverage> <bindings>] + (,, (with_template [<coverage> <bindings>] [(in (monad.do ! [outcome (<| (is (Async Text)) (/.run! !) @@ -178,7 +178,7 @@ ..async (_.coverage [/.amount_cannot_be_zero] - (`` (and (~~ (with_template [<group|un_group>] + (`` (and (,, (with_template [<group|un_group>] [(with_error /.amount_cannot_be_zero (<group|un_group> 0))] diff --git a/stdlib/source/test/lux/meta/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index b52ddd921..8be5095df 100644 --- a/stdlib/source/test/lux/meta/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux @@ -50,7 +50,7 @@ [expected random.int] (_.for [/.Unit] (`` (all _.and - (~~ (with_template [<type> <unit>] + (,, (with_template [<type> <unit>] [(_.coverage [<type> <unit>] (|> expected (at <unit> in) @@ -85,7 +85,7 @@ right (..meter 1,000) extra (..second 1,000)] (`` (all _.and - (~~ (with_template [<q> <i>] + (,, (with_template [<q> <i>] [(_.coverage [<q>] (i.= (<i> (at /.meter out left) (at /.meter out right)) (at /.meter out (<q> left right))))] diff --git a/stdlib/source/test/lux/meta/type/unit/scale.lux b/stdlib/source/test/lux/meta/type/unit/scale.lux index 0c305912b..15b5dab9a 100644 --- a/stdlib/source/test/lux/meta/type/unit/scale.lux +++ b/stdlib/source/test/lux/meta/type/unit/scale.lux @@ -52,7 +52,7 @@ (at ! each (i.* (.int how::to))) (at ! each (at //.meter in)))] (`` (all _.and - (~~ (with_template [<type> <scale>] + (,, (with_template [<type> <scale>] [(_.coverage [<type> <scale>] (|> small (at <scale> up) @@ -65,7 +65,7 @@ [/.Mega /.mega] [/.Giga /.giga] )) - (~~ (with_template [<type> <scale>] + (,, (with_template [<type> <scale>] [(_.coverage [<type> <scale>] (|> large (at <scale> up) diff --git a/stdlib/source/test/lux/static.lux b/stdlib/source/test/lux/static.lux index 5748958f4..d67af6a0b 100644 --- a/stdlib/source/test/lux/static.lux +++ b/stdlib/source/test/lux/static.lux @@ -26,7 +26,7 @@ (for @.old (_.property "PLACEHOLDER" true)) (_.for [meta.eval]) (`` (all _.and - (~~ (with_template [<static> <random> <=> <+> <tag>] + (,, (with_template [<static> <random> <=> <+> <tag>] [(_.coverage [<static> <random>] (with_expansions [<left> (<random>) <right> (<random>) diff --git a/stdlib/source/test/lux/target/js.lux b/stdlib/source/test/lux/target/js.lux index 2494bf9b3..739381cf4 100644 --- a/stdlib/source/test/lux/target/js.lux +++ b/stdlib/source/test/lux/target/js.lux @@ -48,10 +48,10 @@ (try.else false))) (with_template [<range>] - [(`` (def (~~ (template.symbol ["as_int_" <range>])) + [(`` (def (,, (template.symbol ["as_int_" <range>])) (-> Int Int) (|>> (i64.and (static.nat (-- (i64.left_shifted <range> 1))))))) - (`` (def (~~ (template.symbol ["int_" <range>])) + (`` (def (,, (template.symbol ["int_" <range>])) (Random Int) (do [! random.monad] [negative? random.bit @@ -102,7 +102,7 @@ [left random.bit right random.bit] (`` (all _.and - (~~ (with_template [<js> <lux>] + (,, (with_template [<js> <lux>] [(_.coverage [<js>] (let [expected (<lux> left right)] (expression (|>> (as Bit) (bit#= expected)) @@ -123,7 +123,7 @@ random.safe_frac) subject random.safe_frac] (`` (all _.and - (~~ (with_template [<js> <lux>] + (,, (with_template [<js> <lux>] [(_.coverage [<js>] (let [expected (<lux> parameter subject)] (expression (|>> (as Frac) (f.= expected)) @@ -135,7 +135,7 @@ [/./ f./] [/.% f.%] )) - (~~ (with_template [<js> <lux>] + (,, (with_template [<js> <lux>] [(_.coverage [<js>] (let [expected (<lux> parameter subject)] (expression (|>> (as Bit) (bit#= expected)) @@ -159,7 +159,7 @@ i16 ..int_16 shift (at ! each (n.% 16) random.nat)] (`` (all _.and - (~~ (with_template [<js> <lux>] + (,, (with_template [<js> <lux>] [(_.coverage [<js>] (let [expected (<lux> left right)] (expression (|>> (as Frac) f.int (i.= expected)) @@ -411,7 +411,7 @@ (list (/.number number/0))))) )) (_.coverage [/.Access] - (`` (and (~~ (with_template [<js> <lux>] + (`` (and (,, (with_template [<js> <lux>] [(expression (|>> (as Frac) f.int (i.= (<lux> int/0))) (/.apply (/.closure (list $foreign) (all /.then @@ -781,7 +781,7 @@ (/.statement (/.+ $arg/0 $arg/0)) (/.return $arg/0))) (/.number number/0)))) - (~~ (with_template [<js> <lux>] + (,, (with_template [<js> <lux>] [(_.coverage [<js>] (expression (|>> (as Frac) f.int (i.= (<lux> int))) (/.apply_1 (/.closure (list $arg/0) diff --git a/stdlib/source/test/lux/target/lua.lux b/stdlib/source/test/lux/target/lua.lux index 738eb18c4..318f8ae57 100644 --- a/stdlib/source/test/lux/target/lua.lux +++ b/stdlib/source/test/lux/target/lua.lux @@ -79,7 +79,7 @@ [left random.bit right random.bit] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Bit) (bit#= expected)) @@ -94,7 +94,7 @@ )))) (with_template [<bits>] - [(`` (def (~~ (template.symbol [int_ <bits>])) + [(`` (def (,, (template.symbol [int_ <bits>])) (Random Int) (let [mask (|> 1 (i64.left_shifted (-- <bits>)) --)] (random#each (|>> (i64.and mask) .int) random.nat))))] @@ -114,7 +114,7 @@ random.int) subject random.int] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Int) (i.= expected)) @@ -153,7 +153,7 @@ random.safe_frac) subject random.safe_frac] (`` (all _.and - (~~ (with_template [</> <lux> <pre>] + (,, (with_template [</> <lux> <pre>] [(_.coverage [</>] (let [expected (<lux> (<pre> parameter) (<pre> subject))] (expression (|>> (as Frac) (f.= expected)) @@ -166,7 +166,7 @@ [/.% f.mod |>] [/.^ f.pow f.abs] )) - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> parameter subject)] (expression (|>> (as Bit) (bit#= expected)) diff --git a/stdlib/source/test/lux/target/python.lux b/stdlib/source/test/lux/target/python.lux index 8e3fb3472..ac1d84974 100644 --- a/stdlib/source/test/lux/target/python.lux +++ b/stdlib/source/test/lux/target/python.lux @@ -86,7 +86,7 @@ [left random.bit right random.bit] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Bit) (bit#= expected)) @@ -107,7 +107,7 @@ random.safe_frac) subject random.safe_frac] (`` (all _.and - (~~ (with_template [</> <lux> <pre>] + (,, (with_template [</> <lux> <pre>] [(_.coverage [</>] (let [expected (<lux> (<pre> parameter) (<pre> subject))] (expression (|>> (as Frac) (f.= expected)) @@ -120,7 +120,7 @@ [/.% f.mod |>] [/.** f.pow f.abs] )) - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> parameter subject)] (expression (|>> (as Bit) (bit#= expected)) @@ -160,7 +160,7 @@ i16 (at ! each ..int_16 random.int) shift (at ! each (n.% 16) random.nat)] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Frac) f.int (i.= expected)) @@ -170,7 +170,7 @@ [/.bit_xor i64.xor] [/.bit_and i64.and] )) - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [left (.int shift) right (i.* (.int shift) i16) @@ -451,7 +451,7 @@ field (at ! each /.string (random.upper_case 1))] (all _.and (_.coverage [/.item] - (`` (and (~~ (with_template [<seq>] + (`` (and (,, (with_template [<seq>] [(expression (|>> (as Frac) (f.= expected/0)) (/.item (/.int +0) (<seq> (list (/.float expected/0)))))] @@ -500,7 +500,7 @@ (as Frac) (f.= expected/0))) (_.coverage [/.multi] - (`` (and (~~ (with_template [<var> <value>] + (`` (and (,, (with_template [<var> <value>] [(|> (..statement (function (_ $output) (all /.then @@ -561,7 +561,7 @@ (function (_ $output) (all /.then (/.def $def (list $var/0) - (/.return (/.in? /.globals/0 (/.string (/.code $var/0))))) + (/.return (/.in? /.globals/0 (/.string (/.code $var/0))))) (/.set (list $output) (/.and (/.not (/.in? /.globals/0 (/.string (/.code $var/0)))) (/.not (/.apply (list (/.float dummy/0)) $def)))) (/.set (list $var/0) (/.float dummy/0)) @@ -573,7 +573,7 @@ (function (_ $output) (all /.then (/.def $def (list $var/0) - (/.return (/.in? /.locals/0 (/.string (/.code $var/0))))) + (/.return (/.in? /.locals/0 (/.string (/.code $var/0))))) (/.set (list $output) (/.and (/.not (/.in? /.locals/0 (/.string (/.code $var/0)))) (/.apply (list (/.float dummy/0)) $def))) (/.set (list $var/0) (/.float dummy/0)) @@ -758,7 +758,7 @@ (function (_ $output) (all /.then (/.def $def (list $input/0) - (/.return $input/0)) + (/.return $input/0)) (/.set (list $output) (/.apply (list (/.float expected/0)) $def))))) (as Frac) (f.= expected/0))) @@ -767,9 +767,9 @@ (function (_ $output) (all /.then (/.def $def (list) - (/.if (/.bool test) - (/.return (/.float then)) - (/.return (/.float else)))) + (/.if (/.bool test) + (/.return (/.float then)) + (/.return (/.float else)))) (/.set (list $output) (/.apply (list) $def))))) (as Frac) (f.= expected/?))) @@ -778,10 +778,10 @@ (function (_ $output) (all /.then (/.def $def (list) - (all /.then - (/.when (/.bool test) - (/.return (/.float then))) - (/.return (/.float else)))) + (all /.then + (/.when (/.bool test) + (/.return (/.float then))) + (/.return (/.float else)))) (/.set (list $output) (/.apply (list) $def))))) (as Frac) (f.= expected/?))) @@ -790,9 +790,9 @@ (function (_ $output) (all /.then (/.def $def (list) - (all /.then - (/.statement (/.+ (/.float expected/0) (/.float expected/0))) - (/.return (/.float expected/0)))) + (all /.then + (/.statement (/.+ (/.float expected/0) (/.float expected/0))) + (/.return (/.float expected/0)))) (/.set (list $output) (/.apply (list) $def))))) (as Frac) (f.= expected/0))) diff --git a/stdlib/source/test/lux/target/ruby.lux b/stdlib/source/test/lux/target/ruby.lux index 234fef0ef..d8c7d1605 100644 --- a/stdlib/source/test/lux/target/ruby.lux +++ b/stdlib/source/test/lux/target/ruby.lux @@ -90,7 +90,7 @@ [left random.bit right random.bit] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Bit) (bit#= expected)) @@ -111,7 +111,7 @@ random.safe_frac) subject random.safe_frac] (`` (all _.and - (~~ (with_template [</> <lux> <pre>] + (,, (with_template [</> <lux> <pre>] [(_.coverage [</>] (let [expected (<lux> (<pre> parameter) (<pre> subject))] (expression (|>> (as Frac) (f.= expected)) @@ -124,7 +124,7 @@ [/.% f.mod |>] [/.pow f.pow f.abs] )) - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> parameter subject)] (expression (|>> (as Bit) (bit#= expected)) @@ -151,7 +151,7 @@ i16 (at ! each ..int_16 random.int) shift (at ! each (n.% 16) random.nat)] (`` (all _.and - (~~ (with_template [</> <lux>] + (,, (with_template [</> <lux>] [(_.coverage [</>] (let [expected (<lux> left right)] (expression (|>> (as Frac) f.int (i.= expected)) diff --git a/stdlib/source/test/lux/time.lux b/stdlib/source/test/lux/time.lux index 656dfcdbd..62c3ec43c 100644 --- a/stdlib/source/test/lux/time.lux +++ b/stdlib/source/test/lux/time.lux @@ -67,7 +67,7 @@ invalid_minute (|> valid_minute (n.+ /.minutes) (n.min 99)) invalid_second (|> valid_second (n.+ /.seconds) (n.min 99))]] (`` (all _.and - (~~ (with_template [<cap> <exception> <prefix> <suffix> <valid> <invalid>] + (,, (with_template [<cap> <exception> <prefix> <suffix> <valid> <invalid>] [(_.coverage [<cap> <exception>] (let [valid! (|> <valid> diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux index c46204175..e73108548 100644 --- a/stdlib/source/test/lux/time/duration.lux +++ b/stdlib/source/test/lux/time/duration.lux @@ -83,7 +83,7 @@ (i.= +1 (/.ticks sample sample))) (_.coverage [/.milli_second] (#= /.empty (at /.enum pred /.milli_second))) - (~~ (with_template [<factor> <big> <small>] + (,, (with_template [<factor> <big> <small>] [(_.coverage [<big>] (|> <big> (/.ticks <small>) (i.= <factor>)))] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux index 6fb6ebd02..487daeb16 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux @@ -97,7 +97,7 @@ {try.#Failure _} false)))) - (~~ (with_template [<query> <check> <random> <analysis> <=>] + (,, (with_template [<query> <check> <random> <analysis> <=>] [(do [! random.monad] [expected <random>] (_.coverage [<query>] @@ -248,7 +248,7 @@ _ false)) - (~~ (with_template [<tag> <expected>] + (,, (with_template [<tag> <expected>] [(_.coverage [<tag>] (case (<tag> <expected>) (pattern (<tag> actual)) @@ -302,7 +302,7 @@ expected_constant (/symbol.random 1 1) expected_variable /variable.random] (`` (all _.and - (~~ (with_template [<tag> <expected>] + (,, (with_template [<tag> <expected>] [(_.coverage [<tag>] (case (<tag> <expected>) (pattern (<tag> actual)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux index e6eb4333c..49dd92a3b 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/coverage.lux @@ -85,7 +85,7 @@ [it random.bit] (in [{/.#Bit it} {//pattern.#Simple {//simple.#Bit it}}])) - (~~ (with_template [<random> <hash> <coverage> <pattern>] + (,, (with_template [<random> <hash> <coverage> <pattern>] [(do random.monad [it <random>] (in [{<coverage> (set.of_list <hash> (list it))} @@ -267,7 +267,7 @@ (/.composite {/.#Exhaustive}) (try#each (/#= {/.#Exhaustive})) (try.else false)) - (~~ (with_template [<tag> <hash> <value> <next>] + (,, (with_template [<tag> <hash> <value> <next>] [(|> (/.composite {<tag> (set.of_list <hash> (list <value>))} {<tag> (set.of_list <hash> (list (|> <value> <next>)))}) (try#each (/#= {<tag> (set.of_list <hash> (list <value> (|> <value> <next>)))})) @@ -417,7 +417,7 @@ (_.coverage [/.redundancy] (let [redundant? (..failure? /.redundancy)] (`` (and (redundant? (/.composite {/.#Exhaustive} {/.#Exhaustive})) - (~~ (with_template [<it>] + (,, (with_template [<it>] [(redundant? (/.composite <it> <it>)) (redundant? (/.composite <it> {/.#Exhaustive}))] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux index 7387ce1bc..a1bae7897 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux @@ -84,7 +84,7 @@ (def .public simple_parameter (Random [Type Code]) (`` (all random.either - (~~ (with_template [<type> <random> <code>] + (,, (with_template [<type> <random> <code>] [(random#each (|>> <code> [<type>]) <random>)] [.Bit random.bit code.bit] @@ -270,7 +270,7 @@ (not (variant? (type_literal (Maybe type/0)) 0 #1 term/1))) only_bottom_conforms_to_tags_outside_of_range! - (`` (and (~~ (with_template [<verdict> <term>] + (`` (and (,, (with_template [<verdict> <term>] [(bit#= <verdict> (variant? variantT arity arbitrary_right? <term>))] [#0 term/0] @@ -293,7 +293,7 @@ 0 #0 (' [])) existential_types_affect_dependent_cases! - (`` (and (~~ (with_template [<verdict> <term>] + (`` (and (,, (with_template [<verdict> <term>] [(bit#= <verdict> (variant?' (type_literal (Ex (_ a) (Maybe a))) {.#None} 0 #1 <term>))] [#0 term/0] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux index 6880c5ad4..567992ebc 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux @@ -94,7 +94,7 @@ (try#each (..new? hash)) (try.else false))) (_.coverage [/.import] - (`` (and (~~ (with_template [<expected>] + (`` (and (,, (with_template [<expected>] [(|> (do [! /phase.monad] [_ (/.create hash expected_import) [it ?] (/.with hash name @@ -140,7 +140,7 @@ name (random.lower_case 1) hash random.nat] (`` (all _.and - (~~ (with_template [<set> <query> <not/0> <not/1>] + (,, (with_template [<set> <query> <not/0> <not/1>] [(_.coverage [<set> <query>] (|> (do [! /phase.monad] [[it ?] (/.with hash name @@ -159,7 +159,7 @@ [/.set_cached /.cached? /.active? /.compiled?] )) (_.coverage [/.can_only_change_state_of_active_module] - (and (~~ (with_template [<pre> <post>] + (and (,, (with_template [<pre> <post>] [(|> (/.with hash name (do /phase.monad [_ (<pre> name)] @@ -180,7 +180,7 @@ [/.set_cached /.set_cached] )))) (_.coverage [/.unknown_module] - (and (~~ (with_template [<set>] + (and (,, (with_template [<set>] [(|> (<set> name) (/phase.result state) (pipe.case @@ -220,7 +220,7 @@ alias {.#Alias [module_name def_name]}]] (all _.and (_.coverage [/.define] - (`` (and (~~ (with_template [<global>] + (`` (and (,, (with_template [<global>] [(|> (/.with hash module_name (/.define def_name <global>)) (/phase.result state) @@ -242,7 +242,7 @@ {try.#Success _} true {try.#Failure _} false))))) (_.coverage [/.cannot_define_more_than_once] - (`` (and (~~ (with_template [<global>] + (`` (and (,, (with_template [<global>] [(|> (/.with hash module_name (do /phase.monad [_ (/.define def_name <global>)] @@ -289,7 +289,7 @@ (at ! each set.list))] (all _.and (_.coverage [/.declare_labels] - (`` (and (~~ (with_template [<side> <record?> <query> <on_success>] + (`` (and (,, (with_template [<side> <record?> <query> <on_success>] [(|> (/.with hash module_name (do [! /phase.monad] [.let [it {.#Named [module_name def_name] def_type}] @@ -307,7 +307,7 @@ [.#Right true meta.slot true] [.#Right true meta.tag false]))))) (_.coverage [/.cannot_declare_labels_for_anonymous_type] - (`` (and (~~ (with_template [<side> <record?>] + (`` (and (,, (with_template [<side> <record?>] [(|> (/.with hash module_name (do [! /phase.monad] [.let [it def_type] @@ -324,7 +324,7 @@ [.#Left false] [.#Right true]))))) (_.coverage [/.cannot_declare_labels_for_foreign_type] - (`` (and (~~ (with_template [<side> <record?>] + (`` (and (,, (with_template [<side> <record?>] [(|> (/.with hash module_name (do [! /phase.monad] [.let [it {.#Named [foreign_module def_name] def_type}] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux index c79fae369..7c1ab849a 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/pattern.lux @@ -61,7 +61,7 @@ _ false)) - (~~ (with_template [<tag> <value>] + (,, (with_template [<tag> <value>] [(_.coverage [<tag>] (case (<tag> <value>) (pattern (<tag> actual)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux index 0c68a9690..fd16878b1 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux @@ -80,7 +80,7 @@ (-> Lux Text [.Bit .Nat .Int .Rev .Frac .Text] Bit) (let [state [extension.#bundle (extension/analysis.bundle ..eval) extension.#state lux]] - (`` (and (~~ (with_template [<expected> <code> <type> <analysis>] + (`` (and (,, (with_template [<expected> <code> <type> <analysis>] [(|> (do phase.monad [[:it: it] (|> <expected> <code> @@ -139,7 +139,7 @@ (phase#each (|>> product.right product.right)) (phase.result state) (try.else false)) - (~~ (with_template [<lefts> <right> <expected> <tag> <code> <analysis>] + (,, (with_template [<lefts> <right> <expected> <tag> <code> <analysis>] [(|> (do phase.monad [it (|> (code.variant (list (code.nat <lefts>) (code.bit <right>) (<code> <expected>))) (/.phase ..expander archive.empty) @@ -253,7 +253,7 @@ (phase#each (|>> product.right product.right)) (phase.result state) (try.else false)) - (~~ (with_template [<lefts> <right> <expected> <tag> <code> <analysis>] + (,, (with_template [<lefts> <right> <expected> <tag> <code> <analysis>] [(|> (do phase.monad [_ (//module.declare_labels false tags/* false :variant:) [:it: it] (|> (code.variant (list (code.local <tag>) (<code> <expected>))) @@ -437,7 +437,7 @@ can_make_abstraction! (|> (do phase.monad - [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] (~ (code.nat nat/0)))) + [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= (All (_ a) (-> a .Nat)) @@ -456,9 +456,9 @@ can_nest_abstraction! (|> (do phase.monad - [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] - ([(~ $abstraction/1) (~ $parameter/1)] - (~ (code.nat nat/0))))) + [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] + ([(, $abstraction/1) (, $parameter/1)] + (, (code.nat nat/0))))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= (All (_ a) (-> a (All (_ b) (-> b .Nat)))) @@ -477,9 +477,9 @@ can_refer_to_parameter! (|> (do phase.monad - [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] - ([(~ $abstraction/1) (~ $parameter/1)] - (~ $parameter/1)))) + [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] + ([(, $abstraction/1) (, $parameter/1)] + (, $parameter/1)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= (All (_ a) (-> a (All (_ b) (-> b b)))) @@ -498,9 +498,9 @@ can_refer_to_closure! (|> (do phase.monad - [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] - ([(~ $abstraction/1) (~ $parameter/1)] - (~ $parameter/0)))) + [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] + ([(, $abstraction/1) (, $parameter/1)] + (, $parameter/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (case it @@ -524,9 +524,9 @@ can_refer_to_closure! ... TODO: Un-comment ... (|> (do phase.monad - ... [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] - ... ([(~ $abstraction/1) (~ $parameter/1)] - ... (~ $abstraction/1)))) + ... [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] + ... ([(, $abstraction/1) (, $parameter/1)] + ... (, $abstraction/1)))) ... (/.phase ..expander archive.empty) ... //type.inferring)] ... (in (case it @@ -542,9 +542,9 @@ ... (try.else false)) ... TODO: Un-comment ... (|> (do phase.monad - ... [[:it: it] (|> (` ([(~ $abstraction/0) (~ $parameter/0)] - ... ([(~ $abstraction/1) (~ $parameter/1)] - ... (~ $abstraction/0)))) + ... [[:it: it] (|> (` ([(, $abstraction/0) (, $parameter/0)] + ... ([(, $abstraction/1) (, $parameter/1)] + ... (, $abstraction/0)))) ... (/.phase ..expander archive.empty) ... //type.inferring)] ... (in (case it @@ -567,8 +567,8 @@ constant! (|> (do phase.monad - [[:it: it] (|> (` (([(~ $abstraction/0) (~ $parameter/0)] (~ (code.bit bit/0))) - (~ (code.nat nat/0)))) + [[:it: it] (|> (` (([(, $abstraction/0) (, $parameter/0)] (, (code.bit bit/0))) + (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Bit :it:) @@ -588,8 +588,8 @@ variable! (|> (do phase.monad - [[:it: it] (|> (` (([(~ $abstraction/0) (~ $parameter/0)] (~ $parameter/0)) - (~ (code.nat nat/0)))) + [[:it: it] (|> (` (([(, $abstraction/0) (, $parameter/0)] (, $parameter/0)) + (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Nat :it:) @@ -608,10 +608,10 @@ partial! (|> (do phase.monad - [[:it: it] (|> (` (([(~ $abstraction/0) (~ $parameter/0)] - ([(~ $abstraction/1) (~ $parameter/1)] - (~ (code.bit bit/0)))) - (~ (code.nat nat/0)))) + [[:it: it] (|> (` (([(, $abstraction/0) (, $parameter/0)] + ([(, $abstraction/1) (, $parameter/1)] + (, (code.bit bit/0)))) + (, (code.nat nat/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (check.subsumes? (All (_ a) (-> a Bit)) :it:) @@ -638,7 +638,7 @@ (let [state [extension.#bundle (extension/analysis.bundle ..eval) extension.#state lux]] (|> (do phase.monad - [[:it: it] (|> (` ("lux text concat" (~ (code.text text/0)) (~ (code.text text/0)))) + [[:it: it] (|> (` ("lux text concat" (, (code.text text/0)) (, (code.text text/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Text :it:) @@ -669,9 +669,9 @@ slots/* (list @any @bit @nat @int @rev @frac @text) simple! - (`` (and (~~ (with_template [<input> <code> <analysis> <pattern>] + (`` (and (,, (with_template [<input> <code> <analysis> <pattern>] [(|> (do phase.monad - [[:it: it] (|> (` ({(~ $parameter/0) (~ (code.frac frac/0))} (~ (<code> <input>)))) + [[:it: it] (|> (` ({(, $parameter/0) (, (code.frac frac/0))} (, (<code> <input>)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -691,12 +691,12 @@ (phase.result state) (try.else false)) (|> (do phase.monad - [[:it: it] (|> (` ({(~ (<code> <input>)) - (~ (code.frac frac/0)) + [[:it: it] (|> (` ({(, (<code> <input>)) + (, (code.frac frac/0)) - (~ $parameter/0) - (~ (code.frac frac/0))} - (~ (<code> <input>)))) + (, $parameter/0) + (, (code.frac frac/0))} + (, (<code> <input>)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -729,11 +729,11 @@ bit! (|> (do phase.monad [[:it: it] (|> (` ({#0 - (~ (code.frac frac/0)) + (, (code.frac frac/0)) #1 - (~ (code.frac frac/0))} - (~ (code.bit bit/0)))) + (, (code.frac frac/0))} + (, (code.bit bit/0)))) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -756,15 +756,15 @@ (try.else false)) variant! - (`` (and (~~ (with_template [<lefts> <right?> <expected> <tag> <code> <analysis> <pattern>] + (`` (and (,, (with_template [<lefts> <right?> <expected> <tag> <code> <analysis> <pattern>] [(|> (do phase.monad [_ (//module.declare_labels false tags/* false :variant:) - [:it: it] (|> (` ({{(~ (code.local <tag>)) (~ (<code> <expected>))} - (~ (code.frac frac/0)) + [:it: it] (|> (` ({{(, (code.local <tag>)) (, (<code> <expected>))} + (, (code.frac frac/0)) - (~ $parameter/0) - (~ (code.frac frac/0))} - {(~ (code.local <tag>)) (~ (<code> <expected>))})) + (, $parameter/0) + (, (code.frac frac/0))} + {(, (code.local <tag>)) (, (<code> <expected>))})) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -797,13 +797,13 @@ tuple! (|> (do phase.monad - [[:it: it] (|> (` ({[#0 (~ $parameter/0)] - (~ (code.frac frac/0)) + [[:it: it] (|> (` ({[#0 (, $parameter/0)] + (, (code.frac frac/0)) - [#1 (~ $parameter/0)] - (~ (code.frac frac/0))} - [(~ (code.bit bit/0)) - (~ (code.nat nat/0))])) + [#1 (, $parameter/0)] + (, (code.frac frac/0))} + [(, (code.bit bit/0)) + (, (code.nat nat/0))])) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -829,24 +829,24 @@ record! (|> (do phase.monad [_ (//module.declare_labels true slots/* false :record:) - [:it: it] (|> (` ({[(~ (code.symbol [module/0 @any])) [] - (~ (code.symbol [module/0 @bit])) (~ (code.bit bit/0)) - (~ (code.symbol [module/0 @nat])) (~ (code.nat nat/0)) - (~ (code.symbol [module/0 @int])) (~ (code.int int/0)) - (~ (code.symbol [module/0 @rev])) (~ (code.rev rev/0)) - (~ (code.symbol [module/0 @frac])) (~ (code.frac frac/0)) - (~ (code.symbol [module/0 @text])) (~ (code.text text/0))] - (~ (code.frac frac/0)) - - (~ $parameter/0) - (~ (code.frac frac/0))} - [(~ (code.local @any)) [] - (~ (code.local @bit)) (~ (code.bit bit/0)) - (~ (code.local @nat)) (~ (code.nat nat/0)) - (~ (code.local @int)) (~ (code.int int/0)) - (~ (code.local @rev)) (~ (code.rev rev/0)) - (~ (code.local @frac)) (~ (code.frac frac/0)) - (~ (code.local @text)) (~ (code.text text/0))])) + [:it: it] (|> (` ({[(, (code.symbol [module/0 @any])) [] + (, (code.symbol [module/0 @bit])) (, (code.bit bit/0)) + (, (code.symbol [module/0 @nat])) (, (code.nat nat/0)) + (, (code.symbol [module/0 @int])) (, (code.int int/0)) + (, (code.symbol [module/0 @rev])) (, (code.rev rev/0)) + (, (code.symbol [module/0 @frac])) (, (code.frac frac/0)) + (, (code.symbol [module/0 @text])) (, (code.text text/0))] + (, (code.frac frac/0)) + + (, $parameter/0) + (, (code.frac frac/0))} + [(, (code.local @any)) [] + (, (code.local @bit)) (, (code.bit bit/0)) + (, (code.local @nat)) (, (code.nat nat/0)) + (, (code.local @int)) (, (code.int int/0)) + (, (code.local @rev)) (, (code.rev rev/0)) + (, (code.local @frac)) (, (code.frac frac/0)) + (, (code.local @text)) (, (code.text text/0))])) (/.phase ..expander archive.empty) //type.inferring)] (in (and (type#= .Frac :it:) @@ -936,7 +936,7 @@ (..can_analyse_pattern_matching! lux module/0 [@any @bit @nat @int @rev @frac @text] [bit/0 nat/0 int/0 rev/0 frac/0 text/0] $parameter/0) )) (_.coverage [/.invalid] - (`` (and (~~ (with_template [<syntax>] + (`` (and (,, (with_template [<syntax>] [(|> (do phase.monad [_ (|> <syntax> (/.phase ..expander archive.empty) @@ -948,14 +948,14 @@ (phase.result state) (exception.otherwise (text.contains? (the exception.#label /.invalid))))] - [(` ({#0} (~ (code.bit bit/0))))] - [(` ({#0 [] #1} (~ (code.bit bit/0))))] - [(` {(~ (code.bit bit/0)) (~ (code.nat nat/0)) (~ (code.int int/0)) (~ (code.rev rev/0)) (~ (code.frac frac/0)) (~ (code.text text/0))})] - [(` {(~ (code.nat nat/0)) (~ (code.int int/0)) (~ (code.rev rev/0)) (~ (code.frac frac/0)) (~ (code.text text/0)) (~ (code.bit bit/0))})] - [(` {(~ (code.int int/0)) (~ (code.rev rev/0)) (~ (code.frac frac/0)) (~ (code.text text/0)) (~ (code.bit bit/0)) (~ (code.nat nat/0))})] - [(` {(~ (code.rev rev/0)) (~ (code.frac frac/0)) (~ (code.text text/0)) (~ (code.bit bit/0)) (~ (code.nat nat/0)) (~ (code.int int/0))})] - [(` {(~ (code.frac frac/0)) (~ (code.text text/0)) (~ (code.bit bit/0)) (~ (code.nat nat/0)) (~ (code.int int/0)) (~ (code.rev rev/0))})] - [(` {(~ (code.text text/0)) (~ (code.bit bit/0)) (~ (code.nat nat/0)) (~ (code.int int/0)) (~ (code.rev rev/0)) (~ (code.frac frac/0))})] + [(` ({#0} (, (code.bit bit/0))))] + [(` ({#0 [] #1} (, (code.bit bit/0))))] + [(` {(, (code.bit bit/0)) (, (code.nat nat/0)) (, (code.int int/0)) (, (code.rev rev/0)) (, (code.frac frac/0)) (, (code.text text/0))})] + [(` {(, (code.nat nat/0)) (, (code.int int/0)) (, (code.rev rev/0)) (, (code.frac frac/0)) (, (code.text text/0)) (, (code.bit bit/0))})] + [(` {(, (code.int int/0)) (, (code.rev rev/0)) (, (code.frac frac/0)) (, (code.text text/0)) (, (code.bit bit/0)) (, (code.nat nat/0))})] + [(` {(, (code.rev rev/0)) (, (code.frac frac/0)) (, (code.text text/0)) (, (code.bit bit/0)) (, (code.nat nat/0)) (, (code.int int/0))})] + [(` {(, (code.frac frac/0)) (, (code.text text/0)) (, (code.bit bit/0)) (, (code.nat nat/0)) (, (code.int int/0)) (, (code.rev rev/0))})] + [(` {(, (code.text text/0)) (, (code.bit bit/0)) (, (code.nat nat/0)) (, (code.int int/0)) (, (code.rev rev/0)) (, (code.frac frac/0))})] )) ))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index 35da92ea5..b905363d0 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -170,9 +170,9 @@ [$binding/0 body/0])))) handles_singletons! - (and (case? simple/0 (list [(` [(~ $binding/0)]) body/0])) - (case? simple/0 (list [(` [(~ simple/0)]) body/0] - [(` [(~ $binding/0)]) body/0])) + (and (case? simple/0 (list [(` [(, $binding/0)]) body/0])) + (case? simple/0 (list [(` [(, simple/0)]) body/0] + [(` [(, $binding/0)]) body/0])) (case? (code.bit bit/0) (list [(` [#0]) body/0] [(` [#1]) body/0]))) @@ -225,26 +225,26 @@ (case? simple/0 (list [simple/0 body/0] [$binding/0 body/0])) - (case? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) + (case? (` [(, simple/0) (, simple/1) (, simple/2)]) (list [$binding/0 body/0])) - (case? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) - (list [(` [(~ $binding/0) (~ $binding/1)]) body/0])) - (case? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) - (list [(` [(~ simple/0) (~ simple/1) (~ simple/2)]) body/0] + (case? (` [(, simple/0) (, simple/1) (, simple/2)]) + (list [(` [(, $binding/0) (, $binding/1)]) body/0])) + (case? (` [(, simple/0) (, simple/1) (, simple/2)]) + (list [(` [(, simple/0) (, simple/1) (, simple/2)]) body/0] ... 000 - [(` [(~ $binding/0) (~ simple/1) (~ simple/2)]) body/0] + [(` [(, $binding/0) (, simple/1) (, simple/2)]) body/0] ... 001 - [(` [(~ simple/0) (~ $binding/1) (~ simple/2)]) body/0] + [(` [(, simple/0) (, $binding/1) (, simple/2)]) body/0] ... 010 - [(` [(~ $binding/0) (~ $binding/1) (~ simple/2)]) body/0] + [(` [(, $binding/0) (, $binding/1) (, simple/2)]) body/0] ... 011 - [(` [(~ simple/0) (~ simple/1) (~ $binding/2)]) body/0] + [(` [(, simple/0) (, simple/1) (, $binding/2)]) body/0] ... 100 - [(` [(~ $binding/0) (~ simple/1) (~ $binding/2)]) body/0] + [(` [(, $binding/0) (, simple/1) (, $binding/2)]) body/0] ... 101 - [(` [(~ simple/0) (~ $binding/1) (~ $binding/2)]) body/0] + [(` [(, simple/0) (, $binding/1) (, $binding/2)]) body/0] ... 110 - [(` [(~ $binding/0) (~ $binding/1) (~ $binding/2)]) body/0] + [(` [(, $binding/0) (, $binding/1) (, $binding/2)]) body/0] ... 111 ))))) @@ -285,18 +285,18 @@ [$binding/0 body/0])) (redundant? simple/0 (list [$binding/0 body/0] [simple/0 body/0])) - (redundant? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) + (redundant? (` [(, simple/0) (, simple/1) (, simple/2)]) (list [$binding/0 body/0] [$binding/0 body/0])) - (redundant? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) - (list [(` [(~ $binding/0) (~ $binding/1)]) body/0] - [(` [(~ $binding/0) (~ $binding/1)]) body/0])) - (redundant? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) - (list [(` [(~ $binding/0) (~ $binding/1)]) body/0] + (redundant? (` [(, simple/0) (, simple/1) (, simple/2)]) + (list [(` [(, $binding/0) (, $binding/1)]) body/0] + [(` [(, $binding/0) (, $binding/1)]) body/0])) + (redundant? (` [(, simple/0) (, simple/1) (, simple/2)]) + (list [(` [(, $binding/0) (, $binding/1)]) body/0] [$binding/0 body/0])) - (redundant? (` [(~ simple/0) (~ simple/1) (~ simple/2)]) + (redundant? (` [(, simple/0) (, simple/1) (, simple/2)]) (list [$binding/0 body/0] - [(` [(~ $binding/0) (~ $binding/1)]) body/0]))))) + [(` [(, $binding/0) (, $binding/1)]) body/0]))))) (def (test|variant lux [module/0 name/0] [input/0 simple/0] [input/1 simple/1] [input/2 simple/2] [$binding/0 $binding/1 $binding/2] [output/0 body/0] [output/1 body/1] [bit/0 nat/0]) (-> Lux Symbol [Type Code] [Type Code] [Type Code] [Code Code Code] [Type Code] [Type Code] [Bit Nat] Bit) @@ -328,40 +328,40 @@ (try.else false)))) can_bind! - (and (variant? (` {(~ tag/0) (~ simple/0)}) + (and (variant? (` {(, tag/0) (, simple/0)}) (list [$binding/0 body/0])) - (variant? (` {(~ tag/1) (~ simple/1)}) + (variant? (` {(, tag/1) (, simple/1)}) (list [$binding/0 body/0])) - (variant? (` {(~ tag/2) (~ simple/2)}) + (variant? (` {(, tag/2) (, simple/2)}) (list [$binding/0 body/0]))) can_bind_variant! - (variant? (` {(~ tag/0) (~ simple/0)}) - (list [(` {(~ tag/0) (~ $binding/0)}) body/0] - [(` {(~ tag/1) (~ $binding/1)}) body/0] - [(` {(~ tag/2) (~ $binding/2)}) body/0])) + (variant? (` {(, tag/0) (, simple/0)}) + (list [(` {(, tag/0) (, $binding/0)}) body/0] + [(` {(, tag/1) (, $binding/1)}) body/0] + [(` {(, tag/2) (, $binding/2)}) body/0])) can_bind_sum! - (variant? (` {(~ tag/0) (~ simple/0)}) - (list [(` {0 #0 (~ $binding/0)}) body/0] - [(` {1 #0 (~ $binding/1)}) body/0] - [(` {1 #1 (~ $binding/2)}) body/0])) + (variant? (` {(, tag/0) (, simple/0)}) + (list [(` {0 #0 (, $binding/0)}) body/0] + [(` {1 #0 (, $binding/1)}) body/0] + [(` {1 #1 (, $binding/2)}) body/0])) can_check_exhaustiveness! - (variant? (` {(~ tag/0) (~ simple/0)}) - (list [(` {(~ tag/0) (~ simple/0)}) body/0] - [(` {(~ tag/0) (~ $binding/0)}) body/0] + (variant? (` {(, tag/0) (, simple/0)}) + (list [(` {(, tag/0) (, simple/0)}) body/0] + [(` {(, tag/0) (, $binding/0)}) body/0] - [(` {(~ tag/1) (~ simple/1)}) body/0] - [(` {(~ tag/1) (~ $binding/1)}) body/0] + [(` {(, tag/1) (, simple/1)}) body/0] + [(` {(, tag/1) (, $binding/1)}) body/0] - [(` {(~ tag/2) (~ simple/2)}) body/0] - [(` {(~ tag/2) (~ $binding/2)}) body/0])) + [(` {(, tag/2) (, simple/2)}) body/0] + [(` {(, tag/2) (, $binding/2)}) body/0])) can_bind_partial_variant! - (variant? (` {(~ tag/0) (~ simple/0)}) - (list [(` {(~ tag/0) (~ $binding/0)}) body/0] - [(` {0 #1 (~ $binding/1)}) body/0]))] + (variant? (` {(, tag/0) (, simple/0)}) + (list [(` {(, tag/0) (, $binding/0)}) body/0] + [(` {0 #1 (, $binding/1)}) body/0]))] (and can_bind! can_bind_variant! can_bind_sum! @@ -399,92 +399,92 @@ (try.else false)))) can_bind! - (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) + (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) (list [$binding/0 body/0])) can_bind_record! - (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2)]) body/0])) + (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2)]) body/0])) can_bind_tuple! - (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ $binding/0) (~ $binding/1) (~ $binding/2)]) body/0])) + (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, $binding/0) (, $binding/1) (, $binding/2)]) body/0])) can_deduce_record! - (record? (` [(~ simple/0) - (~ simple/1) - (~ simple/2)]) - (list [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2)]) body/0])) + (record? (` [(, simple/0) + (, simple/1) + (, simple/2)]) + (list [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2)]) body/0])) can_check_exhaustiveness! - (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) body/0] + (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) body/0] ... 000 - [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) body/0] + [(` [(, slot/0) (, $binding/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) body/0] ... 001 - [(` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ simple/2)]) body/0] + [(` [(, slot/0) (, simple/0) + (, slot/1) (, $binding/1) + (, slot/2) (, simple/2)]) body/0] ... 010 - [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ simple/2)]) body/0] + [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, simple/2)]) body/0] ... 011 - [(` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ $binding/2)]) body/0] + [(` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, $binding/2)]) body/0] ... 100 - [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ $binding/2)]) body/0] + [(` [(, slot/0) (, $binding/0) + (, slot/1) (, simple/1) + (, slot/2) (, $binding/2)]) body/0] ... 101 - [(` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2)]) body/0] + [(` [(, slot/0) (, simple/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2)]) body/0] ... 110 - [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2)]) body/0] + [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2)]) body/0] ... 111 )) cannot_repeat_slot! - (not (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2) - (~ slot/2) (~ $binding/2)]) body/0]))) + (not (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2) + (, slot/2) (, $binding/2)]) body/0]))) cannot_omit_slot! - (not (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1)]) body/0]))) + (not (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1)]) body/0]))) can_bind_partial_tuple! - (record? (` [(~ slot/0) (~ simple/0) - (~ slot/1) (~ simple/1) - (~ slot/2) (~ simple/2)]) - (list [(` [(~ $binding/0) (~ $binding/1)]) body/0]))] + (record? (` [(, slot/0) (, simple/0) + (, slot/1) (, simple/1) + (, slot/2) (, simple/2)]) + (list [(` [(, $binding/0) (, $binding/1)]) body/0]))] (and can_bind! can_bind_record! can_bind_tuple! @@ -558,11 +558,11 @@ (//phase#each (|>> product.right product.right)) (//phase.result state) (exception.otherwise (text.contains? (the exception.#label /.invalid))))))] - (and (invalid? (list [(` ((~ extension/0) (~ $binding/0) (~ $binding/1) (~ $binding/2))) + (and (invalid? (list [(` ((, extension/0) (, $binding/0) (, $binding/1) (, $binding/2))) body/0])) - (invalid? (list [(` {(~ extension/0) (~ $binding/0) (~ $binding/1) (~ $binding/2)}) + (invalid? (list [(` {(, extension/0) (, $binding/0) (, $binding/1) (, $binding/2)}) body/0])) - (invalid? (list [(` {[] (~ $binding/0) (~ $binding/1) (~ $binding/2)}) + (invalid? (list [(` {[] (, $binding/0) (, $binding/1) (, $binding/2)}) body/0]))))) (_.coverage [/.sum_has_no_case] (let [tag/0 (%.code $binding/0) @@ -577,12 +577,12 @@ tag/2 (code.symbol [module/0 tag/2])] (|> (do //phase.monad [_ (//module.declare_labels false tags/* false :variant:) - analysis (|> (` {(~ tag/0) (~ simple/0)}) + analysis (|> (` {(, tag/0) (, simple/0)}) (/.case ..analysis - (list [(` {0 #0 (~ $binding/0)}) body/0] - [(` {1 #0 (~ $binding/1)}) body/0] - [(` {2 #0 (~ $binding/2)}) body/0] - [(` {2 #1 (~ $binding/2)}) body/0]) + (list [(` {0 #0 (, $binding/0)}) body/0] + [(` {1 #0 (, $binding/1)}) body/0] + [(` {2 #0 (, $binding/2)}) body/0] + [(` {2 #1 (, $binding/2)}) body/0]) archive.empty) (//type.expecting output/0))] (in false)) @@ -603,11 +603,11 @@ slot/1 (code.symbol [module/0 slot/1]) slot/2 (code.symbol [module/0 slot/2])] (and (|> (do //phase.monad - [analysis (|> (` (~ simple/0)) + [analysis (|> (` (, simple/0)) (/.case ..analysis - (list [(` {0 #0 (~ $binding/0)}) body/0] - [(` {1 #0 (~ $binding/1)}) body/0] - [(` {1 #1 (~ $binding/2)}) body/0]) + (list [(` {0 #0 (, $binding/0)}) body/0] + [(` {1 #0 (, $binding/1)}) body/0] + [(` {1 #1 (, $binding/2)}) body/0]) archive.empty) (//type.expecting output/0))] (in false)) @@ -618,11 +618,11 @@ (exception.otherwise (text.contains? (the exception.#label /.mismatch)))) (|> (do //phase.monad [_ (//module.declare_labels true slots/* false :record:) - analysis (|> (` (~ simple/0)) + analysis (|> (` (, simple/0)) (/.case ..analysis - (list [(` [(~ slot/0) (~ $binding/0) - (~ slot/1) (~ $binding/1) - (~ slot/2) (~ $binding/2)]) body/0]) + (list [(` [(, slot/0) (, $binding/0) + (, slot/1) (, $binding/1) + (, slot/2) (, $binding/2)]) body/0]) archive.empty) (//type.expecting output/0))] (in false)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux index 29da6a3cd..f8f6e693c 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -90,7 +90,7 @@ (def simple_parameter (Random [Type Code]) (`` (all random.either - (~~ (with_template [<type> <random> <code>] + (,, (with_template [<type> <random> <code>] [(random#each (|>> <code> [<type>]) <random>)] [.Bit random.bit code.bit] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index 421c41900..8c2212df4 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -134,7 +134,7 @@ (function? (type_literal ((Ex (_ a) (-> a a)) output/0)) term/0) (not (function? (type_literal ((Ex (_ a) (-> a a)) output/1)) term/0)) - (function?' (-> input/0 input/1 input/0) (` ([(~ $function/1) (~ $argument/1)] (~ $argument/0))) + (function?' (-> input/0 input/1 input/0) (` ([(, $function/1) (, $argument/1)] (, $argument/0))) (function (_ [outer body]) (and (list.empty? outer) (case body @@ -143,7 +143,7 @@ _ false)))) - (function?' (-> input/0 input/1 input/1) (` ([(~ $function/1) (~ $argument/1)] (~ $argument/1))) + (function?' (-> input/0 input/1 input/1) (` ([(, $function/1) (, $argument/1)] (, $argument/1))) (function (_ [outer body]) (and (list.empty? outer) (case body @@ -173,9 +173,9 @@ (inferring? (All (_ a) (-> a output/0)) term/0) (inferring? (All (_ a) (-> a a)) $argument/0) (inferring? (All (_ @0) (-> @0 @0 (And .Bit @0))) - (` ([(~ $function/1) (~ $argument/1)] - [("lux is" (~ $argument/0) (~ $argument/1)) - (~ $argument/1)])))))) + (` ([(, $function/1) (, $argument/1)] + [("lux is" (, $argument/0) (, $argument/1)) + (, $argument/1)])))))) (_.coverage [/.cannot_analyse] (|> (do //phase.monad [analysis (|> (/.function ..analysis function/0 argument/0 archive.empty diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux index 5f7769239..6db157abb 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/simple.lux @@ -89,7 +89,7 @@ (_.coverage [/.unit] (..analysis state module .Any /.unit (|>> (pipe.case (pattern (/analysis.unit)) true _ false)))) - (~~ (with_template [<analysis> <type> <random> <tag>] + (,, (with_template [<analysis> <type> <random> <tag>] [(do ! [sample <random>] (_.coverage [<analysis>] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index a3b9b281d..4876aa0be 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -37,7 +37,7 @@ (-> Text (List Code) Type Bit) (|> (////scope.with_scope "" (////type.with_type output_type - (_primitive.phase archive.empty (` ((~ (code.text procedure)) (~+ params)))))) + (_primitive.phase archive.empty (` ((, (code.text procedure)) (,* params)))))) (phase.result _primitive.state) (pipe.case {try.#Success _} diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index 83fc7eee2..40db9835c 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux @@ -29,7 +29,7 @@ (def (primitive offset arity next) (Scenario Synthesis) (`` (all random.either - (~~ (with_template [<synthesis> <random>] + (,, (with_template [<synthesis> <random>] [(do [! random.monad] [example (at ! each (|>> <synthesis>) <random>)] (in [next @@ -72,7 +72,7 @@ (def (reference offset arity next) (Scenario Synthesis) (`` (all random.either - (~~ (with_template [<tag> <random>] + (,, (with_template [<tag> <random>] [(do [! random.monad] [[next [exampleE exampleA]] (<random> offset arity next)] (in [next @@ -115,7 +115,7 @@ (random#in [next [//.path/pop //.path/pop]]) - (~~ (with_template [<path> <random>] + (,, (with_template [<path> <random>] [(do [! random.monad] [example (at ! each (|>> <path>) <random>)] (in [next @@ -127,7 +127,7 @@ [//.path/f64 random.frac] [//.path/text (random.unicode 1)] )) - (~~ (with_template [<path>] + (,, (with_template [<path>] [(do [! random.monad] [example (at ! each (|>> <path>) (random.or random.nat diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux index 50526091e..f45fe8dd9 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux @@ -45,7 +45,7 @@ (def .public (corresponds? analysis synthesis) (-> Analysis Synthesis Bit) (`` (case [analysis synthesis] - (~~ (with_template [<analysis> <post_analysis> <synthesis> <post_synthesis>] + (,, (with_template [<analysis> <post_analysis> <synthesis> <post_synthesis>] [[{////analysis.#Primitive {<analysis> expected}} {////synthesis.#Primitive {<synthesis> actual}}] (same? (|> expected <post_analysis>) @@ -75,7 +75,7 @@ Test (<| (_.context (%.symbol (symbol ////synthesis.#Primitive))) (`` (all _.and - (~~ (with_template [<analysis> <synthesis> <generator>] + (,, (with_template [<analysis> <synthesis> <generator>] [(do r.monad [expected <generator>] (_.property (%.symbol (symbol <synthesis>)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 11b308c86..85cb4dedc 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -179,7 +179,7 @@ {synthesis.#Seq {synthesis.#Pop} {synthesis.#Then actual_then}}}]))) (all random.either - (~~ (with_template [<tag> <random>] + (,, (with_template [<tag> <random>] [(do [! random.monad] [test <random> [expected_then actual_then] (scenario context)] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux index 98b9a71fd..a87bcbd66 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux @@ -107,7 +107,7 @@ (def comment_text^ (Random Text) - (let [char_gen (|> r.nat (r.only (|>> (n.= (`` (char (~~ (static text.new_line))))) not)))] + (let [char_gen (|> r.nat (r.only (|>> (n.= (`` (char (,, (static text.new_line))))) not)))] (do r.monad [size (|> r.nat (r#each (n.% 20)))] (r.text char_gen size)))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/synthesis.lux index f0efbce19..9f69c7972 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/synthesis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/synthesis.lux @@ -66,7 +66,7 @@ (def simple Test (`` (all _.and - (~~ (with_template [<query> <check> <random> <synthesis> <equivalence>] + (,, (with_template [<query> <check> <random> <synthesis> <equivalence>] [(do [! random.monad] [expected <random> dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))] diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux index a2d2d77bf..2e863466c 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux @@ -78,7 +78,7 @@ _ false))) - (~~ (with_template [<new> <expected>' <query> <tag> <wrong_new> <wrong_expected>'] + (,, (with_template [<new> <expected>' <query> <tag> <wrong_new> <wrong_expected>'] [(_.coverage [<new> <query>] (let [<expected> <expected>' <wrong_expected> <wrong_expected>'] @@ -119,7 +119,7 @@ [/.custom expected_name /.customs category.#Custom /.definition (is category.Definition [expected_name {.#None}])] )) (_.coverage [/.id] - (and (~~ (with_template [<new> <expected>' <name>] + (and (,, (with_template [<new> <expected>' <name>] [(let [<expected> <expected>' [@expected registry] (<new> <expected> mandatory? expected_dependencies /.empty)] (|> (/.id (<name> <expected>) registry) @@ -134,7 +134,7 @@ [/.custom expected_name |>] )))) (_.coverage [/.artifacts] - (and (~~ (with_template [<new> <query> <equivalence> <$>] + (and (,, (with_template [<new> <query> <equivalence> <$>] [(let [expected/* (list#each <$> expected_names) [ids registry] (is [(Sequence artifact.ID) /.Registry] (list#mix (function (_ expected [ids registry]) @@ -159,7 +159,7 @@ [/.custom /.customs text.equivalence (|>>)] )))) (_.coverage [/.format /.parser] - (and (~~ (with_template [<new> <expected>' <name>] + (and (,, (with_template [<new> <expected>' <name>] [(let [<expected> <expected>' [@expected before] (<new> <expected> mandatory? expected_dependencies /.empty)] (|> before diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux index 0dd66344f..bce9082e5 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux @@ -21,7 +21,7 @@ (`` (def (bad it) (-> (file.System Async) (file.System Async)) (implementation - (~~ (with_template [<name>] + (,, (with_template [<name>] [(def <name> (at it <name>))] diff --git a/stdlib/source/test/lux/tool/compiler/meta/cli.lux b/stdlib/source/test/lux/tool/compiler/meta/cli.lux index dcf28757f..28bc83c3b 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cli.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cli.lux @@ -56,7 +56,7 @@ (all _.and (_.for [/.Compilation] (`` (all _.and - (~~ (with_template [<type> <slot> <?>] + (,, (with_template [<type> <slot> <?>] [(_.coverage [<type>] (|> (list.partial "build" compilation') (<program>.result /.service) @@ -80,7 +80,7 @@ )) ))) (_.coverage [/.Interpretation] - (`` (and (~~ (with_template [<slot> <?>] + (`` (and (,, (with_template [<slot> <?>] [(|> (list.partial "repl" compilation') (<program>.result /.service) (try#each (|>> (pipe.case @@ -102,7 +102,7 @@ [/.#configuration (configuration#= configuration)] ))))) (_.coverage [/.Export] - (`` (and (~~ (with_template [<side> <?>] + (`` (and (,, (with_template [<side> <?>] [(|> (list.partial "export" export) (<program>.result /.service) (try#each (|>> (pipe.case @@ -119,7 +119,7 @@ [product.right (same? target)] ))))) (_.coverage [/.target] - (`` (and (~~ (with_template [<it>] + (`` (and (,, (with_template [<it>] [(same? target (/.target <it>))] [{/.#Compilation [/.#host_dependencies host_dependencies diff --git a/stdlib/source/test/lux/tool/compiler/meta/context.lux b/stdlib/source/test/lux/tool/compiler/meta/context.lux index 66837e5a3..d6ecdceec 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/context.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/context.lux @@ -41,7 +41,7 @@ (/.python target) (/.ruby target)) maximum (list.size contexts)] - (`` (and (~~ (with_template [<amount> <slot>] + (`` (and (,, (with_template [<amount> <slot>] [(|> contexts (list#each (the <slot>)) (set.of_list text.hash) diff --git a/stdlib/source/test/lux/tool/compiler/reference.lux b/stdlib/source/test/lux/tool/compiler/reference.lux index 73b499525..9204b53a8 100644 --- a/stdlib/source/test/lux/tool/compiler/reference.lux +++ b/stdlib/source/test/lux/tool/compiler/reference.lux @@ -49,7 +49,7 @@ (_.for [/.hash] ($hash.spec /.hash ..random)) - (~~ (with_template [<tag>] + (,, (with_template [<tag>] [(_.coverage [<tag>] (case (<tag> expected_register) (pattern (<tag> actual_register)) diff --git a/stdlib/source/test/lux/tool/compiler/version.lux b/stdlib/source/test/lux/tool/compiler/version.lux index c2824f567..24e40bd56 100644 --- a/stdlib/source/test/lux/tool/compiler/version.lux +++ b/stdlib/source/test/lux/tool/compiler/version.lux @@ -30,7 +30,7 @@ (_.coverage [/.format] (bit#= (n.= this that) (text#= (/.format this) (/.format that)))) - (~~ (with_template [<level>] + (,, (with_template [<level>] [(_.coverage [<level>] (text.contains? (%.nat (<level> this)) (/.format this)))] diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index fdb0dda38..25b652db6 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -112,10 +112,10 @@ /.f24]])] (def listing (List /.Key) - (list.together (`` (list (~~ (with_template [<definition> <keys>] + (list.together (`` (list (,, (with_template [<definition> <keys>] [((is (-> Any (List /.Key)) (function (_ _) - (`` (list (~~ (template.spliced <keys>)))))) + (`` (list (,, (template.spliced <keys>)))))) [])] <groups>)))))) @@ -148,14 +148,14 @@ (<| (_.covering /._) (_.for [/.Key]) (`` (all _.and - (~~ (with_template [<definition> <keys>] + (,, (with_template [<definition> <keys>] [<definition>] <groups>)) (_.for [/.Press] (`` (all _.and - (~~ (with_template [<pressed?> <function>] + (,, (with_template [<pressed?> <function>] [(do random.monad [key ..random .let [sample (<function> key)]] diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index ee7ed16d2..bd73d7e87 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -98,7 +98,7 @@ [/.options on_options] [/.trace on_trace])] (`` (all _.and - (~~ (with_template [<definition> <expected>] + (,, (with_template [<definition> <expected>] [(_.coverage [<definition>] (|> (<definition> "" //.empty {.#None} mock) (verification io.monad <expected>) @@ -114,13 +114,13 @@ dictionary.size))) (in (do [! async.monad] [.let [mock (/.async mock)] - (~~ (with_template [<definition> <expected>] + (,, (with_template [<definition> <expected>] [<expected> (|> (<definition> "" //.empty {.#None} mock) (verification ! <expected>))] <cases>))] (_.coverage' [/.async] - (and (~~ (with_template [<definition> <expected>] + (and (,, (with_template [<definition> <expected>] [<expected>] <cases>)))))) diff --git a/stdlib/source/test/lux/world/net/http/status.lux b/stdlib/source/test/lux/world/net/http/status.lux index 1dfd7833b..7e890002b 100644 --- a/stdlib/source/test/lux/world/net/http/status.lux +++ b/stdlib/source/test/lux/world/net/http/status.lux @@ -84,10 +84,10 @@ /.network_authentication_required]])] (def all (List //.Status) - (list.together (`` (list (~~ (with_template [<category> <status+>] + (list.together (`` (list (,, (with_template [<category> <status+>] [((is (-> Any (List //.Status)) (function (_ _) - (`` (list (~~ (template.spliced <status+>)))))) + (`` (list (,, (template.spliced <status+>)))))) 123)] <categories>)))))) @@ -112,7 +112,7 @@ Test (<| (_.covering /._) (`` (.all _.and - (~~ (with_template [<category> <status+>] + (,, (with_template [<category> <status+>] [<category>] <categories>)) diff --git a/stdlib/source/unsafe/lux/data/binary.lux b/stdlib/source/unsafe/lux/data/binary.lux index aff596957..5453bbc6b 100644 --- a/stdlib/source/unsafe/lux/data/binary.lux +++ b/stdlib/source/unsafe/lux/data/binary.lux @@ -63,10 +63,10 @@ (def .public empty (template (empty size) [(is ..Binary - (for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + (for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> - (~~ (.static @.js)) + (,, (.static @.js)) (.|> <size> .int "lux i64 f64" @@ -76,13 +76,13 @@ ("js object new" ("js constant" "Uint8Array")) (.as ..Binary)) - (~~ (.static @.python)) + (,, (.static @.python)) (.|> <size> [] ("python apply" (.as ffi.Function ("python constant" "bytearray"))) (.as ..Binary)) - (~~ (.static @.scheme)) + (,, (.static @.scheme)) (..make-bytevector <size>) ... Default @@ -93,22 +93,22 @@ (def .public size (template (size it) [(.is .Nat - (.for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + (.for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> - (~~ (.static @.js)) + (,, (.static @.js)) (.|> <it> ("js object get" "length") (.as .Frac) "lux f64 i64" .nat) - (~~ (.static @.python)) + (,, (.static @.python)) (.|> <it> (.as (array.Array (.I64 .Any))) "python array length") - (~~ (.static @.scheme)) + (,, (.static @.scheme)) (..bytevector-length [<it>]) ... Default @@ -130,10 +130,10 @@ (template (bits_8 index it) [(.<| (.as .I64) (.is (.I64 .Any)) - (`` (.for (~~ (.static @.old)) (~~ <jvm>) - (~~ (.static @.jvm)) (~~ <jvm>) + (`` (.for (,, (.static @.old)) (,, <jvm>) + (,, (.static @.jvm)) (,, <jvm>) - (~~ (.static @.js)) + (,, (.static @.js)) (.|> <it> (.as (array.Array .Frac)) ("js array read" <index>) @@ -141,12 +141,12 @@ "lux f64 i64" .i64) - (~~ (.static @.python)) + (,, (.static @.python)) (.|> <it> (.as (array.Array .I64)) ("python array read" <index>)) - (~~ (.static @.scheme)) + (,, (.static @.scheme)) (..bytevector-u8-ref [<it> <index>]) ... Default @@ -196,10 +196,10 @@ <it> (.is ..Binary it) <index> (.is .Nat index) <value> (.is (.I64 .Any) value) - <jvm_value> (`` (.for (~~ (.static @.old)) + <jvm_value> (`` (.for (,, (.static @.old)) (.as .Int <value>) - (~~ (.static @.jvm)) + (,, (.static @.jvm)) (.as (.Primitive "java.lang.Long") <value>) <value>)) <jvm_value> <jvm_value> @@ -208,10 +208,10 @@ (`` (def .public has_8! (template (has_8! index value it) [(.is ..Binary - (.for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + (.for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> - (~~ (.static @.js)) + (,, (.static @.js)) (.|> <it> (.is ..Binary) (.as (array.Array .Frac)) @@ -223,14 +223,14 @@ .as_expected)) (.as ..Binary)) - (~~ (.static @.python)) + (,, (.static @.python)) (.|> <it> (.is ..Binary) (.as (array.Array (.I64 .Any))) ("python array write" <index> (.|> <value> ("lux i64 and" <byte>) (.is (.I64 .Any)))) (.as ..Binary)) - (~~ (.static @.scheme)) + (,, (.static @.scheme)) (.let [it' <it>] (.exec (..bytevector-u8-set! [it' <index> <value>]) @@ -261,7 +261,7 @@ (template (has_64! index' value' it) [(.let [index (.is .Nat index') value (.is (.I64 .Any) value')] - (.for (~~ (.static @.scheme)) (.let [write_high (.is (.-> ..Binary ..Binary) + (.for (,, (.static @.scheme)) (.let [write_high (.is (.-> ..Binary ..Binary) (.|>> (..has_8! index ("lux i64 right-shift" 56 value)) (..has_8! ("lux i64 +" 1 index) ("lux i64 right-shift" 48 value)) (..has_8! ("lux i64 +" 2 index) ("lux i64 right-shift" 40 value)) @@ -290,8 +290,8 @@ <jvm> (ffi.of_boolean <jvm>)] (`` (def .public = (template (= reference' sample') - [(.for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + [(.for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> (.let [reference <reference> sample <sample> limit (..size reference)] @@ -313,8 +313,8 @@ <jvm> (.exec <jvm> target)] - (.for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + (.for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> ... Default (.loop (again [index 0]) @@ -334,8 +334,8 @@ <jvm>)] (inlined .public (slice offset size binary) (-> .Nat .Nat ..Binary ..Binary) - (.for (~~ (.static @.old)) <jvm> - (~~ (.static @.jvm)) <jvm> + (.for (,, (.static @.old)) <jvm> + (,, (.static @.jvm)) <jvm> ... Default (..copy! size offset binary 0 (..empty size)))))) diff --git a/stdlib/source/unsafe/lux/data/collection/array.lux b/stdlib/source/unsafe/lux/data/collection/array.lux index a4c3bf01e..cd901c24c 100644 --- a/stdlib/source/unsafe/lux/data/collection/array.lux +++ b/stdlib/source/unsafe/lux/data/collection/array.lux @@ -37,30 +37,30 @@ [((.is (.All (_ a) (.-> .Nat (..Array a))) (.function (empty size) (.as_expected - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) ("jvm anewarray" "(java.lang.Object )" size) - (~~ (.static @.jvm)) - (|> (~~ (..jvm_int size)) + (,, (.static @.jvm)) + (|> (,, (..jvm_int size)) "jvm array new object" (.is (..Array <item_type>))) - (~~ (.static @.js)) ("js array new" size) - (~~ (.static @.python)) ("python array new" size) - (~~ (.static @.lua)) ("lua array new" size) - (~~ (.static @.ruby)) ("ruby array new" size) - (~~ (.static @.php)) ("php array new" size) - (~~ (.static @.scheme)) ("scheme array new" size))))) + (,, (.static @.js)) ("js array new" size) + (,, (.static @.python)) ("python array new" size) + (,, (.static @.lua)) ("lua array new" size) + (,, (.static @.ruby)) ("ruby array new" size) + (,, (.static @.php)) ("php array new" size) + (,, (.static @.scheme)) ("scheme array new" size))))) <size>)]))) (`` (def .public size (template (size <array>) [((.is (.All (_ r w) (.-> (..Array' r w) .Nat)) (.function (size array) - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) ("jvm arraylength" array) - (~~ (.static @.jvm)) + (,, (.static @.jvm)) (.|> array "jvm array length object" "jvm conversion int-to-long" @@ -68,12 +68,12 @@ (.is <index_type>) (.as .Nat)) - (~~ (.static @.js)) ("js array length" array) - (~~ (.static @.python)) ("python array length" array) - (~~ (.static @.lua)) ("lua array length" array) - (~~ (.static @.ruby)) ("ruby array length" array) - (~~ (.static @.php)) ("php array length" array) - (~~ (.static @.scheme)) ("scheme array length" array)))) + (,, (.static @.js)) ("js array length" array) + (,, (.static @.python)) ("python array length" array) + (,, (.static @.lua)) ("lua array length" array) + (,, (.static @.ruby)) ("ruby array length" array) + (,, (.static @.php)) ("php array length" array) + (,, (.static @.scheme)) ("scheme array length" array)))) <array>)]))) (def lacks?' @@ -87,20 +87,20 @@ (.function (lacks? index array) (.let [size (..size array)] (.if ("lux i64 <" (.int size) (.int index)) - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) ("jvm object null?" ("jvm aaload" array index)) - (~~ (.static @.jvm)) + (,, (.static @.jvm)) (.|> array - ("jvm array read object" (~~ (jvm_int index))) + ("jvm array read object" (,, (jvm_int index))) "jvm object null?") - (~~ (.static @.js)) (~~ (lacks?' "js array read" "js object undefined?" index array)) - (~~ (.static @.python)) (~~ (lacks?' "python array read" "python object none?" index array)) - (~~ (.static @.lua)) (~~ (lacks?' "lua array read" "lua object nil?" index array)) - (~~ (.static @.ruby)) (~~ (lacks?' "ruby array read" "ruby object nil?" index array)) - (~~ (.static @.php)) (~~ (lacks?' "php array read" "php object null?" index array)) - (~~ (.static @.scheme)) (~~ (lacks?' "scheme array read" "scheme object nil?" index array))) + (,, (.static @.js)) (,, (lacks?' "js array read" "js object undefined?" index array)) + (,, (.static @.python)) (,, (lacks?' "python array read" "python object none?" index array)) + (,, (.static @.lua)) (,, (lacks?' "lua array read" "lua object nil?" index array)) + (,, (.static @.ruby)) (,, (lacks?' "ruby array read" "ruby object nil?" index array)) + (,, (.static @.php)) (,, (lacks?' "php array read" "php object null?" index array)) + (,, (.static @.scheme)) (,, (lacks?' "scheme array read" "scheme object nil?" index array))) .true)))) <index> <array>)]))) @@ -114,18 +114,18 @@ (.-> .Nat (..Array' r w) r)) (.function (item index array) (.as_expected - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) ("jvm aaload" array index) - (~~ (.static @.jvm)) - ("jvm array read object" (~~ (jvm_int index)) array) + (,, (.static @.jvm)) + ("jvm array read object" (,, (jvm_int index)) array) - (~~ (.static @.js)) ("js array read" index array) - (~~ (.static @.python)) ("python array read" index array) - (~~ (.static @.lua)) ("lua array read" index array) - (~~ (.static @.ruby)) ("ruby array read" index array) - (~~ (.static @.php)) ("php array read" index array) - (~~ (.static @.scheme)) ("scheme array read" index array))))) + (,, (.static @.js)) ("js array read" index array) + (,, (.static @.python)) ("python array read" index array) + (,, (.static @.lua)) ("lua array read" index array) + (,, (.static @.ruby)) ("ruby array read" index array) + (,, (.static @.php)) ("php array read" index array) + (,, (.static @.scheme)) ("scheme array read" index array))))) <index> <array>)]))) (`` (def .public has! @@ -133,20 +133,20 @@ [((.is (.All (_ r w) (.-> .Nat w (..Array' r w) (..Array' r w))) (.function (has! index value array) - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) ("jvm aastore" array index value) - (~~ (.static @.jvm)) + (,, (.static @.jvm)) (.|> array - ("jvm array write object" (~~ (jvm_int index)) value) + ("jvm array write object" (,, (jvm_int index)) value) .as_expected) - (~~ (.static @.js)) ("js array write" index (.as_expected value) array) - (~~ (.static @.python)) ("python array write" index (.as_expected value) array) - (~~ (.static @.lua)) ("lua array write" index (.as_expected value) array) - (~~ (.static @.ruby)) ("ruby array write" index (.as_expected value) array) - (~~ (.static @.php)) ("php array write" index (.as_expected value) array) - (~~ (.static @.scheme)) ("scheme array write" index (.as_expected value) array)))) + (,, (.static @.js)) ("js array write" index (.as_expected value) array) + (,, (.static @.python)) ("python array write" index (.as_expected value) array) + (,, (.static @.lua)) ("lua array write" index (.as_expected value) array) + (,, (.static @.ruby)) ("ruby array write" index (.as_expected value) array) + (,, (.static @.php)) ("php array write" index (.as_expected value) array) + (,, (.static @.scheme)) ("scheme array write" index (.as_expected value) array)))) <index> <value> <array>)]))) (`` (def .public lacks! @@ -156,18 +156,18 @@ (.function (lacks! index array) (.let [size (..size array)] (.if ("lux i64 <" (.int size) (.int index)) - (.for (~~ (.static @.old)) + (.for (,, (.static @.old)) (..has! index (.as_expected ("jvm object null")) array) - (~~ (.static @.jvm)) + (,, (.static @.jvm)) (..has! index (.as_expected (is <item_type> ("jvm object null"))) array) - (~~ (.static @.js)) ("js array delete" index array) - (~~ (.static @.python)) ("python array delete" index array) - (~~ (.static @.lua)) ("lua array delete" index array) - (~~ (.static @.ruby)) ("ruby array delete" index array) - (~~ (.static @.php)) ("php array delete" index array) - (~~ (.static @.scheme)) ("scheme array delete" index array)) + (,, (.static @.js)) ("js array delete" index array) + (,, (.static @.python)) ("python array delete" index array) + (,, (.static @.lua)) ("lua array delete" index array) + (,, (.static @.ruby)) ("ruby array delete" index array) + (,, (.static @.php)) ("php array delete" index array) + (,, (.static @.scheme)) ("scheme array delete" index array)) array)))) <index> <array>)]))) ) @@ -307,7 +307,7 @@ (.function (list|-default empty array) (.loop (again [index ("lux i64 -" 1 (..size array)) output empty]) - (.if ("lux i64 =" (~~ (.static ..underflow)) index) + (.if ("lux i64 =" (,, (.static ..underflow)) index) output (again ("lux i64 -" 1 index) (.if (..lacks? index array) @@ -320,9 +320,9 @@ [((.is (.All (_ r w) (.-> r (..Array' r w) (.List r))) (.function (list|+default default array) (.loop (again [index ("lux i64 -" 1 (..size array)) - output (`` (.is (.List (~~ (.these (~~ (.type_of default))))) + output (`` (.is (.List (,, (.these (,, (.type_of default))))) {.#End}))]) - (.if ("lux i64 =" (~~ (.static ..underflow)) index) + (.if ("lux i64 =" (,, (.static ..underflow)) index) output (again ("lux i64 -" 1 index) {.#Item (.if (..lacks? index array) @@ -337,10 +337,10 @@ (.function (list default array) (.case default {.#Some default} - (~~ (..list|+default default array)) + (,, (..list|+default default array)) {.#None} - (~~ (..list|-default {.#End} array))))) + (,, (..list|-default {.#End} array))))) <default> <array>)]))) (def .public = -- cgit v1.2.3