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. --- 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 ++-- 310 files changed, 3586 insertions(+), 3637 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 (limited to 'stdlib/source') 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 [] [(pattern (list [_ { [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 [] + (.,, (.with_template [] [($.documentation "Safe type-casting for I64 values.")] @@ -655,7 +654,7 @@ ... type ... ))]) - (.~~ (.with_template [ ] + (.,, (.with_template [ ] [($.documentation )] @@ -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 [] + (,, (with_template [] [(with_expansions [ (template.symbol [/._] ["apply_" ]) (template.text ["Lift a function of arity " " into a concatenative function of arity " "."])] @@ -82,9 +82,9 @@ ($.documentation /.right "Right-injects the top into sum.") - (~~ (with_template [ ] - [(`` ($.documentation (~~ (template.symbol [/._] [])) - (~~ (template.text [ " for " " arithmetic."]))))] + (,, (with_template [ ] + [(`` ($.documentation (,, (template.symbol [/._] [])) + (,, (template.text [ " for " " 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 [ ] [(`` (these (`` (documentation: - (format "Queries for a " (~~ (template.text [])) " value."))) + (format "Queries for a " (,, (template.text [])) " value."))) (`` (documentation: - (format "Assert a specific " (~~ (template.text [])) " value.")))))] + (format "Assert a specific " (,, (template.text [])) " 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 [ ] [(`` (documentation: - (format "Parses the next " (~~ (template.text [])) " input."))) + (format "Parses the next " (,, (template.text [])) " input."))) (`` (documentation: - (format "Checks for a specific " (~~ (template.text [])) " input.")))] + (format "Checks for a specific " (,, (template.text [])) " input.")))] [/.bit /.this_bit] [/.nat /.this_nat] @@ -46,7 +46,7 @@ (with_template [] [(`` (documentation: - (format "Parses the contents of a " (~~ (template.text [])) ".")))] + (format "Parses the contents of a " (,, (template.text [])) ".")))] [/.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 [] [(`` (documentation: - (format "Reads a JSON value as " (~~ (template.text [])) ".")))] + (format "Reads a JSON value as " (,, (template.text [])) ".")))] [/.null] [/.boolean] @@ -33,9 +33,9 @@ (with_template [ ] [(`` (documentation: - (format "Asks whether a JSON value is a " (~~ (template.text [])) "."))) + (format "Asks whether a JSON value is a " (,, (template.text [])) "."))) (`` (documentation: - (format "Ensures a JSON value is a " (~~ (template.text [])) ".")))] + (format "Ensures a JSON value is a " (,, (template.text [])) ".")))] [/.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 [ ] [(`` (documentation: - (format "Queries for a " (~~ (template.text [])) " synthesis node."))) + (format "Queries for a " (,, (template.text [])) " synthesis node."))) (`` (documentation: - (format "Checks for a specific " (~~ (template.text [])) " synthesis node.")))] + (format "Checks for a specific " (,, (template.text [])) " 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 [ ] [(`` (documentation: - (format "Produce a character" (~~ (template.text [])) " if the parser fails.")))] + (format "Produce a character" (,, (template.text [])) " if the parser fails.")))] [/.not ""] [/.not! " (as a slice)"] @@ -110,9 +110,9 @@ (with_template [ ] [(`` (documentation: - (format "Yields " (~~ (template.text [])) " characters as a single continuous text."))) + (format "Yields " (,, (template.text [])) " characters as a single continuous text."))) (`` (documentation: - (format "Yields " (~~ (template.text [])) " characters as a single continuous text (as a slice).")))] + (format "Yields " (,, (template.text [])) " 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 [] [(`` (documentation: - (format "Parses the contents of a " (~~ (template.text [])) " type.")))] + (format "Parses the contents of a " (,, (template.text [])) " 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 [] + (,, (with_template [] [(`` ($.documentation - (format "Yields value under the " (~~ (template.text [])) "imum key.")))] + (format "Yields value under the " (,, (template.text [])) "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 [ ] + (,, (with_template [ ] [($.documentation )] 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 [] + (,, (with_template [] [(`` ($.documentation (format "A " - (text.replaced "_" "-" (~~ (template.text []))) + (text.replaced "_" "-" (,, (template.text []))) " 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 [] + [(,, (with_template [] [($.documentation (let [[red green blue] (//.rgb ) [_ name] (symbol )] 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 [ ] + (,, (with_template [ ] [($.documentation (format "A JSON object field getter for " "."))] 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 [] + (,, (with_template [] [($.documentation (format "'" (/.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 [] + (,, (with_template [] [($.documentation (let [[_ name] (symbol )] (format (hex#encoded (/.start )) 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 [] + (,, (with_template [] [(`` ($.documentation - (format "The type of a (boxed) " (~~ (template.text [])) " object.")))] + (format "The type of a (boxed) " (,, (template.text [])) " object.")))] [/.Boolean] [/.Byte] @@ -36,9 +36,9 @@ [/.Character] )) - (~~ (with_template [] + (,, (with_template [] [(`` ($.documentation - (format "The type of an (unboxed) " (~~ (template.text [])) " value.")))] + (format "The type of an (unboxed) " (,, (template.text [])) " value.")))] [/.boolean] [/.byte] @@ -50,7 +50,7 @@ [/.char] )) - (~~ (with_template [ ] + (,, (with_template [ ] [(`` ($.documentation "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 [ ] + (,, (with_template [ ] [($.documentation "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 [ ] + [(,, (with_template [ ] [($.documentation (format "Given syntax for a " " number, generates a Nat, an Int, a Rev or a Frac.") [] 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 [ ] + (,, (with_template [ ] [($.documentation )] @@ -103,7 +103,7 @@ "" [(/% param subject)]) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] @@ -111,7 +111,7 @@ [/.max "Frac(tion) minimum."] )) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] 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 [ ] + (,, (with_template [ ] [($.documentation )] @@ -60,7 +60,7 @@ "Count the number of 1s in a bit-map." [(ones it)]) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] 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 [ ] + (,, (with_template [ ] [($.documentation )] @@ -63,7 +63,7 @@ [/.max "Int(eger) maximum."] )) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] 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 [ ] + (,, (with_template [ ] [($.documentation )] @@ -49,7 +49,7 @@ [/.% "Nat(ural) remainder."] )) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] 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 [ ] + (,, (with_template [ ] [($.documentation )] @@ -70,7 +70,7 @@ [/.max "Rev(olution) maximum."] )) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation )] 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 [] + [($.documentation + "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 [] + [($.documentation + "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 [] + [($.documentation + "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 [] + [($.documentation + "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 [ <$> ] + [($.documentation + "Type-casting macro for abstract/nominal types." + [(|> value + (is ) + <$> + (is ))])] + + [/.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 [] + [($.documentation + "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 [] + [($.documentation + "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 [ ] + ... [(`` ($.documentation + ... (let [numerator (the [/.ratio ratio.#numerator] ) + ... denominator (the [/.ratio ratio.#denominator] )] + ... (format "The '" (,, (template.text [])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))] + + ... [/.Kilo /.kilo] + ... [/.Mega /.mega] + ... [/.Giga /.giga] + + ... [/.Milli /.milli] + ... [/.Micro /.micro] + ... [/.Nano /.nano] + ... )) + + (,, (with_template [] + [(`` ($.documentation + (format "The '" (,, (template.text [])) "' 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 [ ] + [(,, (with_template [ ] [($.documentation (%.code (' ( (is @@ -35,7 +35,7 @@ (is ??? (value generating expression)))]) - (~~ (with_template [ ] + (,, (with_template [ ] [($.documentation (%.code (' (is ()))))] 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 [ ] + (,, (with_template [ ] [($.documentation )] 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 [] - [($.documentation - "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 [] - [($.documentation - "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 [] - [($.documentation - "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 [] - [($.documentation - "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 [ <$> ] - [($.documentation - "Type-casting macro for abstract/nominal types." - [(|> value - (is ) - <$> - (is ))])] - - [/.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 [] - [($.documentation - "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 [] - [($.documentation - "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 [ ] - [(`` ($.documentation - (let [numerator (the [/.ratio ratio.#numerator] ) - denominator (the [/.ratio ratio.#denominator] )] - (format "The '" (~~ (template.text [])) "' scale, from " (%.nat numerator) " to " (%.nat denominator) "."))))] - - [/.Kilo /.kilo] - [/.Mega /.mega] - [/.Giga /.giga] - - [/.Milli /.milli] - [/.Micro /.micro] - [/.Nano /.nano] - )) - - (~~ (with_template [] - [(`` ($.documentation - (format "The '" (~~ (template.text [])) "' 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 [] + (,, (with_template [] [($.documentation (format "A " (text.upper_cased (template.text [])) " 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 [] + [(,, (with_template [] [($.documentation (|> (template.text []) (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 [] + (,, (with_template [] [($.documentation (let [name (|> (template.text []) (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 .any)]) - (in (.list (` (all "lux text concat" (~+ fragments))))))) + (in (.list (` (all "lux text concat" (,* fragments))))))) (with_template [ ] [(def .public @@ -87,7 +87,7 @@ (Format ) (at encoded))] - (~~ (template.spliced ,))))] + (,, (template.spliced ,))))] [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| 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 ))))] - [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 [] [{ left right} - (` { (~ (type_code left)) (~ (type_code right))})]) + (` { (, (type_code left)) (, (type_code right))})]) ([.#Sum] [.#Product] [.#Function] [.#Apply]) (with_template#pattern [] [{ id} - (` { (~ (nat$ id))})]) + (` { (, (nat$ id))})]) ([.#Parameter] [.#Var] [.#Ex]) (with_template#pattern [] [{ env type} (let [env' (untemplated_list (list#each type_code env))] - (` { (~ env') (~ (type_code type))}))]) + (` { (, 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 <@> <*>) @@ -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 [ (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))] + (with_expansions [ (` (|> (, value) (, g!disjoint) ((, g!each) (function ((, g!_) (, var)) (, body')))))] (let [[var value] binding] (case var [_ {.#Symbol ["" _]}] [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) + (` ((, var) (, value) (, body'))) _ ))))) @@ -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 [ (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))] + (with_expansions [ (` (|> (, value) ((, g!each) (function ((, g!_) (, var)) (, body'))) (, g!conjoint)))] (let [[var value] binding] (case var [_ {.#Symbol ["" _]}] [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) + (` ((, var) (, value) (, body'))) _ ))))) @@ -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 [] - [(`` (def .public (~~ (template.symbol ["apply_" ])) + [(`` (def .public (,, (template.symbol ["apply_" ])) (..apply )))] [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 [] + (,, (with_template [] [(io.run! (upon! resolve ))] [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 .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 .any .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 .any expr .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 .any expr .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 (` (~! .any))))) + (list parameter (` (,! .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 (.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 .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 .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 .any body ..body prev .any]) - (in (list (` (|> (~ start) (~+ body))))))) + (in (list (` (|> (, start) (,* body))))))) (def .public let (syntax (_ [binding .any body .any prev .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 .any]) - (in (list (` (..cond [(~+ test)] [(~+ then)] - [(~+ else)] - (~ prev))))))) + (in (list (` (..cond [(,* test)] [(,* then)] + [(,* else)] + (, prev))))))) (def .public when (syntax (_ [test ..body then ..body prev .any]) - (in (list (` (..cond [(~+ test)] [(~+ then)] + (in (list (` (..cond [(,* test)] [(,* then)] [] - (~ prev))))))) + (, prev))))))) (def .public while (syntax (_ [test ..body then ..body prev .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 .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 .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 .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 .any .any)) prev .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 .text focus (<>.maybe .any)]) - (in (list (` (..remember (~ (code.text (%.date deadline))) - (~ (code.text (format " " message))) - (~+ (case focus + (in (list (` (..remember (, (code.text (%.date deadline))) + (, (code.text (format " " 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 [ ] + (`` (cond (,, (with_template [ ] [( reference key) (let [side_root (the 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 (_ ) - [((`` ("lux in-module" (~~ (static .prelude)) .wrong_syntax_error)) + [((`` ("lux in-module" (,, (static .prelude)) .wrong_syntax_error)) (symbol ))])) (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 .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 .any branches (<>.some .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 ) (abstraction ))] - (~~ (template.spliced +)))) + (,, (template.spliced +)))) (with_expansions [ (template.spliced +)] (with_template [] - [(`` (def .public (~~ (text_symbol )) + [(`` (def .public (,, (text_symbol )) (Property ) (abstraction )))] 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 [] - [(`` (def .public (~~ (text_symbol )) + [(`` (def .public (,, (text_symbol )) Media (abstraction )))] @@ -50,7 +50,7 @@ (|>> representation)) (with_template [ ] - [(`` (def .public ((~~ (text_symbol )) input) + [(`` (def .public ((,, (text_symbol )) input) (-> (Value ) Feature) (abstraction (format "(" ": " (//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 @@ (representation right))))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [Can_Chain (Generic Any) [["" and]]] @@ -113,7 +113,7 @@ (Selector ) (abstraction ))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [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 [ ] [(def .public (abstraction ))] - (~~ (template.spliced +)) + (,, (template.spliced +)) )) (template.spliced +))])) @@ -94,11 +94,11 @@ (Value ) (abstraction ))] - (~~ (template.spliced +)))) + (,, (template.spliced +)))) (with_expansions [ (template.spliced +)] (with_template [] - [(`` (def .public (~~ (..text_symbol )) + [(`` (def .public (,, (..text_symbol )) (Value ) (abstraction )))] @@ -990,7 +990,7 @@ (-> (Value Filter)) (|>>
 (list) (..apply )))]
 
-           (~~ (template.spliced +))))]
+           (,, (template.spliced +))))]
 
     [Nat (<| representation ..px n.frac)
      [[blur "blur"]]]
@@ -1115,7 +1115,7 @@
 
   (def .public (clip rectangle)
     (-> Rectangle (Value Clip))
-    (`` (..apply "rect" (list (~~ (with_template []
+    (`` (..apply "rect" (list (,, (with_template []
                                     [(representation (the  rectangle))]
 
                                     [#top] [#right] [#bottom] [#left]))))))
@@ -1260,9 +1260,9 @@
         (..apply "matrix3d")))
 
   (with_template [   ]
-    [(`` (def .public ( [(~~ (template.spliced ))])
-           (-> [(~~ (template.spliced ))] (Value Transform))
-           (|> (list (~~ (template.spliced )))
+    [(`` (def .public ( [(,, (template.spliced ))])
+           (-> [(,, (template.spliced ))] (Value Transform))
+           (|> (list (,, (template.spliced )))
                (list#each %number)
                (..apply ))))]
 
@@ -1282,9 +1282,9 @@
     )
 
   (with_template [   ]
-    [(`` (def .public ( [(~~ (template.spliced ))])
-           (-> [(~~ (template.spliced ))] (Value Transform))
-           (|> (list (~~ (template.spliced )))
+    [(`` (def .public ( [(,, (template.spliced ))])
+           (-> [(,, (template.spliced ))] (Value Transform))
+           (|> (list (,, (template.spliced )))
                (list#each ..angle)
                (..apply ))))]
 
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  Any)
             (type .public  (HTML ( )))]
 
-           (~~ (template.spliced +))))]
+           (,, (template.spliced +))))]
 
     [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 [  ]
       [{ value}
-       (` { (~ ( value))})])
+       (` { (, ( 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 .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 .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 (.segment ..big_size)
      digits (<>.lifted (at utf8.codec decoded digits))
      end .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 (.segment )
           end .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 (.segment ..magic_size)
        end .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 [ (with_template []
-                                [(pattern (.char (~~ (static ))))]
+                                [(pattern (.char (,, (static ))))]
 
                                 [..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 (.enclosed ["\@<" ">"] (symbol^ current_module))]
-    (in (` (is ((~! .Parser) Text) (~ (code.symbol symbol)))))))
+    (in (` (is ((,! .Parser) Text) (, (code.symbol symbol)))))))
 
 (def re_range^
   (Parser Code)
@@ -90,19 +90,19 @@
     [from (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted)))
      _ (.this "-")
      to (|> regex_char^ (at ! each (|>> (//.char 0) maybe.trusted)))]
-    (in (` ((~! .range) (~ (code.nat from)) (~ (code.nat to)))))))
+    (in (` ((,! .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 (.many escaped_char^)]
-    (in (` ((~! .one_of) (~ (code.text options)))))))
+    (in (` ((,! .one_of) (, (code.text options)))))))
 
 (def re_user_class^'
   (Parser Code)
@@ -112,8 +112,8 @@
                          re_range^
                          re_options^))]
     (in (case negate?
-          {.#Some _} (` ((~! .not) (all ((~! <>.either)) (~+ parts))))
-          {.#None}   (` (all ((~! <>.either)) (~+ parts)))))))
+          {.#Some _} (` ((,! .not) (all ((,! <>.either)) (,* parts))))
+          {.#None}   (` (all ((,! <>.either)) (,* parts)))))))
 
 (def re_user_class^
   (Parser Code)
@@ -123,7 +123,7 @@
                              (.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 (.this ".") (in (` (~! .any))))
-         (<>.after (.this "\d") (in (` (~! .decimal))))
-         (<>.after (.this "\D") (in (` ((~! .not) (~! .decimal)))))
-         (<>.after (.this "\s") (in (` (~! .space))))
-         (<>.after (.this "\S") (in (` ((~! .not) (~! .space)))))
-         (<>.after (.this "\w") (in (` (~! word^))))
-         (<>.after (.this "\W") (in (` ((~! .not) (~! word^)))))
-
-         (<>.after (.this "\p{Lower}") (in (` (~! .lower))))
-         (<>.after (.this "\p{Upper}") (in (` (~! .upper))))
-         (<>.after (.this "\p{Alpha}") (in (` (~! .alpha))))
-         (<>.after (.this "\p{Digit}") (in (` (~! .decimal))))
-         (<>.after (.this "\p{Alnum}") (in (` (~! .alpha_num))))
-         (<>.after (.this "\p{Space}") (in (` (~! .space))))
-         (<>.after (.this "\p{HexDigit}") (in (` (~! .hexadecimal))))
-         (<>.after (.this "\p{OctDigit}") (in (` (~! .octal))))
-         (<>.after (.this "\p{Blank}") (in (` (~! blank^))))
-         (<>.after (.this "\p{ASCII}") (in (` (~! ascii^))))
-         (<>.after (.this "\p{Contrl}") (in (` (~! control^))))
-         (<>.after (.this "\p{Punct}") (in (` (~! punct^))))
-         (<>.after (.this "\p{Graph}") (in (` (~! graph^))))
-         (<>.after (.this "\p{Print}") (in (` (~! print^))))
+         (<>.after (.this ".") (in (` (,! .any))))
+         (<>.after (.this "\d") (in (` (,! .decimal))))
+         (<>.after (.this "\D") (in (` ((,! .not) (,! .decimal)))))
+         (<>.after (.this "\s") (in (` (,! .space))))
+         (<>.after (.this "\S") (in (` ((,! .not) (,! .space)))))
+         (<>.after (.this "\w") (in (` (,! word^))))
+         (<>.after (.this "\W") (in (` ((,! .not) (,! word^)))))
+
+         (<>.after (.this "\p{Lower}") (in (` (,! .lower))))
+         (<>.after (.this "\p{Upper}") (in (` (,! .upper))))
+         (<>.after (.this "\p{Alpha}") (in (` (,! .alpha))))
+         (<>.after (.this "\p{Digit}") (in (` (,! .decimal))))
+         (<>.after (.this "\p{Alnum}") (in (` (,! .alpha_num))))
+         (<>.after (.this "\p{Space}") (in (` (,! .space))))
+         (<>.after (.this "\p{HexDigit}") (in (` (,! .hexadecimal))))
+         (<>.after (.this "\p{OctDigit}") (in (` (,! .octal))))
+         (<>.after (.this "\p{Blank}") (in (` (,! blank^))))
+         (<>.after (.this "\p{ASCII}") (in (` (,! ascii^))))
+         (<>.after (.this "\p{Contrl}") (in (` (,! control^))))
+         (<>.after (.this "\p{Punct}") (in (` (,! punct^))))
+         (<>.after (.this "\p{Graph}") (in (` (,! graph^))))
+         (<>.after (.this "\p{Print}") (in (` (,! print^))))
          )))
 
 (def re_class^
@@ -198,12 +198,12 @@
   (<>.either (do <>.monad
                [_ (.this "\")
                 id number^]
-               (in (` ((~! ..copy) (~ (code.symbol ["" (n#encoded id)]))))))
+               (in (` ((,! ..copy) (, (code.symbol ["" (n#encoded id)]))))))
              (do <>.monad
                [_ (.this "\k<")
                 captured_symbol symbol_part^
                 _ (.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 (.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 (.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 (.this ",") number^)]
-               (in (` ((~! together^) ((~! <>.at_most) (~ (code.nat limit)) (~ base))))))
+               (in (` ((,! together^) ((,! <>.at_most) (, (code.nat limit)) (, base))))))
              (do !
                [limit (<>.before (.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 .any
               branches (<>.many .any)])
     (with_symbols [g!temp]
-      (in (list.partial (` (^.multi (~ g!temp)
-                                    [((~! .result) (..regex (~ (code.text pattern))) (~ g!temp))
-                                     {try.#Success (~ (maybe.else g!temp bindings))}]))
+      (in (list.partial (` (^.multi (, g!temp)
+                                    [((,! .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 [ (for @.lua (~~ (these ..tuple_array))
-                                    (~~ (these)))]
+  (with_expansions [ (for @.lua (,, (these ..tuple_array))
+                                    (,, (these)))]
     (`` (|>> (as (array.Array Any))
              
              (array.list {.#None})
@@ -147,10 +147,10 @@
 (def .public (inspection value)
   Inspector
   (with_expansions [ (let [object (as java/lang/Object value)]
-                            (`` (<| (~~ (with_template [ ]
+                            (`` (<| (,, (with_template [ ]
                                           [(case (ffi.as  object)
                                              {.#Some value}
-                                             (`` (|> value (~~ (template.spliced ))))
+                                             (`` (|> value (,, (template.spliced ))))
                                              
                                              {.#None})]
 
@@ -187,7 +187,7 @@
          (case (ffi.type_of value)
            (^.with_template [ ]
              [
-              (`` (|> value (~~ (template.spliced ))))])
+              (`` (|> value (,, (template.spliced ))))])
            (["boolean" [(as .Bit) %.bit]]
             ["number" [(as .Frac) %.frac]]
             ["string" [(as .Text) %.text]]
@@ -222,7 +222,7 @@
          (case (..str (..type value))
            (^.with_template [  ]
              [(^.or  )
-              (`` (|> value (~~ (template.spliced ))))])
+              (`` (|> value (,, (template.spliced ))))])
            (["" "" [(as .Bit) %.bit]]
             ["" "" [(as .Int) %.int]]
             ["" "" [(as .Frac) %.frac]]
@@ -254,7 +254,7 @@
          (case (..type value)
            (^.with_template [ ]
              [
-              (`` (|> value (~~ (template.spliced ))))])
+              (`` (|> value (,, (template.spliced ))))])
            (["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 [  ]
+             (`` (cond (,, (with_template [  ]
                              [(same? (class_of ) value_class)
                               (|> value (as ) )]
 
@@ -327,7 +327,7 @@
          (case (..gettype value)
            (^.with_template [ ]
              [
-              (`` (|> value (~~ (template.spliced ))))])
+              (`` (|> value (,, (template.spliced ))))])
            (["boolean" [(as .Bit) %.bit]]
             ["integer" [(as .Int) %.int]]
             ["double" [(as .Frac) %.frac]]
@@ -351,9 +351,9 @@
            (..strval value))
 
          @.scheme
-         (`` (cond (~~ (with_template [ ]
+         (`` (cond (,, (with_template [ ]
                          [( value)
-                          (`` (|> value (~~ (template.spliced ))))]
+                          (`` (|> value (,, (template.spliced ))))]
 
                          [..boolean? [(as .Bit) %.bit]]
                          [..integer? [(as .Int) %.int]]
@@ -395,7 +395,7 @@
              [_ (.exactly Any)]
              (in (function.constant "[]")))
            
-           (~~ (with_template [ ]
+           (,, (with_template [ ]
                  [(do <>.monad
                     [_ (.sub )]
                     (in (|>> (as ) )))]
@@ -411,7 +411,7 @@
 (def (special_representation representation)
   (-> (Parser Representation) (Parser Representation))
   (`` (all <>.either
-           (~~ (with_template [ ]
+           (,, (with_template [ ]
                  [(do <>.monad
                     [_ (.sub )]
                     (in (|>> (as ) )))]
@@ -527,8 +527,8 @@
   (syntax (_ [definition .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 [ ]
       [[new_location { value}]
-       (let [documentation (`` (|> value (~~ (template.spliced ))))]
+       (let [documentation (`` (|> value (,, (template.spliced ))))]
          [(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 .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 (` ( (~ name)
-                                     (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs))
-                                       (.case ((~! )
-                                               ((~! monad.do) (~! <>.monad)
-                                                [(~+ inputs)
-                                                 (~ g!_) ]
-                                                (.at (~! <>.monad) (~' in) (~ body)))
-                                               (~ g!inputs))
-                                         {.#Right (~ g!_)}
-                                         (~ g!_)
+           (in (list (` ( (, name)
+                                     (.function ((, g!handler) (, g!name) (, g!phase) (, g!archive) (, g!inputs))
+                                       (.case ((,! )
+                                               ((,! monad.do) (,! <>.monad)
+                                                [(,* inputs)
+                                                 (, g!_) ]
+                                                (.at (,! <>.monad) (,' in) (, body)))
+                                               (, g!inputs))
+                                         {.#Right (, g!_)}
+                                         (, g!_)
 
-                                         {.#Left (~ g!error)}
-                                         ((~! phase.failure) (~ g!error)))
+                                         {.#Left (, g!error)}
+                                         ((,! phase.failure) (, g!error)))
                                        )))))))))]
 
   [.any .end .and .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 ( unboxed boxed raw)
      (-> (Type Value) Text Code Code)
      (let [unboxed (..reflection unboxed)]
-       (` (|> (~ raw)
-              (.is (.Primitive (~ (code.text 
))))
+       (` (|> (, raw)
+              (.is (.Primitive (, (code.text 
))))
               "jvm object cast"
-              (.is (.Primitive (~ (code.text ))))))))]
+              (.is (.Primitive (, (code.text ))))))))]
 
   [unbox boxed unboxed]
   [box unboxed boxed]
@@ -370,7 +370,7 @@
 (def (parameter_type value_type type)
   (-> (-> (Type Value) Code)
       (-> (Type Parameter) Code))
-  (`` (<| (~~ (with_template [  ]
+  (`` (<| (,, (with_template [  ]
                 [(case ( type)
                    {.#Some }
                    
@@ -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 [  ]
+  (`` (<| (,, (with_template [  ]
                 [(case ( type)
                    {.#Some }
                    
@@ -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 [ ]
   [(def 
@@ -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 (.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 .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 .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 .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 .any
               body .any])
-    (in (list (` ("jvm object synchronized" (~ lock) (~ body)))))))
+    (in (list (` ("jvm object synchronized" (, lock) (, body)))))))
 
 (def .public do_to
   (syntax (_ [obj .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 [   ]
@@ -1576,7 +1576,7 @@
                                                                           [(at jvm.equivalence =  unboxed)
                                                                            (with_expansions [' (template.spliced )]
                                                                              [
-                                                                              (` (.|> (~ raw) (~+ 
)))
+                                                                              (` (.|> (, raw) (,* 
)))
                                                                               (list ')])]
 
                                                                           ')]
@@ -1584,7 +1584,7 @@
                                                  ... else
                                                  [unboxed
                                                   (if 
-                                                    (` ("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 (` (~! .any)))))
+                    (list name (` (,! .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?
-                                         (` (~! .any))
-                                         (` ((~! <>.and)
-                                             (~! .any)
-                                             (~! .any))))
+                                         (` (,! .any))
+                                         (` ((,! <>.and)
+                                             (,! .any)
+                                             (,! .any))))
                                  read (if _#import_field_static?
-                                        (` (~! .end))
-                                        (` (~! .any)))]
-                             (` ((~! <>.or) (~ write) (~ read))))
+                                        (` (,! .end))
+                                        (` (,! .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 .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 [ ]
+      (`` (cond (,, (with_template [ ]
                       [(at jvm.equivalence =  type)
-                       (in (list (` ( (~ g!size)))))]
+                       (in (list (` ( (, 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 []
+        (`` (cond (,, (with_template []
                         [(text#= (..reflection ) name)
                          (case params
                            {.#End}
@@ -1912,7 +1912,7 @@
                         [jvm.double]
                         [jvm.char]))
 
-                  (~~ (with_template []
+                  (,, (with_template []
                         [(text#= (..reflection (jvm.array )) 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 [ ]
+         .let [g!extension (code.text (`` (cond (,, (with_template [ ]
                                                       [(at jvm.equivalence =
                                                            (jvm.array )
                                                            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 .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 [  ]
+        (`` (cond (,, (with_template [  ]
                         [(at jvm.equivalence =
                              (jvm.array )
                              array_jvm_type)
-                         (in (list (` (.|> ( (~ g!idx) (~ array))
+                         (in (list (` (.|> ( (, g!idx) (, array))
                                            "jvm object cast"
-                                           (.is (.Primitive (~ (code.text ))))))))]
+                                           (.is (.Primitive (, (code.text ))))))))]
 
                         [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 .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 [  ]
+        (`` (cond (,, (with_template [  ]
                         [(at jvm.equivalence =
                              (jvm.array )
                              array_jvm_type)
-                         (let [g!value (` (.|> (~ value)
-                                               (.as (.Primitive (~ (code.text ))))
+                         (let [g!value (` (.|> (, value)
+                                               (.as (.Primitive (, (code.text ))))
                                                "jvm object cast"))]
-                           (in (list (` ( (~ g!idx) (~ g!value) (~ array))))))]
+                           (in (list (` ( (, 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 [ 
@@ -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}
                            ()))
@@ -288,16 +288,16 @@
 
                   (def (lux_optional it output)
                     (-> Optional Code Code)
-                    (` (.let [(~ g!it') (~ output)]
-                         (~ (if (the #optional? it)
-                              (` (.if ( (~ g!it'))
+                    (` (.let [(, g!it') (, output)]
+                         (, (if (the #optional? it)
+                              (` (.if ( (, g!it'))
                                    {.#None}
-                                   {.#Some (~ g!it')}))
-                              (` (.if (.not ( (~ g!it')))
-                                   (~ g!it')
+                                   {.#Some (, g!it')}))
+                              (` (.if (.not ( (, 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:)
-                     (` ( (.as_expected (~ source))
-                                 [(~+ (list#each ..host_optional g!parameters))]))))))))))
+                     (` ( (.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)
-                       (` ( (~ (code.text sub))
+                       (` ( (, (code.text sub))
                                  (.as (..Object .Any)
-                                      (~ super)))))
-                     (` ( (~ (code.text head))))
+                                      (, super)))))
+                     (` ( (, (code.text head))))
                      tail)
            
            {.#End}
-           (` ( (~ (code.text class)))))))
+           (` ( (, (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:)
-                     (` ( (~ (code.text (..host_path (the #name it))))))))))))))
+              (, (<| (lux_optional :output:)
+                     (` ( (, (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:)
-                        (` ( (~ (for @.js (` ( (~ (code.text (..host_path class_name)))))
+                        (` ( (, (for @.js (` ( (, (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 (` ( (~ (code.text (%.format (..host_path class_name) "." field)))))
-                                               @.ruby (` ( (~ (code.text (%.format (..host_path class_name) "::" field)))))
-                                               (` ( (~ (code.text field))
-                                                         (~ (..imported class_name)))))))))))))))))
+                              (,* import!)
+                              (.as (, (..output_type :field:))
+                                   (, (<| (lux_optional :field:)
+                                          (for @.js (` ( (, (code.text (%.format (..host_path class_name) "." field)))))
+                                               @.ruby (` ( (, (code.text (%.format (..host_path class_name) "::" field)))))
+                                               (` ( (, (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:)
-                   (` ( (~ (code.text name)) (~ g!it))))))))))
+            (, (<| (lux_optional :field:)
+                   (` ( (, (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 (` ( (~ (code.text (%.format (..host_path class_name) "." method)))))
-                                       @.ruby (` ( (~ (code.text (%.format (..host_path class_name) "::" method)))))
-                                       (` ( (~ (code.text method))
+                                  (for @.js (` ( (, (code.text (%.format (..host_path class_name) "." method)))))
+                                       @.ruby (` ( (, (code.text (%.format (..host_path class_name) "::" method)))))
+                                       (` ( (, (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:)
-                   (` ( (~ (code.text method))
-                            (~ g!it)
-                            [(~+ (list#each ..host_optional g!parameters))])))))))))
+                   (` ( (, (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 (` ( (~ (code.text host_module)))))
+                                      (list (` ( (, (code.text host_module)))))
 
                                       {.#None}
                                       (list)))]
@@ -577,7 +577,7 @@
 
           {#Procedure it}
           (in (list (..procedure_definition host_module_import!
-                                            (` ( (~ (code.text (..host_path (the #name it))))))
+                                            (` ( (, (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 .any
                      term .any])
            (in (list (` (.<| (.as ..Function)
-                             ( (~ (code.nat (list.size inputs))))
-                             (.as (.-> [(~+ (list.repeated (list.size inputs) (` .Any)))]
+                             ( (, (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 .any
                                  [head tail] (.tuple (<>.and .local (<>.some .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 (_ )
@@ -748,7 +748,7 @@
                               .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 
@@ -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 .any)])
                                 (in (list (` (.as (..Object .Any)
-                                                  ( (~+ it))))))))
+                                                  ( (,* 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)]
      _ (.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)]
      _ (.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])
                       (.form (all <>.and (.this (' :=)) (.this (code.symbol ["" dotted_name])) .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 @@
                (.form (<>.after (.this (' ::new!))
                                       (.tuple (<>.exactly (list.size arg_decls) .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 @@
                (.form (<>.after (.this (code.symbol ["" dotted_name]))
                                       (.tuple (<>.exactly (list.size arg_decls) .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 [ ]
   [(def ( params class_name method_name arg_decls)
@@ -528,8 +528,8 @@
                   (.form (<>.after (.this (code.symbol ["" dotted_name]))
                                          (.tuple (<>.exactly (list.size arg_decls) .any)))))
         .let [arg_decls' (.is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
-       (in (`' ((~ (code.text (format  ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
-                (~' _jvm_this) (~+ args))))))]
+       (in (`' ((, (code.text (format  ":" 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 (.form (do <>.monad
@@ -1134,11 +1134,11 @@
                                                           args (.tuple (<>.exactly (list.size arg_decls) .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 (.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 .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 .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 .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 .any
               body .any])
-    (in (list (` ("jvm object synchronized" (~ lock) (~ body)))))))
+    (in (list (` ("jvm object synchronized" (, lock) (, body)))))))
 
 (def .public do_to
   (syntax (_ [obj .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 (` (~! .any)))))
+                    (list name (` (,! .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) (~! .any)])))
+                                              (` ((, getter_name) []))
+                                              (` ((, getter_name) [(, g!obj) (,! .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) (~! .any)]))
-                                                     (` ((~ setter_name) [(~ g!value) (~! .any)
-                                                                          (~ g!obj) (~! .any)])))
+                                                     (` ((, setter_name) [(, g!value) (,! .any)]))
+                                                     (` ((, setter_name) [(, g!value) (,! .any)
+                                                                          (, g!obj) (,! .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 [ ]
         [(pattern {#GenericClass  (list)})
-         (in (list (` ( (~ size)))))])
+         (in (list (` ( (, 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 .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 [ ]
             [
-             (in (list (` ( (~ array) (~ idx)))))])
+             (in (list (` ( (, 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 .any
@@ -1725,7 +1725,7 @@
         (case array_jvm_type
           (^.with_template [ ]
             [
-             (in (list (` ( (~ array) (~ idx) (~ value)))))])
+             (in (list (` ( (, 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])
-                                    (` ( (~ (code.text name)) (~ term)))))))))))
+                                    (` ( (, (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" [] ((~' ) [])
-                      (~' void)
-                      [(~+ (list#each (.function (_ [name type term])
+                     ("private" [] ((,' new) (,' self) []) [] [])
+                     ("public" "strict" "static" [] ((,' ) [])
+                      (,' 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])
-                                    (` ( (~ (code.text name)) (~ term)))))))))))
+                                    (` ( (, (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])
-                                    (` ( (~ (code.text name)) (~ term)))))))))))
+                                    (` ( (, (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])
-                                    (` ( (~+ (case name
+                                    (` ( (,* (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
                    )]
 
-                (~~ (template.spliced +))))]
+                (,, (template.spliced +))))]
 
          '
          ))]
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 []
            [(def .public  Territory 
)] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] ["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 [ ] [(def ( 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) { (~ (untemplated_partial_list spliced =inits))}]))) + (in (.` [(, g!meta) { (, (untemplated_partial_list spliced =inits))}]))) _ (do meta#monad [=elems (monad#each meta#monad untemplated_pattern elems)] - (in (.` [(~ g!meta) { (~ (untemplated_list =elems))}])))))] + (in (.` [(, g!meta) { (, (untemplated_list =elems))}])))))] [.#Form untemplated_form] [.#Variant untemplated_variant] @@ -216,7 +216,7 @@ (case pattern (..with_template [ ] [[_ { value}] - (in (.` [(~ g!meta) { (~ ( value))}]))]) + (in (.` [(, g!meta) { (, ( 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 [ ] [[_ { 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 [ (in [var - (` ((~! ..self_documenting) (' (~ var)) - (~ parser)))])] + (` ((,! ..self_documenting) (' (, var)) + (, parser)))])] (case var [_ {.#Symbol ["" _]}] @@ -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 [ <0> <+>] + (,, (with_template [ <0> <+>] [(check.subsumes? :it:) <0>] @@ -103,7 +103,7 @@ (`` (cond (check.subsumes? .I64 :it:) (phase.except ..no_arithmetic_for [:it:]) - (~~ (with_template [ <0> <+>] + (,, (with_template [ <0> <+>] [(check.subsumes? :it:) (..composite phase archive (` <+>) last prevs)] @@ -113,7 +113,7 @@ (phase.except ..no_arithmetic_for [:it:]))))))) (def .public (syntax (_ [operands (<>.some .any)]) - (in (list (` ( (~+ operands)))))))))] + (in (list (` ( (,* 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 [ <+>] + (,, (with_template [ <+>] [(check.subsumes? :it:) (..composite phase archive (` <+>) right (list left))] @@ -167,7 +167,7 @@ (def .public (syntax (_ [left .any right .any]) - (in (list (` ( (~ left) (~ right)))))))))] + (in (list (` ( (, 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 [ <+>] + (,, (with_template [ <+>] [(check.subsumes? :it:) (..composite phase archive (` <+>) right (list left))] @@ -223,7 +223,7 @@ (def .public (syntax (_ [left .any right .any]) - (in (list (` ( (~ left) (~ right)))))))))] + (in (list (` ( (, 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 .any ?imaginary (<>.maybe .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 .any ?denominator (<>.maybe .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 [] [{ idx} - (` { (~ (code.nat idx))})]) + (` { (, (code.nat idx))})]) ([.#Var] [.#Ex] [.#Parameter]) (^.with_template [] [{ left right} - (` { (~ (code left)) - (~ (code right))})]) + (` { (, (code left)) + (, (code right))})]) ([.#Sum] [.#Product] [.#Function] [.#Apply]) {.#Named name sub_type} @@ -269,8 +269,8 @@ (^.with_template [] [{ env body} - (` { (.list (~+ (list#each code env))) - (~ (code body))})]) + (` { (.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 .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 .any value (<>.maybe .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 .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 (.tuple (<>.some (<>.and .any .any))) bodyT .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 .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 .any value .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 .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 .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 .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 .any]) (with_symbols [g!_ g!type g!output] (let [g!name (code.symbol ["" name])] - (in (.list (` ((~! syntax) ((~ g!_) [(~ g!type) (~! .any)]) - ((~! do) (~! ///.monad) - [(~ g!type) ((~! ///.eval) .Type (~ g!type))] + (in (.list (` ((,! syntax) ((, g!_) [(, g!type) (,! .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 [] [{ idx} - (` { (~ (code.nat idx))})]) + (` { (, (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 [] [{ left right} - (` { (~ (code env left)) - (~ (code env right))})]) + (` { (, (code env left)) + (, (code env right))})]) ([.#Function] [.#Apply]) (^.with_template [ ] [{ left right} - (` ( (~+ (list#each (code env) ( type)))))]) + (` ( (,* (list#each (code env) ( type)))))]) ([.Union .#Sum //.flat_variant] [.Tuple .#Product //.flat_tuple]) @@ -85,6 +85,6 @@ (^.with_template [] [{ scope body} - (` { (.list (~+ (list#each (code env) scope))) - (~ (code env body))})]) + (` { (.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)] (~ ) (~ ) - (~ value))))))))] + (in (list (` ((,! //.as) [(,* type_vars)] (, ) (, ) + (, 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 .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 .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!!) - [ (~ g!context)] - [ (~ g!context)] + (in (list (` (is (All ((, g!_) (, g!!) (,* g!keys) (, g!context)) + (-> ((,! monad.Monad) (, g!!)) + (Procedure (, g!!) + [ (, g!context)] + [ (, g!context)] .Any))) - (function ((~ g!_) (~ g!!) [ (~ g!context)]) - (at (~ g!!) (~' in) [[ (~ g!context)] []]))))))))))] + (function ((, g!_) (, g!!) [ (, g!context)]) + (at (, g!!) (,' in) [[ (, 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 .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 [ ] [(def .public (..unit [])) (.type .public - (~ (..type )))] + (, (..type )))] [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 .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 [ ] [(def .public @@ -63,14 +63,14 @@ ratio.#denominator 1])) (.type .public - (~ (..type ))) + (, (..type ))) (def .public (scale [ratio.#numerator 1 ratio.#denominator ])) (.type .public - (~ (..type )))] + (, (..type )))] [ 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 .any]) (do meta.monad [pair (meta.eval (.type_literal ) - (` [(~ format) (~ expression)])) + (` [(, format) (, expression)])) .let [[format expression] (as pair)]] (in (list (format expression))))))) @@ -56,7 +56,7 @@ expression .any]) (do meta.monad [pair (meta.eval (.type_literal ) - (` [(~ format) (~ expression)])) + (` [(, format) (, expression)])) .let [[format expression] (as pair)]] (in (list#each format expression)))))) @@ -88,7 +88,7 @@ random .any]) (do meta.monad [pair (meta.eval (type_literal ) - (` [(~ format) (~ random)])) + (` [(, format) (, random)])) .let [[format random] (as pair)] seed meta.seed .let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) @@ -103,7 +103,7 @@ random .any]) (do meta.monad [pair (meta.eval (type_literal ) - (` [(~ format) (~ random)])) + (` [(, format) (, random)])) .let [[format random] (as 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 .any .any)) else .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 [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -202,16 +202,16 @@ body))) (with_template [ + + +] - [(`` (def .public ( [(~~ (template.spliced +))] function) - (-> [(~~ (template.spliced +))] (Expression Any) (Computation Any)) - (..call/* function (list (~~ (template.spliced +)))))) + [(`` (def .public ( [(,, (template.spliced +))] function) + (-> [(,, (template.spliced +))] (Expression Any) (Computation Any)) + (..call/* function (list (,, (template.spliced +)))))) (`` (with_template [ ] [(def .public ( args) - (-> [(~~ (template.spliced +))] (Computation Any)) + (-> [(,, (template.spliced +))] (Computation Any)) ( args (..var )))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [call/0 [] [] [[get_universal_time/0 "get-universal-time"] @@ -266,10 +266,10 @@ (with_template [ + +] [(`` (with_template [ ] [(def .public ( args) - (-> [(~~ (template.spliced +))] (Access Any)) + (-> [(,, (template.spliced +))] (Access Any)) (transmutation ( args (..var ))))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [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 [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive ( brand) Any) - (`` (type .public (|> Any (~~ (template.spliced +))))))] + (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -55,7 +55,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive Any) - (`` (type .public (|> (~~ (template.spliced +))))))] + (`` (type .public (|> (,, (template.spliced +))))))] [Var [Location' Computation' Expression' Code]] [Access [Location' Computation' Expression' Code]] @@ -95,7 +95,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\\" "\"] @@ -427,14 +427,14 @@ (with_template [ + + +] [(`` (def .public ( function) - (-> Expression (~~ (template.spliced +)) Computation) - (.function (_ (~~ (template.spliced +))) - (..apply function (list (~~ (template.spliced +))))))) + (-> Expression (,, (template.spliced +)) Computation) + (.function (_ (,, (template.spliced +))) + (..apply function (list (,, (template.spliced +))))))) (`` (with_template [ ] [(def .public ( (..var )))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [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 [' (template.spliced )] (`` (case local - (~~ (with_template [ ] + (,, (with_template [ ] [ (..bytecode $0 [])] ')) @@ -736,7 +736,7 @@ (-> Nat (Bytecode Any)) (with_expansions [' (template.spliced )] (`` (case local - (~~ (with_template [ ] + (,, (with_template [ ] [ (..bytecode $0 [])] ')) 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 '] ] [estimator (function (_ []) - (`` (' (hex ) (~~ (template.spliced )))))])))] + (`` (' (hex ) (,, (template.spliced )))))])))] ' ))] 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 [ ] + (,, (with_template [ ] [( (the class))] [//magic.format #magic] @@ -140,7 +140,7 @@ [//modifier.format #modifier] [//index.format #this] [//index.format #super])) - (~~ (with_template [ ] + (,, (with_template [ ] [((binaryF.sequence_16 ) (the 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 ) (`` (|>> representation - (~~ (template.spliced )) - (~~ (template.spliced )))))] + (,, (template.spliced )) + (,, (template.spliced )))))] [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 [ ] + (,, (with_template [ ] [( (the 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 [ ] + (,, (with_template [ ] [( (the 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 .any options (<>.many .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 [] + (`` (if (or (,, (with_template [] [(text#= (/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 [ ] + (`` (cond (,, (with_template [ ] [(text#= (/reflection.reflection ) class_name) {try.#Success }] 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 [] + (if (`` (or (,, (with_template [] [(at ..equivalence = (is (Type Value) ) type)] [..boolean] @@ -184,7 +184,7 @@ (def .public (void? type) (-> (Type Return) (Either (Type Value) (Type Void))) - (if (`` (or (~~ (with_template [] + (if (`` (or (,, (with_template [] [(at ..equivalence = (is (Type Return) ) 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 [ (template.symbol [ "'"])] (primitive Any) (type .public - (`` (<| Return' Value' (~~ (template.spliced )) ))))] + (`` (<| Return' Value' (,, (template.spliced )) ))))] [[] 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 [] + (if (`` (or (,, (with_template [] [(text#= (//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 [ ] + (,, (with_template [ ] [(at ..equivalence = element) (//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 [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive ( brand) Any) - (`` (type .public (|> Any (~~ (template.spliced +))))))] + (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -77,7 +77,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive Any) - (`` (type .public (|> (~~ (template.spliced +))))))] + (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] [Var [Location' Computation' Expression' Code]] @@ -123,7 +123,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -390,7 +390,7 @@ (arity_types ) (template.spliced +)] (with_template [] - [(`` (def .public ((~~ (template.symbol [ "/" ])) ) + [(`` (def .public ((,, (template.symbol [ "/" ])) ) (-> Computation) (..apply (.list ) (..var ))))] 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 [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive ( brand) Any) - (`` (type .public (|> Any (~~ (template.spliced +))))))] + (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -85,7 +85,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive .public Any) - (`` (type .public (|> (~~ (template.spliced +))))))] + (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] [Var [Location' Computation' Expression' Code]] @@ -164,7 +164,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -254,7 +254,7 @@ (..apply (.list ) function)) (with_template [] - [(`` (def .public (~~ (template.symbol [ "/" ])) + [(`` (def .public (,, (template.symbol [ "/" ])) ( (..constant ))))] ))] 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 [ ] + (`` (|>> (pipe.cond (,, (with_template [ ] [[] [(pipe.new (format "float(" text.double_quote text.double_quote ")") [])]] @@ -162,7 +162,7 @@ (.def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -467,8 +467,8 @@ [(with_expansions [ (arity_inputs ) (template.spliced +)] (with_template [] - [(`` (.def .public ((~~ (template.symbol [ "/" ])) ) - (-> (~~ (arity_types )) (Computation Any)) + [(`` (.def .public ((,, (template.symbol [ "/" ])) ) + (-> (,, (arity_types )) (Computation Any)) (..apply (.list ) (..var ))))] ))] 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 [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive .public ( kind) Any) - (`` (type .public (|> Any (~~ (template.spliced +))))))] + (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] ) @@ -36,7 +36,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive .public ( kind) Any) - (`` (type .public ( ) (|> (~~ (template.spliced +))))))] + (`` (type .public ( ) (|> (,, (template.spliced +))))))] [Var [Expression' Code]] ) @@ -139,7 +139,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -231,7 +231,7 @@ (..apply (.list ) function)) (with_template [] - [(`` (def .public (~~ (template.symbol [ "/" ])) + [(`` (def .public (,, (template.symbol [ "/" ])) (-> [] Expression) ( (..var ))))] 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 [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive ( brand) Any) - (`` (type .public (|> Any (~~ (template.spliced +))))))] + (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] [Computation [Expression' Code]] @@ -73,7 +73,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] (primitive Any) - (`` (type .public (|> (~~ (template.spliced +))))))] + (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] [Access [Location' Computation' Expression' Code]] @@ -160,7 +160,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -448,7 +448,7 @@ (representation on)))) (with_template [] - [(`` (def .public ((~~ (template.symbol [ "/*"])) attributes) + [(`` (def .public ((,, (template.symbol [ "/*"])) attributes) (-> (List Text) Statement) (..statement (..apply (list#each ..string attributes) {.#None} (..manual )))))] @@ -499,7 +499,7 @@ (arity_types ) (template.spliced +)] (with_template [] - [(`` (def .public ((~~ (template.symbol [ "/" ])) ) + [(`` (def .public ((,, (template.symbol [ "/" ])) ) (-> Computation) (..apply (.list ) {.#None} (..manual ))))] 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 [ +] [(primitive .public ( brand) Any) - (`` (type .public (|> Any (~~ (template.spliced +)))))] + (`` (type .public (|> Any (,, (template.spliced +)))))] [Expression Expression' [Code]] ) (with_template [ +] [(primitive .public Any) - (`` (type .public (|> (~~ (template.spliced +)))))] + (`` (type .public (|> (,, (template.spliced +)))))] [Var Var' [Expression' Code]] [Computation Computation' [Expression' Code]] @@ -138,7 +138,7 @@ (def safe (-> Text Text) - (`` (|>> (~~ (with_template [ ] + (`` (|>> (,, (with_template [ ] [(text.replaced )] ["\" "\\"] @@ -201,14 +201,14 @@ (with_template [ + + +] [(`` (def .public ( procedure) - (-> Expression (~~ (template.spliced +)) Computation) - (function (_ (~~ (template.spliced +))) - (..apply (list (~~ (template.spliced +))) procedure)))) + (-> Expression (,, (template.spliced +)) Computation) + (function (_ (,, (template.spliced +))) + (..apply (list (,, (template.spliced +))) procedure)))) (`` (with_template [ ] [(def .public ( (..var )))] - (~~ (template.spliced +))))] + (,, (template.spliced +))))] [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 (.tuple (<>.many .any)) condition .any]) (let [coverage (list#each (function (_ definition) - (` ((~! ..reference) (~ definition)))) + (` ((,! ..reference) (, definition)))) coverage)] - (in (list (` ((~! ) + (in (list (` ((,! ) (is (.List .Symbol) - (.list (~+ coverage))) - (~ condition))))))))] + (.list (,* coverage))) + (, condition))))))))] [coverage' ..|coverage'|] [coverage ..|coverage|] @@ -353,12 +353,12 @@ (syntax (_ [coverage (.tuple (<>.many .any)) test .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 [] + (,, (with_template [] [(def (|>> representation (at i.enum ) 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 [ ] + (,, (with_template [ ] [( (i./ (.int ) 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 .any]) (in (list (` (.<| {..#Reference} - (~ content)))))))] + (, content)))))))] [variable {reference.#Variable}] [constant {reference.#Constant}] - [local ((~! reference.local))] - [foreign ((~! reference.foreign))] + [local ((,! reference.local))] + [foreign ((,! reference.foreign))] ) (with_template [ ] 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 [ ] - [(`` (def .public ( (~~ (template.spliced )) complex) - (-> (~~ (template.spliced )) Type (Operation Type)) + [(`` (def .public ( (,, (template.spliced )) complex) + (-> (,, (template.spliced )) 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 [ ] - [(`` (def .public ( it (~~ (template.spliced )) dependencies) + [(`` (def .public ( it (,, (template.spliced )) dependencies) (All (_ anchor expression declaration) - (-> (~~ (template.spliced )) (Set unit.ID) (Operation anchor expression declaration artifact.ID))) + (-> (,, (template.spliced )) (Set unit.ID) (Operation anchor expression declaration artifact.ID))) (function (_ (^.let stateE [bundle state])) (let [[id registry'] ( it 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 [] + (`` (cond (or (,, (with_template [] [(text#= (..reflection ) name)] [jvm.boolean] @@ -597,7 +597,7 @@ (-> .Type (Operation (Type Value))) (case objectT {.#Primitive name {.#End}} - (`` (cond (~~ (with_template [] + (`` (cond (,, (with_template [] [(text#= (..reflection ) name) (phase#in )] @@ -610,7 +610,7 @@ [jvm.double] [jvm.char])) - (~~ (with_template [] + (,, (with_template [] [(text#= (..reflection (jvm.array )) name) (phase#in (jvm.array ))] @@ -986,7 +986,7 @@ (analyse archive fromC)) source_name (at ! each ..reflection (check_jvm fromT)) can_cast? (is (Operation Bit) - (`` (cond (~~ (with_template [ ] + (`` (cond (,, (with_template [ ] [(let [=primitive (reflection.reflection )] (or (and (text#= =primitive source_name) (or (text#= target_name) @@ -1175,7 +1175,7 @@ (list#each (|>> again (as (Type Parameter)))) (jvm.class name)) {.#None}) - (~~ (with_template [ ] + (,, (with_template [ ] [(case ( it) {.#Some :sub:} ( (as (Type ) (again :sub:))) @@ -1258,8 +1258,8 @@ (with_template [ ] [(`` (def - (-> ( (~~ (template.spliced ))) (List (Type Class))) - (|>> (~~ (template.symbol [ "::getExceptionTypes"])) + (-> ( (,, (template.spliced ))) (List (Type Class))) + (|>> (,, (template.symbol [ "::getExceptionTypes"])) (array.list {.#None}) (list#each ..lux_class))))] @@ -2508,7 +2508,7 @@ (^.with_template [ ] [[_ { value}] (do pool.monad - [constant (`` (|> value (~~ (template.spliced )))) + [constant (`` (|> value (,, (template.spliced )))) attribute (attribute.constant constant)] (field.field ..constant::modifier name #1 (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' (.Parser (Modifier field.Field)) (`` (all <>.either - (~~ (with_template [