From bf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 16 Mar 2022 08:37:23 -0400 Subject: De-sigil-ification: prefix : --- stdlib/source/documentation/lux.lux | 146 ++- stdlib/source/documentation/lux/abstract/codec.lux | 20 +- .../documentation/lux/control/concatenative.lux | 36 +- .../source/documentation/lux/control/exception.lux | 30 +- .../documentation/lux/control/security/policy.lux | 22 +- .../documentation/lux/data/collection/sequence.lux | 34 +- .../documentation/lux/data/collection/tree.lux | 42 +- stdlib/source/documentation/lux/debug.lux | 38 +- stdlib/source/documentation/lux/documentation.lux | 48 +- stdlib/source/documentation/lux/ffi.js.lux | 8 +- stdlib/source/documentation/lux/ffi.jvm.lux | 18 +- stdlib/source/documentation/lux/ffi.lua.lux | 8 +- stdlib/source/documentation/lux/ffi.old.lux | 14 +- stdlib/source/documentation/lux/ffi.py.lux | 10 +- stdlib/source/documentation/lux/ffi.rb.lux | 20 +- stdlib/source/documentation/lux/static.lux | 44 +- stdlib/source/documentation/lux/test.lux | 42 +- stdlib/source/documentation/lux/type.lux | 96 +- stdlib/source/documentation/lux/type/abstract.lux | 86 +- stdlib/source/documentation/lux/type/dynamic.lux | 42 +- stdlib/source/documentation/lux/type/quotient.lux | 30 +- .../source/documentation/lux/type/refinement.lux | 30 +- stdlib/source/library/lux.lux | 789 ++++++++------- stdlib/source/library/lux/abstract/apply.lux | 12 +- stdlib/source/library/lux/abstract/codec.lux | 22 +- stdlib/source/library/lux/abstract/comonad.lux | 60 +- stdlib/source/library/lux/abstract/enum.lux | 10 +- stdlib/source/library/lux/abstract/equivalence.lux | 14 +- stdlib/source/library/lux/abstract/functor.lux | 8 +- .../library/lux/abstract/functor/contravariant.lux | 12 +- stdlib/source/library/lux/abstract/hash.lux | 20 +- stdlib/source/library/lux/abstract/interval.lux | 12 +- stdlib/source/library/lux/abstract/mix.lux | 6 +- stdlib/source/library/lux/abstract/monad.lux | 66 +- .../source/library/lux/abstract/monad/indexed.lux | 40 +- stdlib/source/library/lux/abstract/monoid.lux | 12 +- stdlib/source/library/lux/abstract/order.lux | 24 +- .../source/library/lux/control/concatenative.lux | 12 +- .../library/lux/control/concurrency/actor.lux | 80 +- .../library/lux/control/concurrency/async.lux | 28 +- .../library/lux/control/concurrency/atom.lux | 20 +- .../source/library/lux/control/concurrency/frp.lux | 100 +- .../library/lux/control/concurrency/semaphore.lux | 34 +- .../source/library/lux/control/concurrency/stm.lux | 28 +- stdlib/source/library/lux/control/exception.lux | 32 +- .../source/library/lux/control/function/inline.lux | 6 +- .../source/library/lux/control/function/memo.lux | 3 +- .../source/library/lux/control/function/mutual.lux | 22 +- stdlib/source/library/lux/control/io.lux | 39 +- stdlib/source/library/lux/control/lazy.lux | 34 +- stdlib/source/library/lux/control/maybe.lux | 8 +- .../source/library/lux/control/parser/binary.lux | 26 +- stdlib/source/library/lux/control/parser/type.lux | 2 +- .../library/lux/control/security/capability.lux | 52 +- .../source/library/lux/control/security/policy.lux | 34 +- stdlib/source/library/lux/control/thread.lux | 24 +- stdlib/source/library/lux/control/try.lux | 10 +- stdlib/source/library/lux/control/writer.lux | 12 +- stdlib/source/library/lux/data/collection/bits.lux | 6 +- stdlib/source/library/lux/data/collection/list.lux | 58 +- .../library/lux/data/collection/queue/priority.lux | 58 +- .../library/lux/data/collection/sequence.lux | 28 +- .../library/lux/data/collection/set/multi.lux | 38 +- .../library/lux/data/collection/set/ordered.lux | 20 +- .../source/library/lux/data/collection/stack.lux | 40 +- .../library/lux/data/collection/tree/finger.lux | 38 +- .../library/lux/data/collection/tree/zipper.lux | 40 +- stdlib/source/library/lux/data/color.lux | 56 +- stdlib/source/library/lux/data/format/css.lux | 60 +- .../source/library/lux/data/format/css/class.lux | 6 +- stdlib/source/library/lux/data/format/css/id.lux | 6 +- .../library/lux/data/format/css/property.lux | 114 +-- .../source/library/lux/data/format/css/query.lux | 62 +- .../library/lux/data/format/css/selector.lux | 44 +- .../source/library/lux/data/format/css/style.lux | 10 +- .../source/library/lux/data/format/css/value.lux | 176 ++-- stdlib/source/library/lux/data/format/html.lux | 28 +- stdlib/source/library/lux/data/format/json.lux | 2 +- stdlib/source/library/lux/data/format/markdown.lux | 62 +- stdlib/source/library/lux/data/format/tar.lux | 64 +- stdlib/source/library/lux/data/format/xml.lux | 20 +- stdlib/source/library/lux/data/text.lux | 110 +-- stdlib/source/library/lux/data/text/buffer.lux | 76 +- stdlib/source/library/lux/data/text/encoding.lux | 16 +- .../source/library/lux/data/text/encoding/utf8.lux | 18 +- stdlib/source/library/lux/data/text/regex.lux | 64 +- .../source/library/lux/data/text/unicode/block.lux | 20 +- .../source/library/lux/data/text/unicode/set.lux | 66 +- stdlib/source/library/lux/debug.lux | 118 +-- stdlib/source/library/lux/documentation.lux | 40 +- stdlib/source/library/lux/ffi.jvm.lux | 416 ++++---- stdlib/source/library/lux/ffi.lux | 88 +- stdlib/source/library/lux/ffi.old.lux | 228 ++--- stdlib/source/library/lux/ffi.php.lux | 78 +- stdlib/source/library/lux/ffi.scm.lux | 52 +- stdlib/source/library/lux/ffi/export.jvm.lux | 18 +- stdlib/source/library/lux/locale.lux | 48 +- stdlib/source/library/lux/locale/language.lux | 8 +- stdlib/source/library/lux/locale/territory.lux | 14 +- stdlib/source/library/lux/macro.lux | 30 +- stdlib/source/library/lux/macro/local.lux | 14 +- stdlib/source/library/lux/macro/pattern.lux | 28 +- stdlib/source/library/lux/macro/syntax.lux | 82 +- stdlib/source/library/lux/macro/template.lux | 22 +- stdlib/source/library/lux/math/modular.lux | 28 +- stdlib/source/library/lux/math/modulus.lux | 46 +- stdlib/source/library/lux/math/number/frac.lux | 36 +- stdlib/source/library/lux/math/number/i16.lux | 36 +- stdlib/source/library/lux/math/number/i32.lux | 24 +- stdlib/source/library/lux/math/number/i64.lux | 102 +- stdlib/source/library/lux/math/number/i8.lux | 36 +- stdlib/source/library/lux/math/number/nat.lux | 25 +- stdlib/source/library/lux/math/number/rev.lux | 18 +- stdlib/source/library/lux/math/random.lux | 12 +- stdlib/source/library/lux/meta.lux | 104 +- stdlib/source/library/lux/meta/configuration.lux | 8 +- stdlib/source/library/lux/meta/location.lux | 8 +- stdlib/source/library/lux/program.lux | 10 +- stdlib/source/library/lux/static.lux | 14 +- stdlib/source/library/lux/target/common_lisp.lux | 60 +- stdlib/source/library/lux/target/js.lux | 190 ++-- stdlib/source/library/lux/target/jvm/bytecode.lux | 44 +- .../library/lux/target/jvm/bytecode/address.lux | 68 +- .../jvm/bytecode/environment/limit/registry.lux | 16 +- .../jvm/bytecode/environment/limit/stack.lux | 52 +- .../lux/target/jvm/bytecode/instruction.lux | 174 ++-- stdlib/source/library/lux/target/jvm/class.lux | 14 +- stdlib/source/library/lux/target/jvm/constant.lux | 16 +- .../library/lux/target/jvm/constant/pool.lux | 18 +- .../source/library/lux/target/jvm/constant/tag.lux | 36 +- .../library/lux/target/jvm/encoding/name.lux | 20 +- .../library/lux/target/jvm/encoding/signed.lux | 26 +- .../library/lux/target/jvm/encoding/unsigned.lux | 42 +- stdlib/source/library/lux/target/jvm/index.lux | 30 +- stdlib/source/library/lux/target/jvm/loader.lux | 42 +- stdlib/source/library/lux/target/jvm/modifier.lux | 58 +- .../source/library/lux/target/jvm/reflection.lux | 8 +- stdlib/source/library/lux/target/jvm/type.lux | 94 +- .../library/lux/target/jvm/type/category.lux | 12 +- .../library/lux/target/jvm/type/descriptor.lux | 68 +- .../source/library/lux/target/jvm/type/parser.lux | 24 +- .../library/lux/target/jvm/type/reflection.lux | 50 +- .../library/lux/target/jvm/type/signature.lux | 40 +- stdlib/source/library/lux/target/lua.lux | 138 +-- stdlib/source/library/lux/target/php.lux | 164 ++-- stdlib/source/library/lux/target/python.lux | 154 +-- stdlib/source/library/lux/target/r.lux | 98 +- stdlib/source/library/lux/target/ruby.lux | 140 +-- stdlib/source/library/lux/target/scheme.lux | 38 +- stdlib/source/library/lux/test.lux | 54 +- stdlib/source/library/lux/time.lux | 24 +- stdlib/source/library/lux/time/date.lux | 18 +- stdlib/source/library/lux/time/duration.lux | 82 +- stdlib/source/library/lux/time/instant.lux | 38 +- stdlib/source/library/lux/time/year.lux | 46 +- .../library/lux/tool/compiler/default/init.lux | 4 +- .../library/lux/tool/compiler/default/platform.lux | 362 +++---- .../library/lux/tool/compiler/language/lux.lux | 88 +- .../lux/tool/compiler/language/lux/analysis.lux | 6 +- .../compiler/language/lux/analysis/coverage.lux | 40 +- .../compiler/language/lux/analysis/evaluation.lux | 12 +- .../tool/compiler/language/lux/analysis/module.lux | 8 +- .../tool/compiler/language/lux/analysis/scope.lux | 30 +- .../tool/compiler/language/lux/analysis/type.lux | 2 +- .../lux/tool/compiler/language/lux/generation.lux | 26 +- .../compiler/language/lux/phase/analysis/case.lux | 36 +- .../language/lux/phase/analysis/complex.lux | 10 +- .../tool/compiler/language/lux/phase/directive.lux | 2 +- .../language/lux/phase/extension/analysis/jvm.lux | 154 +-- .../language/lux/phase/extension/analysis/lux.lux | 6 +- .../language/lux/phase/extension/directive/jvm.lux | 42 +- .../language/lux/phase/extension/directive/lux.lux | 42 +- .../extension/generation/common_lisp/common.lux | 78 +- .../lux/phase/extension/generation/js/common.lux | 22 +- .../lux/phase/extension/generation/js/host.lux | 6 +- .../lux/phase/extension/generation/jvm/common.lux | 38 +- .../lux/phase/extension/generation/jvm/host.lux | 32 +- .../lux/phase/extension/generation/lua/common.lux | 4 +- .../lux/phase/extension/generation/lua/host.lux | 70 +- .../lux/phase/extension/generation/php/common.lux | 102 +- .../phase/extension/generation/python/common.lux | 34 +- .../lux/phase/extension/generation/python/host.lux | 6 +- .../lux/phase/extension/generation/r/common.lux | 78 +- .../lux/phase/extension/generation/ruby/common.lux | 34 +- .../lux/phase/extension/generation/ruby/host.lux | 68 +- .../phase/extension/generation/scheme/common.lux | 90 +- .../lux/phase/generation/common_lisp/case.lux | 4 +- .../lux/phase/generation/common_lisp/function.lux | 56 +- .../language/lux/phase/generation/js/case.lux | 2 +- .../language/lux/phase/generation/js/function.lux | 2 +- .../language/lux/phase/generation/jvm/debug.lux | 30 +- .../language/lux/phase/generation/jvm/function.lux | 26 +- .../phase/generation/jvm/function/method/init.lux | 12 +- .../phase/generation/jvm/function/method/new.lux | 12 +- .../language/lux/phase/generation/jvm/host.lux | 56 +- .../lux/phase/generation/jvm/primitive.lux | 2 +- .../language/lux/phase/generation/jvm/program.lux | 20 +- .../language/lux/phase/generation/jvm/runtime.lux | 52 +- .../language/lux/phase/generation/lua/case.lux | 4 +- .../language/lux/phase/generation/lua/function.lux | 8 +- .../language/lux/phase/generation/lua/loop.lux | 38 +- .../language/lux/phase/generation/php/case.lux | 4 +- .../language/lux/phase/generation/php/function.lux | 56 +- .../language/lux/phase/generation/php/loop.lux | 94 +- .../language/lux/phase/generation/python/case.lux | 4 +- .../lux/phase/generation/python/function.lux | 2 +- .../language/lux/phase/generation/python/loop.lux | 32 +- .../language/lux/phase/generation/r/case.lux | 4 +- .../language/lux/phase/generation/r/runtime.lux | 92 +- .../language/lux/phase/generation/reference.lux | 8 +- .../language/lux/phase/generation/ruby/case.lux | 4 +- .../lux/phase/generation/ruby/function.lux | 14 +- .../language/lux/phase/generation/scheme/case.lux | 4 +- .../lux/phase/generation/scheme/function.lux | 56 +- .../language/lux/phase/synthesis/function.lux | 48 +- .../language/lux/phase/synthesis/variable.lux | 10 +- .../lux/tool/compiler/language/lux/syntax.lux | 10 +- .../lux/tool/compiler/language/lux/synthesis.lux | 2 +- .../library/lux/tool/compiler/meta/archive.lux | 50 +- .../library/lux/tool/compiler/meta/archive/key.lux | 6 +- .../tool/compiler/meta/archive/module/document.lux | 30 +- .../lux/tool/compiler/meta/archive/registry.lux | 142 +-- .../tool/compiler/meta/cache/dependency/module.lux | 22 +- .../lux/tool/compiler/meta/cache/module.lux | 2 +- .../library/lux/tool/compiler/meta/cache/purge.lux | 4 +- .../source/library/lux/tool/compiler/meta/cli.lux | 18 +- .../lux/tool/compiler/meta/cli/compiler.lux | 8 +- .../library/lux/tool/compiler/meta/export.lux | 6 +- .../library/lux/tool/compiler/meta/import.lux | 4 +- .../library/lux/tool/compiler/meta/io/archive.lux | 232 ++--- .../library/lux/tool/compiler/meta/io/context.lux | 8 +- .../lux/tool/compiler/meta/packager/ruby.lux | 24 +- .../lux/tool/compiler/meta/packager/scheme.lux | 44 +- .../lux/tool/compiler/meta/packager/script.lux | 14 +- stdlib/source/library/lux/tool/interpreter.lux | 48 +- stdlib/source/library/lux/type.lux | 86 +- stdlib/source/library/lux/type/abstract.lux | 34 +- stdlib/source/library/lux/type/check.lux | 22 +- stdlib/source/library/lux/type/dynamic.lux | 32 +- stdlib/source/library/lux/type/implicit.lux | 4 +- stdlib/source/library/lux/type/poly.lux | 10 +- stdlib/source/library/lux/type/quotient.lux | 38 +- stdlib/source/library/lux/type/refinement.lux | 38 +- stdlib/source/library/lux/type/resource.lux | 42 +- stdlib/source/library/lux/type/unit.lux | 34 +- stdlib/source/library/lux/world/console.lux | 42 +- stdlib/source/library/lux/world/db/jdbc.lux | 86 +- stdlib/source/library/lux/world/db/sql.lux | 214 ++-- stdlib/source/library/lux/world/file.lux | 288 +++--- stdlib/source/library/lux/world/file/watch.lux | 138 +-- .../source/library/lux/world/net/http/client.lux | 68 +- stdlib/source/library/lux/world/net/http/mime.lux | 20 +- stdlib/source/library/lux/world/program.lux | 36 +- stdlib/source/library/lux/world/shell.lux | 158 +-- stdlib/source/poly/lux/abstract/equivalence.lux | 162 +-- stdlib/source/poly/lux/abstract/functor.lux | 196 ++-- stdlib/source/poly/lux/data/format/json.lux | 264 ++--- stdlib/source/program/aedifex/action.lux | 18 +- .../source/program/aedifex/artifact/time/date.lux | 20 +- stdlib/source/program/aedifex/command/build.lux | 10 +- .../program/aedifex/dependency/deployment.lux | 16 +- .../program/aedifex/dependency/resolution.lux | 10 +- stdlib/source/program/aedifex/hash.lux | 14 +- .../source/program/aedifex/metadata/snapshot.lux | 14 +- stdlib/source/program/aedifex/parser.lux | 78 +- stdlib/source/program/aedifex/repository.lux | 54 +- .../source/program/aedifex/repository/remote.lux | 32 +- stdlib/source/program/compositor.lux | 36 +- .../specification/compositor/generation/case.lux | 66 +- .../specification/compositor/generation/common.lux | 70 +- .../compositor/generation/primitive.lux | 2 +- .../compositor/generation/reference.lux | 4 +- .../compositor/generation/structure.lux | 16 +- stdlib/source/specification/lux/abstract/apply.lux | 19 +- stdlib/source/test/aedifex/cache.lux | 8 +- stdlib/source/test/aedifex/command/auto.lux | 16 +- stdlib/source/test/aedifex/command/build.lux | 112 +-- stdlib/source/test/aedifex/command/clean.lux | 12 +- stdlib/source/test/aedifex/command/install.lux | 8 +- stdlib/source/test/aedifex/command/test.lux | 40 +- .../source/test/aedifex/dependency/deployment.lux | 38 +- .../source/test/aedifex/dependency/resolution.lux | 20 +- stdlib/source/test/aedifex/input.lux | 8 +- stdlib/source/test/aedifex/parser.lux | 10 +- stdlib/source/test/lux.lux | 235 +++-- stdlib/source/test/lux/abstract/comonad.lux | 34 +- stdlib/source/test/lux/abstract/comonad/cofree.lux | 46 +- stdlib/source/test/lux/abstract/enum.lux | 38 +- stdlib/source/test/lux/abstract/equivalence.lux | 76 +- stdlib/source/test/lux/abstract/hash.lux | 18 +- stdlib/source/test/lux/abstract/monad.lux | 52 +- stdlib/source/test/lux/abstract/monad/free.lux | 48 +- stdlib/source/test/lux/abstract/order.lux | 54 +- stdlib/source/test/lux/abstract/predicate.lux | 80 +- stdlib/source/test/lux/control/concatenative.lux | 102 +- .../source/test/lux/control/concurrency/actor.lux | 52 +- .../source/test/lux/control/concurrency/async.lux | 16 +- stdlib/source/test/lux/control/concurrency/frp.lux | 18 +- stdlib/source/test/lux/control/continuation.lux | 36 +- stdlib/source/test/lux/control/exception.lux | 4 +- stdlib/source/test/lux/control/function.lux | 54 +- stdlib/source/test/lux/control/function/memo.lux | 14 +- stdlib/source/test/lux/control/function/mixin.lux | 100 +- stdlib/source/test/lux/control/lazy.lux | 6 +- stdlib/source/test/lux/control/maybe.lux | 4 +- stdlib/source/test/lux/control/parser.lux | 4 +- stdlib/source/test/lux/control/parser/binary.lux | 46 +- stdlib/source/test/lux/control/parser/type.lux | 26 +- stdlib/source/test/lux/control/parser/xml.lux | 6 +- stdlib/source/test/lux/control/reader.lux | 10 +- stdlib/source/test/lux/control/region.lux | 102 +- stdlib/source/test/lux/control/security/policy.lux | 48 +- stdlib/source/test/lux/control/state.lux | 10 +- stdlib/source/test/lux/control/thread.lux | 62 +- stdlib/source/test/lux/control/try.lux | 4 +- stdlib/source/test/lux/data.lux | 8 +- stdlib/source/test/lux/data/binary.lux | 16 +- stdlib/source/test/lux/data/collection/array.lux | 82 +- .../source/test/lux/data/collection/dictionary.lux | 10 +- .../lux/data/collection/dictionary/ordered.lux | 8 +- stdlib/source/test/lux/data/collection/list.lux | 22 +- .../source/test/lux/data/collection/sequence.lux | 26 +- stdlib/source/test/lux/data/collection/set.lux | 52 +- .../test/lux/data/collection/tree/finger.lux | 46 +- stdlib/source/test/lux/data/color/named.lux | 42 +- stdlib/source/test/lux/data/format/tar.lux | 4 +- stdlib/source/test/lux/data/sum.lux | 22 +- stdlib/source/test/lux/data/text/encoding.lux | 56 +- stdlib/source/test/lux/data/text/unicode/block.lux | 50 +- stdlib/source/test/lux/debug.lux | 16 +- stdlib/source/test/lux/ffi.js.lux | 22 +- stdlib/source/test/lux/ffi.jvm.lux | 58 +- stdlib/source/test/lux/ffi.lua.lux | 10 +- stdlib/source/test/lux/ffi.old.lux | 4 +- stdlib/source/test/lux/ffi.py.lux | 10 +- stdlib/source/test/lux/ffi.rb.lux | 6 +- stdlib/source/test/lux/locale/language.lux | 4 +- stdlib/source/test/lux/macro.lux | 22 +- stdlib/source/test/lux/macro/code.lux | 18 +- stdlib/source/test/lux/macro/local.lux | 4 +- stdlib/source/test/lux/macro/pattern.lux | 8 +- stdlib/source/test/lux/macro/syntax/definition.lux | 2 +- stdlib/source/test/lux/math/logic/fuzzy.lux | 10 +- stdlib/source/test/lux/math/modular.lux | 64 +- stdlib/source/test/lux/math/number/frac.lux | 20 +- stdlib/source/test/lux/math/number/i64.lux | 44 +- stdlib/source/test/lux/meta.lux | 388 ++++---- stdlib/source/test/lux/program.lux | 22 +- stdlib/source/test/lux/target/js.lux | 144 +-- stdlib/source/test/lux/target/jvm.lux | 1032 ++++++++++---------- stdlib/source/test/lux/target/lua.lux | 114 +-- stdlib/source/test/lux/target/python.lux | 140 +-- stdlib/source/test/lux/target/ruby.lux | 178 ++-- stdlib/source/test/lux/test.lux | 20 +- stdlib/source/test/lux/time/instant.lux | 20 +- .../compiler/language/lux/analysis/coverage.lux | 32 +- .../compiler/language/lux/analysis/inference.lux | 86 +- .../tool/compiler/language/lux/analysis/macro.lux | 8 +- .../compiler/language/lux/phase/analysis/case.lux | 164 ++-- .../language/lux/phase/analysis/complex.lux | 360 +++---- .../language/lux/phase/analysis/function.lux | 104 +- .../language/lux/phase/analysis/reference.lux | 76 +- .../language/lux/phase/analysis/simple.lux | 14 +- .../tool/compiler/language/lux/phase/extension.lux | 92 +- .../compiler/language/lux/phase/synthesis/case.lux | 92 +- .../compiler/language/lux/phase/synthesis/loop.lux | 86 +- .../language/lux/phase/synthesis/primitive.lux | 20 +- .../test/lux/tool/compiler/language/lux/syntax.lux | 98 +- .../lux/tool/compiler/meta/archive/registry.lux | 26 +- .../test/lux/tool/compiler/meta/cache/purge.lux | 54 +- .../source/test/lux/tool/compiler/meta/export.lux | 8 +- .../source/test/lux/tool/compiler/meta/import.lux | 30 +- stdlib/source/test/lux/tool/compiler/phase.lux | 12 +- stdlib/source/test/lux/type.lux | 66 +- stdlib/source/test/lux/type/abstract.lux | 56 +- stdlib/source/test/lux/type/check.lux | 36 +- stdlib/source/test/lux/type/dynamic.lux | 42 +- stdlib/source/test/lux/type/quotient.lux | 44 +- stdlib/source/test/lux/type/refinement.lux | 42 +- stdlib/source/test/lux/type/resource.lux | 58 +- stdlib/source/test/lux/type/unit.lux | 30 +- stdlib/source/test/lux/world/file.lux | 4 +- stdlib/source/test/lux/world/file/watch.lux | 4 +- stdlib/source/test/lux/world/input/keyboard.lux | 6 +- stdlib/source/test/lux/world/net/http/client.lux | 42 +- stdlib/source/test/lux/world/net/http/status.lux | 36 +- stdlib/source/test/lux/world/shell.lux | 58 +- stdlib/source/unsafe/lux/data/binary.lux | 236 ++--- stdlib/source/unsafe/lux/data/collection/array.lux | 584 +++++------ 389 files changed, 10335 insertions(+), 10295 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index bbefd85a6..823f6efc4 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -172,15 +172,15 @@ (documentation: /.list "List literals." - [(: (List Nat) - (list 0 1 2 3))]) + [(is (List Nat) + (list 0 1 2 3))]) (documentation: /.list& "List literals, with the last element being a tail-list." - [(: (List Nat) - (list& 0 1 2 3 - (: (List Nat) - (list 4 5 6))))]) + [(is (List Nat) + (list& 0 1 2 3 + (is (List Nat) + (list 4 5 6))))]) (documentation: /.Union "Union types." @@ -307,15 +307,15 @@ [(type (All (_ a) (Maybe (List a))))]) -(documentation: /.: +(documentation: /.is "The type-annotation macro." - [(: (List Int) - (list +1 +2 +3))]) + [(is (List Int) + (list +1 +2 +3))]) -(documentation: /.:as +(documentation: /.as "The type-coercion macro." - [(:as Dinosaur - (list +1 +2 +3))]) + [(as Dinosaur + (list +1 +2 +3))]) (documentation: /.Rec "Parameter-less recursive types." @@ -350,8 +350,8 @@ (documentation: /.case (format "The pattern-matching macro." \n "Allows the usage of macros within the patterns to provide custom syntax.") - [(case (: (List Int) - (list +1 +2 +3)) + [(case (is (List Int) + (list +1 +2 +3)) {#Item x {#Item y {#Item z {#End}}}} {#Some ($_ * x y z)} @@ -361,8 +361,8 @@ (documentation: /.pattern (format "Macro-expanding patterns." \n "It's a special macro meant to be used with 'case'.") - [(case (: (List Int) - (list +1 +2 +3)) + [(case (is (List Int) + (list +1 +2 +3)) (pattern (list x y z)) {#Some ($_ * x y z)} @@ -400,16 +400,16 @@ (documentation: /.function "Syntax for creating functions." - [(: (All (_ a b) - (-> a b a)) - (function (_ x y) - x))] + [(is (All (_ a b) + (-> a b a)) + (function (_ x y) + x))] ["Allows for giving the function itself a name, for the sake of recursion." - (: (-> Nat Nat) - (function (factorial n) - (case n - 0 1 - _ (* n (factorial (-- n))))))]) + (is (-> Nat Nat) + (function (factorial n) + (case n + 0 1 + _ (* n (factorial (-- n))))))]) (documentation: /.def: "Defines global constants/functions." @@ -464,13 +464,13 @@ (documentation: /.implementation "Express a value that implements an interface." - [(: (Order Int) - (implementation - (def: &equivalence - equivalence) - (def: (< reference subject) - (< reference subject)) - ))]) + [(is (Order Int) + (implementation + (def: &equivalence + equivalence) + (def: (< reference subject) + (< reference subject)) + ))]) (documentation: /.implementation: "Interface implementation." @@ -510,10 +510,10 @@ "Interface definition." [(type: .public (Order a) (Interface - (: (Equivalence a) - &equivalence) - (: (-> a a Bit) - <)))]) + (is (Equivalence a) + &equivalence) + (is (-> a a Bit) + <)))]) (.template [] [(documentation: @@ -765,15 +765,15 @@ "=>" ["documentation/lux" "#doc"]]) -(documentation: /.:parameter +(documentation: /.parameter (format "WARNING: Please stay away from this macro; it's very likely to be removed in a future version of Lux." "Allows you to refer to the type-variables in a polymorphic function's type, by their index.") ["In the example below, 0 corresponds to the 'a' variable." (def: .public (of_list list) (All (_ a) (-> (List a) (Sequence a))) (list#mix add - (: (Sequence (:parameter 0)) - empty) + (is (Sequence (parameter 0)) + empty) list))]) (documentation: /.same? @@ -801,11 +801,11 @@ (^|> value [++ (% 10) (max 1)]) (foo value))]) -(documentation: /.:expected +(documentation: /.as_expected "Coerces the given expression to the type of whatever is expected." - [(: Dinosaur - (:expected (: (List Nat) - (list 1 2 3))))]) + [(is Dinosaur + (as_expected (is (List Nat) + (list 1 2 3))))]) (documentation: /.undefined (format "Meant to be used as a stand-in for functions with undefined implementations." @@ -815,13 +815,13 @@ (-> Int Int) (undefined))]) -(documentation: /.:of +(documentation: /.type_of "Generates the type corresponding to a given expression." [(let [my_num +123] - (:of my_num)) + (type_of my_num)) "==" Int] - [(:of +123) + [(type_of +123) "==" Int]) @@ -842,8 +842,8 @@ (documentation: /.char "If given a 1-character text literal, yields the char-code of the sole character." - [(: Nat - (char "A")) + [(is Nat + (char "A")) "=>" 65]) @@ -865,13 +865,13 @@ (documentation: /.^code "Generates pattern-matching code for Code values in a way that looks like code-templating." - [(: (Maybe Nat) - (case (` (#0 123 +456.789)) - (^code (#0 (~ [_ {.#Nat number}]) +456.789)) - {.#Some number} + [(is (Maybe Nat) + (case (` (#0 123 +456.789)) + (^code (#0 (~ [_ {.#Nat number}]) +456.789)) + {.#Some number} - _ - {.#None}))]) + _ + {.#None}))]) (documentation: /.false "The boolean FALSE value.") @@ -879,24 +879,19 @@ (documentation: /.true "The boolean TRUE value.") -(documentation: /.:let - "Local bindings for types." - [(:let [side (Either Int Frac)] - (List [side side]))]) - (documentation: /.try "" - [(: Foo - (case (: (Either Text Bar) - (try (: Bar - (risky computation which may panic)))) - {.#Right success} - (: Foo - (do something after success)) - - {.#Left error} - (: Foo - (recover from error))))]) + [(is Foo + (case (is (Either Text Bar) + (try (is Bar + (risky computation which may panic)))) + {.#Right success} + (is Foo + (do something after success)) + + {.#Left error} + (is Foo + (recover from error))))]) (.def: .public documentation (.List $.Module) @@ -954,8 +949,8 @@ ..template ..not ..type - ..: - ..:as + ..is + ..as ..Rec ..exec ..case @@ -997,13 +992,13 @@ ..static ..^multi ..symbol - ..:parameter + ..parameter ..same? ..^let ..^|> - ..:expected + ..as_expected ..undefined - ..:of + ..type_of ..template: ..as_is ..char @@ -1012,7 +1007,6 @@ ..^code ..false ..true - ..:let ..try ($.default (/.Code' w)) ($.default /.Alias) diff --git a/stdlib/source/documentation/lux/abstract/codec.lux b/stdlib/source/documentation/lux/abstract/codec.lux index 567a27e79..d39113c45 100644 --- a/stdlib/source/documentation/lux/abstract/codec.lux +++ b/stdlib/source/documentation/lux/abstract/codec.lux @@ -1,20 +1,20 @@ (.using - [library - [lux - ["$" documentation {"+" documentation:}]]] - [\\library - ["[0]" /]]) + [library + [lux + ["$" documentation {"+" documentation:}]]] + [\\library + ["[0]" /]]) (documentation: (/.Codec medium value) "A way to move back-and-forth between a type and an alternative representation for it.") (documentation: /.composite "Codec composition." - [(: (Codec c a) - (composite (: (Codec c b) - cb_codec) - (: (Codec b a) - ba_codec)))]) + [(is (Codec c a) + (composite (is (Codec c b) + cb_codec) + (is (Codec b a) + ba_codec)))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/control/concatenative.lux b/stdlib/source/documentation/lux/control/concatenative.lux index bb8be17d8..93dd86efa 100644 --- a/stdlib/source/documentation/lux/control/concatenative.lux +++ b/stdlib/source/documentation/lux/control/concatenative.lux @@ -1,20 +1,20 @@ (.using - [library - [lux {"-" if loop} - ["$" documentation {"+" documentation:}] - [data - [text - ["%" format {"+" format}]]] - [macro - ["[0]" template]] - [math - [number - ["n" nat] - ["i" int] - ["r" rev] - ["f" frac]]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" if loop} + ["$" documentation {"+" documentation:}] + [data + [text + ["%" format {"+" format}]]] + [macro + ["[0]" template]] + [math + [number + ["n" nat] + ["i" int] + ["r" rev] + ["f" frac]]]]] + [\\library + ["[0]" /]]) (documentation: /.=> "Concatenative function types." @@ -48,8 +48,8 @@ (documentation: /.apply "A generator for functions that turn arity N functions into arity N concatenative functions." - [(: (=> [Nat] [Nat]) - ((apply 1) ++))]) + [(is (=> [Nat] [Nat]) + ((apply 1) ++))]) (template [] [(with_expansions [ (template.symbol [/._] ["apply/" ]) diff --git a/stdlib/source/documentation/lux/control/exception.lux b/stdlib/source/documentation/lux/control/exception.lux index 656b30a5a..96e970156 100644 --- a/stdlib/source/documentation/lux/control/exception.lux +++ b/stdlib/source/documentation/lux/control/exception.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" if loop} - ["$" documentation {"+" documentation:}] - [data - [text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" if loop} + ["$" documentation {"+" documentation:}] + [data + [text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Exception it) "An exception provides a way to decorate error messages.") @@ -46,11 +46,11 @@ (documentation: /.report "An error report." - [(: Text - (report ["Row 0" value/0] - ["Row 1" value/1] - ,,, - ["Row N" value/N]))]) + [(is Text + (report ["Row 0" value/0] + ["Row 1" value/1] + ,,, + ["Row N" value/N]))]) (documentation: /.listing (format "A numbered report of the entries on a list." diff --git a/stdlib/source/documentation/lux/control/security/policy.lux b/stdlib/source/documentation/lux/control/security/policy.lux index 9bb54bef8..2a373f04c 100644 --- a/stdlib/source/documentation/lux/control/security/policy.lux +++ b/stdlib/source/documentation/lux/control/security/policy.lux @@ -39,21 +39,21 @@ (type: (Policy %) (Interface - (: (-> Text (Password %)) - password) - (: (-> (Password %) Text) - unsafe))) + (is (-> Text (Password %)) + password) + (is (-> (Password %) Text) + unsafe))) (def: (policy _) (Ex (_ %) (-> Any (Policy %))) (with_policy - (: (Context Privacy Policy) - (function (_ (open "%::.")) - (implementation - (def: (password value) - (%::can_upgrade value)) - (def: (unsafe password) - (%::can_downgrade password)))))))] + (is (Context Privacy Policy) + (function (_ (open "%::.")) + (implementation + (def: (password value) + (%::can_upgrade value)) + (def: (unsafe password) + (%::can_downgrade password)))))))] [(with_policy context)]) (documentation: /.Privacy diff --git a/stdlib/source/documentation/lux/data/collection/sequence.lux b/stdlib/source/documentation/lux/data/collection/sequence.lux index 55af9dad9..3d719ee3e 100644 --- a/stdlib/source/documentation/lux/data/collection/sequence.lux +++ b/stdlib/source/documentation/lux/data/collection/sequence.lux @@ -1,19 +1,19 @@ (.using - [library - [lux {"-" list} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - [syntax {"+" syntax:}] - ["[0]" code] - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" list} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + [syntax {"+" syntax:}] + ["[0]" code] + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Sequence it) "A sequential data-structure with fast random access.") @@ -52,8 +52,8 @@ (documentation: /.sequence "Sequence literals." - [(: (Sequence Nat) - (sequence 12 34 56 78 90))]) + [(is (Sequence Nat) + (sequence 12 34 56 78 90))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/data/collection/tree.lux b/stdlib/source/documentation/lux/data/collection/tree.lux index 34d05eba3..f4287d194 100644 --- a/stdlib/source/documentation/lux/data/collection/tree.lux +++ b/stdlib/source/documentation/lux/data/collection/tree.lux @@ -1,20 +1,20 @@ (.using - [library - [lux {"-" list} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]] - ["[0]" / "_" - ["[1][0]" finger] - ["[1][0]" zipper]]) + [library + [lux {"-" list} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]] + ["[0]" / "_" + ["[1][0]" finger] + ["[1][0]" zipper]]) (documentation: (/.Tree it) "A generic tree data-structure.") @@ -33,11 +33,11 @@ (documentation: /.tree "Tree literals." - [(: (Tree Nat) - (tree 12 - {34 {} - 56 {} - 78 {90 {}}}))]) + [(is (Tree Nat) + (tree 12 + {34 {} + 56 {} + 78 {90 {}}}))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/debug.lux b/stdlib/source/documentation/lux/debug.lux index f50793f14..f40a14bde 100644 --- a/stdlib/source/documentation/lux/debug.lux +++ b/stdlib/source/documentation/lux/debug.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" private} - ["$" documentation {"+" documentation:}] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" private} + ["$" documentation {"+" documentation:}] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.inspection "A best-effort attempt to generate a textual representation of a value, without knowing its type." @@ -31,12 +31,12 @@ "Prints/writes a message to standard output." [(log! message)]) -(documentation: /.:hole +(documentation: /.hole (format "A typed 'hole'." \n "Reveals the type expected of the expression that should go in the hole.") - [(: (-> Nat Text) - (function (_ number) - (:hole))) + [(is (-> Nat Text) + (function (_ number) + (hole))) "=>" .Text]) @@ -45,8 +45,8 @@ [(let [foo 123 bar +456 baz +789.0] - (: Any - (here))) + (is Any + (here))) "=>" "foo: +123" "bar: +456" @@ -57,8 +57,8 @@ (let [foo 123 bar +456 baz +789.0] - (: Any - (here [foo %.nat] baz))) + (is Any + (here [foo %.nat] baz))) "=>" "foo: 123" "baz: +789.0" @@ -72,7 +72,7 @@ ..representation ..private ..log! - ..:hole + ..hole ..here ($.default /.cannot_represent_value) ($.default /.type_hole) diff --git a/stdlib/source/documentation/lux/documentation.lux b/stdlib/source/documentation/lux/documentation.lux index 711525027..f1ba6db85 100644 --- a/stdlib/source/documentation/lux/documentation.lux +++ b/stdlib/source/documentation/lux/documentation.lux @@ -1,39 +1,39 @@ (.using - [library - [lux "*" - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (/.documentation: /.default "" - [(: /.Definition - (default ..definition))]) + [(is /.Definition + (default ..definition))]) (/.documentation: /.documentation: "" [(documentation: /.default "" - [(: /.Definition - (default ..definition))])]) + [(is /.Definition + (default ..definition))])]) (/.documentation: /.module "" - [(: (.List /.Module) - (module /._ - "" - [..default - ..documentation: - ..module - (/.default /.unqualified_symbol) - (/.default /.Definition) - (/.default /.Module) - (/.default /.documentation)] - []))]) + [(is (.List /.Module) + (module /._ + "" + [..default + ..documentation: + ..module + (/.default /.unqualified_symbol) + (/.default /.Definition) + (/.default /.Module) + (/.default /.documentation)] + []))]) (.def: .public documentation (.List /.Module) diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux index 81082ada3..df5a6f037 100644 --- a/stdlib/source/documentation/lux/ffi.js.lux +++ b/stdlib/source/documentation/lux/ffi.js.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" int char type :as} + [lux {"-" int char type} ["$" documentation {"+" documentation:}] [data ["[0]" text {"+" \n} @@ -46,9 +46,9 @@ (documentation: /.closure (format "Allows defining closures/anonymous-functions in the form that JavaScript expects." \n "This is useful for adapting Lux functions for usage by JavaScript code.") - [(: /.Function - (closure [left right] - (do_something (:as Foo left) (:as Bar right))))]) + [(is /.Function + (closure [left right] + (do_something (as Foo left) (as Bar right))))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux index 5bf182890..510636c0f 100644 --- a/stdlib/source/documentation/lux/ffi.jvm.lux +++ b/stdlib/source/documentation/lux/ffi.jvm.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" int char type :as} + [lux {"-" int char type as} ["$" documentation {"+" documentation:}] [data ["[0]" text {"+" \n} @@ -141,7 +141,7 @@ (documentation: /.??? "Takes a (potentially null) ObjectType reference and creates a (Maybe ObjectType) for it." - [(= (??? (: java/lang/String (null))) + [(= (??? (is java/lang/String (null))) {.#None})] [(= (??? "YOLO") {.#Some "YOLO"})]) @@ -150,7 +150,7 @@ (format "Takes a (Maybe ObjectType) and returns a ObjectType." \n "A .#None would get translated into a (null).") [(= (null) - (!!! (??? (: java/lang/Thread (null)))))] + (!!! (??? (is java/lang/Thread (null)))))] [(= "foo" (!!! (??? "foo")))]) @@ -245,13 +245,13 @@ (documentation: /.type "" - [(: Type - (type java/lang/String))]) + [(is Type + (type java/lang/String))]) -(documentation: /.:as +(documentation: /.as "" - [(:as java/lang/Object - (: java/lang/String + [(as java/lang/Object + (is java/lang/String ???))]) (.def: .public documentation @@ -322,7 +322,7 @@ ..write! ..class_for ..type - ..:as + ..as ($.default /.Privacy) ($.default /.State) ($.default /.Inheritance) diff --git a/stdlib/source/documentation/lux/ffi.lua.lux b/stdlib/source/documentation/lux/ffi.lua.lux index 79d6f03ac..0126a5117 100644 --- a/stdlib/source/documentation/lux/ffi.lua.lux +++ b/stdlib/source/documentation/lux/ffi.lua.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" int char type :as} + [lux {"-" int char type} ["$" documentation {"+" documentation:}] [data ["[0]" text {"+" \n} @@ -17,9 +17,9 @@ (documentation: /.closure (format "Allows defining closures/anonymous-functions in the form that Lua expects." \n "This is useful for adapting Lux functions for usage by Lua code.") - [(: ..Function - (closure [left right] - (do_something (:as Foo left) (:as Bar right))))]) + [(is ..Function + (closure [left right] + (do_something (as Foo left) (as Bar right))))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux index 56336a41b..926b70045 100644 --- a/stdlib/source/documentation/lux/ffi.old.lux +++ b/stdlib/source/documentation/lux/ffi.old.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" int char type :as} + [lux {"-" int char type} ["$" documentation {"+" documentation:}] [data ["[0]" text {"+" \n} @@ -104,7 +104,7 @@ (documentation: /.??? "Takes a (potentially null) ObjectType reference and creates a (Maybe ObjectType) for it." - [(= (??? (: java/lang/String (null))) + [(= (??? (is java/lang/String (null))) {.#None})] [(= (??? "YOLO") {.#Some "YOLO"})]) @@ -115,7 +115,7 @@ (!!! (??? "foo")))] ["A .#None would get translated into a (null)." (= (null) - (!!! (??? (: java/lang/Thread (null)))))]) + (!!! (??? (is java/lang/Thread (null)))))]) (documentation: /.check (format "Checks whether an object is an instance of a particular class." @@ -204,13 +204,13 @@ (documentation: /.class_for "Loads the class as a java.lang.Class object." - [(: (Primitive "java.lang.Class" ["java.lang.Object"]) - (class_for java/lang/String))]) + [(is (Primitive "java.lang.Class" ["java.lang.Object"]) + (class_for java/lang/String))]) (documentation: /.type "" - [(: .Type - (type java/lang/String))]) + [(is .Type + (type java/lang/String))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux index 34a88e01d..40ea7878e 100644 --- a/stdlib/source/documentation/lux/ffi.py.lux +++ b/stdlib/source/documentation/lux/ffi.py.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" int char type :as} + [lux {"-" int char type} ["$" documentation {"+" documentation:}] [data ["[0]" text {"+" \n} @@ -37,10 +37,10 @@ (documentation: /.lambda (format "Allows defining closures/anonymous-functions in the form that Python expects." \n "This is useful for adapting Lux functions for usage by Python code.") - [(: ..Function - (lambda [left right] - (do_something (:as Foo left) - (:as Bar right))))]) + [(is ..Function + (lambda [left right] + (do_something (as Foo left) + (as Bar right))))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux index 01b883a84..822ad8146 100644 --- a/stdlib/source/documentation/lux/ffi.rb.lux +++ b/stdlib/source/documentation/lux/ffi.rb.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" int char type :as} - ["$" documentation {"+" documentation:}] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" int char type} + ["$" documentation {"+" documentation:}] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.import: "Easily import types, methods, functions and constants." diff --git a/stdlib/source/documentation/lux/static.lux b/stdlib/source/documentation/lux/static.lux index 245ca33bc..bcde2dad6 100644 --- a/stdlib/source/documentation/lux/static.lux +++ b/stdlib/source/documentation/lux/static.lux @@ -1,20 +1,20 @@ (.using - [library - [lux {"-" nat int rev} - ["$" documentation {"+" documentation:}] - [data - [text - ["%" format {"+" format}]] - [collection - ["[0]" list]]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" nat int rev} + ["$" documentation {"+" documentation:}] + [data + [text + ["%" format {"+" format}]] + [collection + ["[0]" list]]]]] + [\\library + ["[0]" /]]) (template [ ] [(documentation: (%.code (' ( - (: - (value generating expression))))))] + (is + (value generating expression))))))] [/.nat .Nat] [/.int .Int] @@ -26,15 +26,15 @@ (documentation: /.literal "" [(/.literal - (: (-> ??? Code) - format) - (: ??? - (value generating expression)))]) + (is (-> ??? Code) + format) + (is ??? + (value generating expression)))]) (template [ ] [(documentation: - (%.code (' (: - ()))))] + (%.code (' (is + ()))))] [/.random_nat .Nat] [/.random_int .Int] @@ -45,10 +45,10 @@ (documentation: /.random "" [(/.random - (: (-> ??? Code) - format) - (: (Random ???) - (random data generator)))]) + (is (-> ??? Code) + format) + (is (Random ???) + (random data generator)))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/test.lux b/stdlib/source/documentation/lux/test.lux index 5c4093923..295003e1d 100644 --- a/stdlib/source/documentation/lux/test.lux +++ b/stdlib/source/documentation/lux/test.lux @@ -1,17 +1,17 @@ (.using - [library - [lux {"-" and for} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" and for} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.Tally "A record of successes and failures while executing tests.") @@ -72,29 +72,29 @@ (format "Specifies a test as covering one or more definitions." \n "Adds to the test tally information to track which definitions have been tested.") [(cover' [definition/0 definition/1 ,,, definition/N] - (: Bit - (some "computation")))]) + (is Bit + (some "computation")))]) (documentation: /.cover (format "Specifies a test as covering one or more definitions." \n "Adds to the test tally information to track which definitions have been tested.") [(cover [definition/0 definition/1 ,,, definition/N] - (: Bit - (some "computation")))]) + (is Bit + (some "computation")))]) (documentation: /.for (format "Specifies a context for tests as covering one or more definitions." \n "Adds to the test tally information to track which definitions have been tested.") [(for [definition/0 definition/1 ,,, definition/N] - (: Test - some_test))]) + (is Test + some_test))]) (documentation: /.covering (format "Specifies the module being covered by a test." \n "Adds tracking information to the tally to know which exported definitions in the module need to be covered.") [(covering .._ - (: Test - some_test))]) + (is Test + some_test))]) (documentation: /.in_parallel "Executes multiple tests in parallel (if the host platform supports it) to take advantage of multiple cores." diff --git a/stdlib/source/documentation/lux/type.lux b/stdlib/source/documentation/lux/type.lux index a39d5b2db..957dac26a 100644 --- a/stdlib/source/documentation/lux/type.lux +++ b/stdlib/source/documentation/lux/type.lux @@ -1,28 +1,28 @@ (.using - [library - [lux {"-" function :as} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]] - ["[0]" / "_" - ["[1][0]" abstract] - ["[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]]) + [library + [lux {"-" function as let} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]] + ["[0]" / "_" + ["[1][0]" abstract] + ["[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]]) (template [] [(documentation: @@ -108,48 +108,53 @@ (documentation: /.array? "Is a type an array type?") -(documentation: /.:log! +(documentation: /.log! "Logs to the console/terminal the type of an expression." - [(:log! (: Foo (foo expression))) + [(log! (is Foo (foo expression))) "=>" "Expression: (foo expression)" " Type: Foo" (foo expression)]) -(documentation: /.:as +(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.") - [(: (Bar Bit Nat Text) - (:as [a b c] + [(is (Bar Bit Nat Text) + (as [a b c] (Foo a [b c]) (Bar a b c) - (: (Foo Bit [Nat Text]) - (foo expression))))]) + (is (Foo Bit [Nat Text]) + (foo expression))))]) -(documentation: /.:sharing +(documentation: /.sharing "Allows specifing the type of an expression as sharing type-variables with the type of another expression." - [(: (Bar Bit Nat Text) - (:sharing [a b c] + [(is (Bar Bit Nat Text) + (sharing [a b c] (Foo a [b c]) - (: (Foo Bit [Nat Text]) - (foo expression)) + (is (Foo Bit [Nat Text]) + (foo expression)) (Bar a b c) (bar expression)))]) -(documentation: /.:by_example +(documentation: /.by_example "Constructs a type that shares type-variables with an expression of some other type." - [(: Type - (:by_example [a b c] + [(is Type + (by_example [a b c] (Foo a [b c]) - (: (Foo Bit [Nat Text]) - (foo expression)) + (is (Foo Bit [Nat Text]) + (foo expression)) (Bar a b c))) "=>" (.type (Bar Bit Nat Text))]) +(documentation: /.let + "Local bindings for types." + [(let [side (Either Int Frac)] + (List [side side]))]) + (.def: .public documentation (.List $.Module) ($.module /._ @@ -175,10 +180,11 @@ ..array ..flat_array ..array? - ..:log! - ..:as - ..:sharing - ..:by_example + ..log! + ..as + ..sharing + ..by_example + ..let ($.default /.equivalence)] [/abstract.documentation /check.documentation diff --git a/stdlib/source/documentation/lux/type/abstract.lux b/stdlib/source/documentation/lux/type/abstract.lux index 62d1ea026..4fdf9e3fc 100644 --- a/stdlib/source/documentation/lux/type/abstract.lux +++ b/stdlib/source/documentation/lux/type/abstract.lux @@ -1,17 +1,17 @@ (.using - [library - [lux {"-" and} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" pattern} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.Frame "Meta-data about an abstract/nominal type in a stack of them.") @@ -23,18 +23,16 @@ "A specific abstract/nominal type still being defined somewhere in the scope." [(specific name)]) -(template [ ] +(template [ <$> ] [(documentation: "Type-casting macro for abstract/nominal types." [(|> value - (: Representation) - :abstraction - (: Abstraction) - :representation - (: Representation))])] - - [/.:abstraction representation abstraction] - [/.:representation abstraction representation] + (is ) + <$> + (is ))])] + + [/.abstraction Representation abstraction Abstraction] + [/.representation Abstraction representation Representation] ) (documentation: /.abstract: @@ -45,44 +43,44 @@ (def: (string value) (-> Text String) - (:abstraction value)) + (abstraction value)) (def: (text value) (-> String Text) - (:representation value)))] + (representation value)))] ["Type-parameters are optional." (abstract: (Duplicate a) [a a] (def: (duplicate value) (All (_ a) (-> a (Duplicate a))) - (:abstraction [value value])))] + (abstraction [value value])))] ["Definitions can be nested." (abstract: (Single a) a (def: (single value) (All (_ a) (-> a (Single a))) - (:abstraction value)) + (abstraction value)) (abstract: (Double a) [a a] (def: (double value) (All (_ a) (-> a (Double a))) - (:abstraction [value value])) + (abstraction [value value])) (def: (single' value) (All (_ a) (-> a (Single a))) - (:abstraction Single [value value])) + (abstraction Single [value value])) (let [value 0123] (same? value (|> value single' - (:representation Single) + (representation Single) double - :representation)))))] + 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." (abstract: (JavaScript a) @@ -93,17 +91,17 @@ (def: (+ x y) (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression)) - (:abstraction - (format "(" (:representation x) "+" (:representation y) ")"))) + (abstraction + (format "(" (representation x) "+" (representation y) ")"))) (def: (while test body) (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement)) - (:abstraction - (format "while(" (:representation test) ") {" - (:representation body) + (abstraction + (format "while(" (representation test) ") {" + (representation body) "}"))))]) -(documentation: /.:transmutation +(documentation: /.transmutation "Transmutes an abstract/nominal type's phantom types." [(abstract: (JavaScript a) Text @@ -113,17 +111,17 @@ (def: (statement expression) (-> (JavaScript Expression) (JavaScript Statement)) - (:transmutation expression)) + (transmutation expression)) (def: (statement' expression) (-> (JavaScript Expression) (JavaScript Statement)) - (:transmutation JavaScript expression)))]) + (transmutation JavaScript expression)))]) -(documentation: /.^:representation +(documentation: /.pattern "Pattern-matching macro to easily extract a representation." [(def: (computation abstraction) (All (_ a) (-> (Abstract a) ???)) - (let [(^:representation value) abstraction] + (let [(pattern value) abstraction] (foo (bar (baz value)))))]) (.def: .public documentation @@ -133,10 +131,10 @@ [..Frame ..current ..specific - ..:abstraction - ..:representation + ..abstraction + ..representation ..abstract: - ..:transmutation - ..^:representation + ..transmutation + ..pattern ($.default /.no_active_frames)] [])) diff --git a/stdlib/source/documentation/lux/type/dynamic.lux b/stdlib/source/documentation/lux/type/dynamic.lux index 03a8fd322..1140e6158 100644 --- a/stdlib/source/documentation/lux/type/dynamic.lux +++ b/stdlib/source/documentation/lux/type/dynamic.lux @@ -1,38 +1,38 @@ (.using - [library - [lux {"-" and} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" static} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.Dynamic "A value coupled with its type, so it can be checked later.") -(documentation: /.:dynamic +(documentation: /.dynamic "" - [(: Dynamic - (:dynamic 123))]) + [(is Dynamic + (dynamic 123))]) -(documentation: /.:static +(documentation: /.static "" - [(: (try.Try Nat) - (:static Nat (:dynamic 123)))]) + [(is (try.Try Nat) + (static Nat (dynamic 123)))]) (.def: .public documentation (.List $.Module) ($.module /._ "" [..Dynamic - ..:dynamic - ..:static + ..dynamic + ..static ($.default /.wrong_type) ($.default /.format)] [])) diff --git a/stdlib/source/documentation/lux/type/quotient.lux b/stdlib/source/documentation/lux/type/quotient.lux index 9b6289933..799645f81 100644 --- a/stdlib/source/documentation/lux/type/quotient.lux +++ b/stdlib/source/documentation/lux/type/quotient.lux @@ -1,17 +1,17 @@ (.using - [library - [lux {"-" type} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" type} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Class value label) "The class knows how to classify/label values that are meant to be equivalent to one another.") @@ -34,8 +34,8 @@ Type (type even)) - (: Even - (quotient even 123))]) + (is Even + (quotient even 123))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/documentation/lux/type/refinement.lux b/stdlib/source/documentation/lux/type/refinement.lux index 008f64e82..bbe26014b 100644 --- a/stdlib/source/documentation/lux/type/refinement.lux +++ b/stdlib/source/documentation/lux/type/refinement.lux @@ -1,17 +1,17 @@ (.using - [library - [lux {"-" type} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" type} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Refined it) "A refined version of another type, using a predicate to select valid instances.") @@ -45,8 +45,8 @@ Type (type even)) - (: (Maybe Even) - (even 123))]) + (is (Maybe Even) + (even 123))]) (.def: .public documentation (.List $.Module) diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index aa5e5c476..7a80d68e7 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -1365,10 +1365,10 @@ ... (type: (Monad m) ... (Interface -... (: (All (_ a) (-> a (m a))) -... #in) -... (: (All (_ a b) (-> (-> a (m b)) (m a) (m b))) -... #then))) +... (is (All (_ a) (-> a (m a))) +... #in) +... (is (All (_ a b) (-> (-> a (m b)) (m a) (m b))) +... #then))) ("lux def type tagged" Monad {#Named [..prelude_module "Monad"] (All (_ !) @@ -2261,7 +2261,7 @@ {#End}}}}}] (` ("lux in-module" (~ (text$ module)) (~ (normal_type type')))) - [_ {#Form {#Item [_ {#Symbol ["" ":~"]}] {#Item expression {#End}}}}] + [_ {#Form {#Item [_ {#Symbol ["" "~"]}] {#Item expression {#End}}}}] expression [_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item body {#End}}}}] @@ -2311,7 +2311,7 @@ (failure "Wrong syntax for type")} tokens)) -(macro:' .public (: tokens) +(macro:' .public (is tokens) ({{#Item type {#Item value {#End}}} (meta#in (list (` ("lux type check" (..type (~ type)) @@ -2321,14 +2321,14 @@ (failure "Wrong syntax for :")} tokens)) -(macro:' .public (:as tokens) +(macro:' .public (as tokens) ({{#Item type {#Item value {#End}}} (meta#in (list (` ("lux type as" (..type (~ type)) (~ value))))) _ - (failure "Wrong syntax for :as")} + (failure "Wrong syntax for as")} tokens)) (def:''' .private (empty? xs) @@ -2377,22 +2377,22 @@ (list#reversed tokens))) (macro:' .private (def:' tokens) - (let' [parts (: (Maybe [Code Code (List Code) (Maybe Code) Code]) - ({{#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item type {#Item body {#End}}}}} - {#Some [export_policy name args {#Some type} body]} - - {#Item export_policy {#Item name {#Item type {#Item body {#End}}}}} - {#Some [export_policy name {#End} {#Some type} body]} - - {#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item body {#End}}}} - {#Some [export_policy name args {#None} body]} - - {#Item export_policy {#Item name {#Item body {#End}}}} - {#Some [export_policy name {#End} {#None} body]} - - _ - {#None}} - tokens))] + (let' [parts (is (Maybe [Code Code (List Code) (Maybe Code) Code]) + ({{#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item type {#Item body {#End}}}}} + {#Some [export_policy name args {#Some type} body]} + + {#Item export_policy {#Item name {#Item type {#Item body {#End}}}}} + {#Some [export_policy name {#End} {#Some type} body]} + + {#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item body {#End}}}} + {#Some [export_policy name args {#None} body]} + + {#Item export_policy {#Item name {#Item body {#End}}}} + {#Some [export_policy name {#End} {#None} body]} + + _ + {#None}} + tokens))] ({{#Some [export_policy name args ?type body]} (let' [body' ({{#End} body @@ -2401,7 +2401,7 @@ (` (function' (~ name) [(~+ args)] (~ body)))} args) body'' ({{#Some type} - (` (: (~ type) (~ body'))) + (` (is (~ type) (~ body'))) {#None} body'} @@ -2503,12 +2503,12 @@ {#Some bindings} (|> bindings list#reversed - (list#mix (: (-> [Code Code] Code Code) - (function' [lr body'] - (let' [[l r] lr] - (if (symbol? l) - (` ({(~ l) (~ body')} (~ r))) - (` (case (~ r) (~ l) (~ body'))))))) + (list#mix (is (-> [Code Code] Code Code) + (function' [lr body'] + (let' [[l r] lr] + (if (symbol? l) + (` ({(~ l) (~ body')} (~ r))) + (` (case (~ r) (~ l) (~ body'))))))) body) list meta#in) @@ -2520,22 +2520,22 @@ (failure "Wrong syntax for let"))) (macro:' .public (function tokens) - (case (: (Maybe [Text Code (List Code) Code]) - (case tokens - (pattern (list [_ {#Form (list& [_ {#Symbol ["" name]}] head tail)}] body)) - {#Some name head tail body} - - _ - {#None})) + (case (is (Maybe [Text Code (List Code) Code]) + (case tokens + (pattern (list [_ {#Form (list& [_ {#Symbol ["" name]}] head tail)}] body)) + {#Some name head tail body} + + _ + {#None})) {#Some g!name head tail body} (let [g!blank (local_symbol$ "") - nest (: (-> Code (-> Code Code Code)) - (function' [g!name] - (function' [arg body'] - (if (symbol? arg) - (` ([(~ g!name) (~ arg)] (~ body'))) - (` ([(~ g!name) (~ g!blank)] - (.case (~ g!blank) (~ arg) (~ body'))))))))] + nest (is (-> Code (-> Code Code Code)) + (function' [g!name] + (function' [arg body'] + (if (symbol? arg) + (` ([(~ g!name) (~ arg)] (~ body'))) + (` ([(~ g!name) (~ g!blank)] + (.case (~ g!blank) (~ arg) (~ body'))))))))] (meta#in (list (nest (..local_symbol$ g!name) head (list#mix (nest g!blank) body (list#reversed tail)))))) @@ -2750,8 +2750,8 @@ (~ body)))) body (case ?type {#Some type} - (` (: (~ type) - (~ body))) + (` (is (~ type) + (~ body))) {#None} body)] @@ -2809,8 +2809,8 @@ [(macro: .public ( tokens) (case (list#reversed tokens) (pattern (list& last init)) - (meta#in (list (list#mix (: (-> Code Code Code) - (function (_ pre post) (`
))) + (meta#in (list (list#mix (is (-> Code Code Code) + (function (_ pre post) (` ))) last init))) @@ -2831,7 +2831,7 @@ (macro: (maybe#else tokens state) (case tokens (pattern (list else maybe)) - (let [g!temp (: Code [dummy_location {#Symbol ["" ""]}]) + (let [g!temp (is Code [dummy_location {#Symbol ["" ""]}]) code (` (case (~ maybe) {.#Some (~ g!temp)} (~ g!temp) @@ -3125,34 +3125,34 @@ [tokens' (monad#each meta_monad expansion tokens) struct_type ..expected_type tags+type (record_slots struct_type) - tags (: (Meta (List Symbol)) - (case tags+type - {#Some [tags _]} - (meta#in tags) + tags (is (Meta (List Symbol)) + (case tags+type + {#Some [tags _]} + (meta#in tags) - _ - (failure ($_ text#composite - "No tags available for type: " - (type#encoded struct_type))))) - .let [tag_mappings (: (List [Text Code]) - (list#each (function (_ tag) - [(product#right tag) - (symbol$ tag)]) - tags))] + _ + (failure ($_ text#composite + "No tags available for type: " + (type#encoded struct_type))))) + .let [tag_mappings (is (List [Text Code]) + (list#each (function (_ tag) + [(product#right tag) + (symbol$ tag)]) + tags))] members (monad#each meta_monad - (: (-> Code (Meta (List Code))) - (function (_ token) - (case token - (pattern [_ {#Form (list [_ {#Text "lux def"}] [_ {#Symbol ["" slot_name]}] value export_policy)}]) - (case (plist#value slot_name tag_mappings) - {#Some tag} - (in (list tag value)) + (is (-> Code (Meta (List Code))) + (function (_ token) + (case token + (pattern [_ {#Form (list [_ {#Text "lux def"}] [_ {#Symbol ["" slot_name]}] value export_policy)}]) + (case (plist#value slot_name tag_mappings) + {#Some tag} + (in (list tag value)) - _ - (failure (text#composite "Unknown implementation member: " slot_name))) + _ + (failure (text#composite "Unknown implementation member: " slot_name))) - _ - (failure "Invalid implementation member.")))) + _ + (failure "Invalid implementation member.")))) (list#conjoint tokens'))] (in (list (tuple$ (list#conjoint members)))))) @@ -3336,14 +3336,14 @@ module_name current_module_name .let' [type_name (local_symbol$ name) [type labels??] type+labels?? - type' (: (Maybe Code) - (case args - {#End} - {#Some type} + type' (is (Maybe Code) + (case args + {#End} + {#Some type} - _ - {#Some (` (.All ((~ type_name) (~+ (list#each local_symbol$ args))) - (~ type)))}))]] + _ + {#Some (` (.All ((~ type_name) (~+ (list#each local_symbol$ args))) + (~ type)))}))]] (case type' {#Some type''} (let [typeC (` {.#Named [(~ (text$ module_name)) @@ -3398,14 +3398,14 @@ (def: (referral_references defs) (-> (List Code) (Meta (List Text))) (monad#each meta_monad - (: (-> Code (Meta Text)) - (function (_ def) - (case def - [_ {#Symbol ["" name]}] - (meta#in name) + (is (-> Code (Meta Text)) + (function (_ def) + (case def + [_ {#Symbol ["" name]}] + (meta#in name) - _ - (failure "only/+ and exclude/- require symbols.")))) + _ + (failure "only/+ and exclude/- require symbols.")))) defs)) (def: (referrals_parser tokens) @@ -3474,14 +3474,14 @@ (def: (replaced pattern replacement template) (-> Text Text Text Text) - ((: (-> Text Text Text) - (function (again left right) - (case (..text#split_by pattern right) - {#Some [pre post]} - (again ($_ "lux text concat" left pre replacement) post) + ((is (-> Text Text Text) + (function (again left right) + (case (..text#split_by pattern right) + {#Some [pre post]} + (again ($_ "lux text concat" left pre replacement) post) - {#None} - ("lux text concat" left right)))) + {#None} + ("lux text concat" left right)))) "" template)) (def: (alias_stand_in index) @@ -3576,75 +3576,75 @@ (-> Bit Text (List Text) (List Code) (Meta (List Importation))) (do meta_monad [imports' (monad#each meta_monad - (: (-> Code (Meta (List Importation))) - (function (_ token) - (case token - ... Simple - [_ {#Symbol ["" module_name]}] - (do meta_monad - [absolute_module_name (..absolute_module_name nested? relative_root module_name)] - (in (list [#import_name absolute_module_name - #import_alias {#None} - #import_refer [#refer_defs {#All} - #refer_open (list)]]))) - - ... Nested - (pattern [_ {#Tuple (list& [_ {#Symbol ["" module_name]}] extra)}]) - (do meta_monad - [absolute_module_name (case (normal_parallel_path relative_root module_name) - {#Some parallel_path} - (in parallel_path) - - {#None} - (..absolute_module_name nested? relative_root module_name)) - referral+extra (referrals_parser extra) - .let [[referral extra] referral+extra] - openings+extra (openings_parser extra) - .let [[openings extra] openings+extra] - sub_imports (imports_parser #1 absolute_module_name context extra)] - (in (case [referral openings] - [{#Nothing} {#End}] - sub_imports - - _ - (list& [#import_name absolute_module_name - #import_alias {#None} - #import_refer [#refer_defs referral - #refer_open openings]] - sub_imports)))) - - (pattern [_ {#Tuple (list& [_ {#Text alias}] [_ {#Symbol ["" module_name]}] extra)}]) - (do meta_monad - [absolute_module_name (case (normal_parallel_path relative_root module_name) - {#Some parallel_path} - (in parallel_path) - - {#None} - (..absolute_module_name nested? relative_root module_name)) - referral+extra (referrals_parser extra) - .let [[referral extra] referral+extra] - openings+extra (openings_parser extra) - .let [[openings extra] openings+extra - module_alias (..module_alias {#Item module_name context} alias)] - sub_imports (imports_parser #1 absolute_module_name {#Item module_alias context} extra)] - (in (case [referral openings] - [{#Ignore} {#End}] - sub_imports - - _ - (list& [#import_name absolute_module_name - #import_alias {#Some module_alias} - #import_refer [#refer_defs referral - #refer_open openings]] - sub_imports)))) - - ... Unrecognized syntax. - _ - (do meta_monad - [current_module current_module_name] - (failure ($_ text#composite - "Wrong syntax for import @ " current_module - \n (code#encoded token))))))) + (is (-> Code (Meta (List Importation))) + (function (_ token) + (case token + ... Simple + [_ {#Symbol ["" module_name]}] + (do meta_monad + [absolute_module_name (..absolute_module_name nested? relative_root module_name)] + (in (list [#import_name absolute_module_name + #import_alias {#None} + #import_refer [#refer_defs {#All} + #refer_open (list)]]))) + + ... Nested + (pattern [_ {#Tuple (list& [_ {#Symbol ["" module_name]}] extra)}]) + (do meta_monad + [absolute_module_name (case (normal_parallel_path relative_root module_name) + {#Some parallel_path} + (in parallel_path) + + {#None} + (..absolute_module_name nested? relative_root module_name)) + referral+extra (referrals_parser extra) + .let [[referral extra] referral+extra] + openings+extra (openings_parser extra) + .let [[openings extra] openings+extra] + sub_imports (imports_parser #1 absolute_module_name context extra)] + (in (case [referral openings] + [{#Nothing} {#End}] + sub_imports + + _ + (list& [#import_name absolute_module_name + #import_alias {#None} + #import_refer [#refer_defs referral + #refer_open openings]] + sub_imports)))) + + (pattern [_ {#Tuple (list& [_ {#Text alias}] [_ {#Symbol ["" module_name]}] extra)}]) + (do meta_monad + [absolute_module_name (case (normal_parallel_path relative_root module_name) + {#Some parallel_path} + (in parallel_path) + + {#None} + (..absolute_module_name nested? relative_root module_name)) + referral+extra (referrals_parser extra) + .let [[referral extra] referral+extra] + openings+extra (openings_parser extra) + .let [[openings extra] openings+extra + module_alias (..module_alias {#Item module_name context} alias)] + sub_imports (imports_parser #1 absolute_module_name {#Item module_alias context} extra)] + (in (case [referral openings] + [{#Ignore} {#End}] + sub_imports + + _ + (list& [#import_name absolute_module_name + #import_alias {#Some module_alias} + #import_refer [#refer_defs referral + #refer_open openings]] + sub_imports)))) + + ... Unrecognized syntax. + _ + (do meta_monad + [current_module current_module_name] + (failure ($_ text#composite + "Wrong syntax for import @ " current_module + \n (code#encoded token))))))) imports)] (in (list#conjoint imports')))) @@ -3658,28 +3658,28 @@ [current_module modules])] (case (plist#value module modules) {#Some =module} - (let [to_alias (list#each (: (-> [Text Global] - (List Text)) - (function (_ [name definition]) - (case definition - {#Alias _} - (list) - - {#Definition [exported? def_type def_value]} - (if exported? - (list name) - (list)) - - {#Type [exported? type labels]} - (if exported? - (list name) - (list)) - - {#Tag _} - (list) - - {#Slot _} - (list)))) + (let [to_alias (list#each (is (-> [Text Global] + (List Text)) + (function (_ [name definition]) + (case definition + {#Alias _} + (list) + + {#Definition [exported? def_type def_value]} + (if exported? + (list name) + (list)) + + {#Type [exported? type labels]} + (if exported? + (list name) + (list)) + + {#Tag _} + (list) + + {#Slot _} + (list)))) (let [[..#module_hash _ ..#module_aliases _ ..#definitions definitions ..#imports _ ..#module_state _] =module] definitions))] {#Right state (list#conjoint to_alias)}) @@ -3728,19 +3728,19 @@ ..#scopes scopes ..#type_context types ..#host host ..#seed seed ..#expected expected ..#location location ..#extensions extensions ..#scope_type_vars scope_type_vars ..#eval _eval] - (list#one (: (-> Scope (Maybe Type)) - (function (_ env) - (case env - [..#name _ - ..#inner _ - ..#locals [..#counter _ ..#mappings locals] - ..#captured _] - (list#one (: (-> [Text [Type Any]] (Maybe Type)) - (function (_ [bname [type _]]) - (if (text#= name bname) - {#Some type} - {#None}))) - locals)))) + (list#one (is (-> Scope (Maybe Type)) + (function (_ env) + (case env + [..#name _ + ..#inner _ + ..#locals [..#counter _ ..#mappings locals] + ..#captured _] + (list#one (is (-> [Text [Type Any]] (Maybe Type)) + (function (_ [bname [type _]]) + (if (text#= name bname) + {#Some type} + {#None}))) + locals)))) scopes))) (def: (definition_type name state) @@ -3834,25 +3834,25 @@ [.let [[module name] full_name] current_module current_module_name] (function (_ compiler) - (let [temp (: (Either Text [Lux Type]) - (if (text#= "" module) - (case (in_env name compiler) - {#Some struct_type} - {#Right [compiler struct_type]} + (let [temp (is (Either Text [Lux Type]) + (if (text#= "" module) + (case (in_env name compiler) + {#Some struct_type} + {#Right [compiler struct_type]} - _ - (case (definition_type [current_module name] compiler) - {#Some struct_type} - {#Right [compiler struct_type]} + _ + (case (definition_type [current_module name] compiler) + {#Some struct_type} + {#Right [compiler struct_type]} - _ - {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})) - (case (definition_type full_name compiler) - {#Some struct_type} - {#Right [compiler struct_type]} + _ + {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})) + (case (definition_type full_name compiler) + {#Some struct_type} + {#Right [compiler struct_type]} - _ - {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})))] + _ + {#Left ($_ text#composite "Unknown var: " (symbol#encoded full_name))})))] (case temp {#Right [compiler {#Var type_id}]} (let [[..#info _ ..#source _ ..#current_module _ ..#modules _ @@ -3903,39 +3903,39 @@ {#Some tags&members} (do meta_monad - [full_body ((: (-> Symbol [(List Symbol) (List Type)] Code (Meta Code)) - (function (again source [tags members] target) - (let [locals (list#each (function (_ [t_module t_name]) - [[t_module t_name] - ["" (..module_alias (list t_name) alias)]]) - tags) - pattern (case locals - (pattern (list [slot binding])) - (symbol$ binding) - - _ - (|> locals - (list#each (function (_ [slot binding]) - (list (symbol$ slot) - (symbol$ binding)))) - list#conjoint - tuple$))] - (do meta_monad - [enhanced_target (monad#mix meta_monad - (function (_ [[_ m_local] m_type] enhanced_target) - (do meta_monad - [m_implementation (record_slots m_type)] - (case m_implementation - {#Some m_tags&members} - (again m_local - m_tags&members - enhanced_target) - - {#None} - (in enhanced_target)))) - target - (zipped/2 locals members))] - (in (` ({(~ pattern) (~ enhanced_target)} (~ (symbol$ source))))))))) + [full_body ((is (-> Symbol [(List Symbol) (List Type)] Code (Meta Code)) + (function (again source [tags members] target) + (let [locals (list#each (function (_ [t_module t_name]) + [[t_module t_name] + ["" (..module_alias (list t_name) alias)]]) + tags) + pattern (case locals + (pattern (list [slot binding])) + (symbol$ binding) + + _ + (|> locals + (list#each (function (_ [slot binding]) + (list (symbol$ slot) + (symbol$ binding)))) + list#conjoint + tuple$))] + (do meta_monad + [enhanced_target (monad#mix meta_monad + (function (_ [[_ m_local] m_type] enhanced_target) + (do meta_monad + [m_implementation (record_slots m_type)] + (case m_implementation + {#Some m_tags&members} + (again m_local + m_tags&members + enhanced_target) + + {#None} + (in enhanced_target)))) + target + (zipped/2 locals members))] + (in (` ({(~ pattern) (~ enhanced_target)} (~ (symbol$ source))))))))) name tags&members body)] (in (list full_body))))) @@ -3947,10 +3947,10 @@ (pattern (list& else branches')) (case (pairs branches') {#Some branches'} - (meta#in (list (list#mix (: (-> [Code Code] Code Code) - (function (_ branch else) - (let [[then ?] branch] - (` (if (~ ?) (~ then) (~ else)))))) + (meta#in (list (list#mix (is (-> [Code Code] Code Code) + (function (_ branch else) + (let [[then ?] branch] + (` (if (~ ?) (~ then) (~ else)))))) else branches'))) @@ -3987,12 +3987,12 @@ (case (interface_methods type) {#Some members} (let [pattern (|> (zipped/2 tags (enumeration members)) - (list#each (: (-> [Symbol [Nat Type]] (List Code)) - (function (_ [[r_module r_name] [r_idx r_type]]) - (list (symbol$ [r_module r_name]) - (if ("lux i64 =" idx r_idx) - g!output - g!_))))) + (list#each (is (-> [Symbol [Nat Type]] (List Code)) + (function (_ [[r_module r_name] [r_idx r_type]]) + (list (symbol$ [r_module r_name]) + (if ("lux i64 =" idx r_idx) + g!output + g!_))))) list#conjoint tuple$)] (meta#in (list (` ({(~ pattern) (~ g!output)} (~ record)))))) @@ -4001,9 +4001,9 @@ (failure "the can only use records."))) (pattern (list [_ {#Tuple slots}] record)) - (meta#in (list (list#mix (: (-> Code Code Code) - (function (_ slot inner) - (` (..the (~ slot) (~ inner))))) + (meta#in (list (list#mix (is (-> Code Code Code) + (function (_ slot inner) + (` (..the (~ slot) (~ inner))))) record slots))) @@ -4034,9 +4034,9 @@ {#Some [tags' members']} (do meta_monad [decls' (monad#each meta_monad - (: (-> [Nat Symbol Type] (Meta (List Code))) - (function (_ [sub_tag_index sname stype]) - (open_declaration alias tags' sub_tag_index sname source+ stype))) + (is (-> [Nat Symbol Type] (Meta (List Code))) + (function (_ [sub_tag_index sname stype]) + (open_declaration alias tags' sub_tag_index sname source+ stype))) (enumeration (zipped/2 tags' members')))] (meta#in (list#conjoint decls'))) @@ -4057,9 +4057,9 @@ (case output {#Some [tags members]} (do meta_monad - [decls' (monad#each meta_monad (: (-> [Nat Symbol Type] (Meta (List Code))) - (function (_ [tag_index sname stype]) - (open_declaration alias tags tag_index sname source stype))) + [decls' (monad#each meta_monad (is (-> [Nat Symbol Type] (Meta (List Code))) + (function (_ [tag_index sname stype]) + (open_declaration alias tags tag_index sname source stype))) (enumeration (zipped/2 tags members)))] (meta#in (list#conjoint decls'))) @@ -4118,15 +4118,15 @@ (-> Text Refer (Meta (List Code))) (do meta_monad [current_module ..current_module_name - .let [test_referrals (: (-> Text (List Text) (List Text) (Meta (List Any))) - (function (_ module_name all_defs referred_defs) - (monad#each meta_monad - (: (-> Text (Meta Any)) - (function (_ _def) - (if (is_member? all_defs _def) - (meta#in []) - (failure ($_ text#composite _def " is not defined in module " module_name " @ " current_module))))) - referred_defs)))] + .let [test_referrals (is (-> Text (List Text) (List Text) (Meta (List Any))) + (function (_ module_name all_defs referred_defs) + (monad#each meta_monad + (is (-> Text (Meta Any)) + (function (_ _def) + (if (is_member? all_defs _def) + (meta#in []) + (failure ($_ text#composite _def " is not defined in module " module_name " @ " current_module))))) + referred_defs)))] defs' (case r_defs {#All} (exported_definitions module_name) @@ -4148,16 +4148,16 @@ {#Nothing} (in (list))) - .let [defs (list#each (: (-> Text Code) - (function (_ def) - (` ("lux def alias" (~ (local_symbol$ def)) (~ (symbol$ [module_name def])))))) + .let [defs (list#each (is (-> Text Code) + (function (_ def) + (` ("lux def alias" (~ (local_symbol$ def)) (~ (symbol$ [module_name def])))))) defs') openings (|> r_opens - (list#each (: (-> Openings (List Code)) - (function (_ [alias structs]) - (list#each (function (_ name) - (` (open: (~ (text$ alias)) (~ (symbol$ [module_name name]))))) - structs)))) + (list#each (is (-> Openings (List Code)) + (function (_ [alias structs]) + (list#each (function (_ name) + (` (open: (~ (text$ alias)) (~ (symbol$ [module_name name]))))) + structs)))) list#conjoint)]] (in (list#composite defs openings)))) @@ -4174,22 +4174,22 @@ (def: (refer_code module_name module_alias' [r_defs r_opens]) (-> Text (Maybe Text) Refer Code) (let [module_alias (..maybe#else module_name module_alias') - localizations (: (List Code) - (case r_defs - {#All} - (list (' "*")) - - {#Only defs} - (list (variant$ (list& (' "+") (list#each local_symbol$ defs)))) - - {#Exclude defs} - (list (variant$ (list& (' "-") (list#each local_symbol$ defs)))) - - {#Ignore} - (list) - - {#Nothing} - (list))) + localizations (is (List Code) + (case r_defs + {#All} + (list (' "*")) + + {#Only defs} + (list (variant$ (list& (' "+") (list#each local_symbol$ defs)))) + + {#Exclude defs} + (list (variant$ (list& (' "-") (list#each local_symbol$ defs)))) + + {#Ignore} + (list) + + {#Nothing} + (list))) openings (list#each (function (_ [alias structs]) (form$ (list& (text$ (..module_alias (list (alias_stand_in 0) module_alias) alias)) (list#each local_symbol$ structs)))) @@ -4221,26 +4221,26 @@ {#Some members} (do meta_monad [pattern' (monad#each meta_monad - (: (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code])) - (function (_ [r_slot_name [r_idx r_type]]) - (do meta_monad - [g!slot (..generated_symbol "")] - (meta#in [r_slot_name r_idx g!slot])))) + (is (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code])) + (function (_ [r_slot_name [r_idx r_type]]) + (do meta_monad + [g!slot (..generated_symbol "")] + (meta#in [r_slot_name r_idx g!slot])))) (zipped/2 tags (enumeration members)))] (let [pattern (|> pattern' - (list#each (: (-> [Symbol Nat Code] (List Code)) - (function (_ [r_slot_name r_idx r_var]) - (list (symbol$ r_slot_name) - r_var)))) + (list#each (is (-> [Symbol Nat Code] (List Code)) + (function (_ [r_slot_name r_idx r_var]) + (list (symbol$ r_slot_name) + r_var)))) list#conjoint tuple$) output (|> pattern' - (list#each (: (-> [Symbol Nat Code] (List Code)) - (function (_ [r_slot_name r_idx r_var]) - (list (symbol$ r_slot_name) - (if ("lux i64 =" idx r_idx) - value - r_var))))) + (list#each (is (-> [Symbol Nat Code] (List Code)) + (function (_ [r_slot_name r_idx r_var]) + (list (symbol$ r_slot_name) + (if ("lux i64 =" idx r_idx) + value + r_var))))) list#conjoint tuple$)] (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) @@ -4256,20 +4256,20 @@ _ (do meta_monad [bindings (monad#each meta_monad - (: (-> Code (Meta Code)) - (function (_ _) (..generated_symbol "temp"))) + (is (-> Code (Meta Code)) + (function (_ _) (..generated_symbol "temp"))) slots) .let [pairs (zipped/2 slots bindings) - update_expr (list#mix (: (-> [Code Code] Code Code) - (function (_ [s b] v) - (` (..has (~ s) (~ v) (~ b))))) + update_expr (list#mix (is (-> [Code Code] Code Code) + (function (_ [s b] v) + (` (..has (~ s) (~ v) (~ b))))) value (list#reversed pairs)) - [_ accesses'] (list#mix (: (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))]) - (function (_ [new_slot new_binding] [old_record accesses']) - [(` (the (~ new_slot) (~ new_binding))) - {#Item (list new_binding old_record) accesses'}])) - [record (: (List (List Code)) {#End})] + [_ 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))) + {#Item (list new_binding old_record) accesses'}])) + [record (is (List (List Code)) {#End})] pairs) accesses (list#conjoint (list#reversed accesses'))]] (in (list (` (let [(~+ accesses)] @@ -4304,26 +4304,26 @@ {#Some members} (do meta_monad [pattern' (monad#each meta_monad - (: (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code])) - (function (_ [r_slot_name [r_idx r_type]]) - (do meta_monad - [g!slot (..generated_symbol "")] - (meta#in [r_slot_name r_idx g!slot])))) + (is (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code])) + (function (_ [r_slot_name [r_idx r_type]]) + (do meta_monad + [g!slot (..generated_symbol "")] + (meta#in [r_slot_name r_idx g!slot])))) (zipped/2 tags (enumeration members)))] (let [pattern (|> pattern' - (list#each (: (-> [Symbol Nat Code] (List Code)) - (function (_ [r_slot_name r_idx r_var]) - (list (symbol$ r_slot_name) - r_var)))) + (list#each (is (-> [Symbol Nat Code] (List Code)) + (function (_ [r_slot_name r_idx r_var]) + (list (symbol$ r_slot_name) + r_var)))) list#conjoint tuple$) output (|> pattern' - (list#each (: (-> [Symbol Nat Code] (List Code)) - (function (_ [r_slot_name r_idx r_var]) - (list (symbol$ r_slot_name) - (if ("lux i64 =" idx r_idx) - (` ((~ fun) (~ r_var))) - r_var))))) + (list#each (is (-> [Symbol Nat Code] (List Code)) + (function (_ [r_slot_name r_idx r_var]) + (list (symbol$ r_slot_name) + (if ("lux i64 =" idx r_idx) + (` ((~ fun) (~ r_var))) + r_var))))) list#conjoint tuple$)] (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) @@ -4368,20 +4368,20 @@ [_ {#Tuple templates}])}] [_ {#Form data}] branches)) - (case (: (Maybe (List Code)) - (do maybe_monad - [bindings' (monad#each maybe_monad symbol_short bindings) - data' (monad#each maybe_monad tuple_list data)] - (let [num_bindings (list#size bindings')] - (if (every? (|>> ("lux i64 =" num_bindings)) - (list#each list#size data')) - (let [apply (: (-> Replacement_Environment (List Code)) - (function (_ env) (list#each (realized_template env) templates)))] - (|> data' - (list#each (function#composite apply (replacement_environment bindings'))) - list#conjoint - in)) - {#None})))) + (case (is (Maybe (List Code)) + (do maybe_monad + [bindings' (monad#each maybe_monad symbol_short bindings) + data' (monad#each maybe_monad tuple_list data)] + (let [num_bindings (list#size bindings')] + (if (every? (|>> ("lux i64 =" num_bindings)) + (list#each list#size data')) + (let [apply (is (-> Replacement_Environment (List Code)) + (function (_ env) (list#each (realized_template env) templates)))] + (|> data' + (list#each (function#composite apply (replacement_environment bindings'))) + list#conjoint + in)) + {#None})))) {#Some output} (meta#in (list#composite output branches)) @@ -4465,10 +4465,10 @@ inits (list#each product#right pairs)] (if (every? symbol? inits) (do meta_monad - [inits' (: (Meta (List Symbol)) - (case (monad#each maybe_monad symbol_name inits) - {#Some inits'} (meta#in inits') - {#None} (failure "Wrong syntax for loop"))) + [inits' (is (Meta (List Symbol)) + (case (monad#each maybe_monad symbol_name inits) + {#Some inits'} (meta#in inits') + {#None} (failure "Wrong syntax for loop"))) init_types (monad#each meta_monad type_definition inits') expected ..expected_type] (meta#in (list (` (("lux type check" @@ -4479,8 +4479,8 @@ (~+ inits)))))) (do meta_monad [aliases (monad#each meta_monad - (: (-> Code (Meta Code)) - (function (_ _) (..generated_symbol ""))) + (is (-> Code (Meta Code)) + (function (_ _) (..generated_symbol ""))) inits)] (meta#in (list (` (let [(~+ (..interleaved aliases inits))] (.loop (~ name) @@ -4516,14 +4516,14 @@ (case (parsed (andP (tupleP (someP bindingP)) (someP anyP)) tokens) {#Some [bindings bodies]} (loop [bindings bindings - map (: (PList (List Code)) - (list))] - (let [normal (: (-> Code (List Code)) - (function (_ it) - (list#mix (function (_ [binding expansion] it) - (list#conjoint (list#each (with_expansions' binding expansion) it))) - (list it) - map)))] + map (is (PList (List Code)) + (list))] + (let [normal (is (-> Code (List Code)) + (function (_ it) + (list#mix (function (_ [binding expansion] it) + (list#conjoint (list#each (with_expansions' binding expansion) it))) + (list it) + map)))] (case bindings {#Item [var_name expr] &rest} (do meta_monad @@ -4571,7 +4571,7 @@ (case (flat_alias type) (pattern#template [ ] [{#Named ["library/lux" ] _} - (in ( (:as value)))]) + (in ( (as value)))]) (["Bit" Bit bit$] ["Nat" Nat nat$] ["Int" Int int$] @@ -4658,7 +4658,7 @@ (list) (list g!_ (` {.#None})))))))) (` {.#Some (~ body)}) - (: (List [Code Code]) (list#reversed levels)))] + (is (List [Code Code]) (list#reversed levels)))] (list init_pattern inner_pattern_body))) (macro: (pattern#multi tokens) @@ -4713,7 +4713,7 @@ (-> a a Bit)) ("lux is" reference sample)) -(macro: .public (:expected tokens) +(macro: .public (as_expected tokens) (case tokens (pattern (list expr)) (do meta_monad @@ -4721,7 +4721,7 @@ (in (list (` ("lux type as" (~ (type_code type)) (~ expr)))))) _ - (failure (..wrong_syntax_error (symbol ..:expected))))) + (failure (..wrong_syntax_error (symbol ..as_expected))))) (def: location (Meta Location) @@ -4741,7 +4741,7 @@ _ (failure (..wrong_syntax_error (symbol ..undefined))))) -(macro: .public (:of tokens) +(macro: .public (type_of tokens) (case tokens (pattern (list [_ {#Symbol var_name}])) (do meta_monad @@ -4752,10 +4752,10 @@ (do meta_monad [g!temp (..generated_symbol "g!temp")] (in (list (` (let [(~ g!temp) (~ expression)] - (..:of (~ g!temp))))))) + (..type_of (~ g!temp))))))) _ - (failure (..wrong_syntax_error (symbol ..:of))))) + (failure (..wrong_syntax_error (symbol ..type_of))))) (def: (templateP tokens) (-> (List Code) (Maybe [Code Text (List Text) (List Code)])) @@ -4796,7 +4796,7 @@ (template [ ] [(template: .public ( it) - [(..|> it (..: (..I64 ..Any)) (..:as ))])] + [(..|> it (..is (..I64 ..Any)) (..as ))])] [i64 ..I64] [nat ..Nat] @@ -4837,7 +4837,7 @@ (case (..flat_alias type) (pattern#or {#Primitive "#Text" {#End}} {#Named ["library/lux" "Text"] {#Primitive "#Text" {#End}}}) - (in (:as ..Text value)) + (in (as ..Text value)) _ (failure ($_ text#composite @@ -4879,7 +4879,7 @@ {.#None} (failure (..wrong_syntax_error (symbol ..for))))) -... TODO: Delete "scope_type_vars" (including the #scope_type_vars Lux state) and ":parameter" ASAP. +... TODO: Delete "scope_type_vars" (including the #scope_type_vars Lux state) and "parameter" ASAP. (for "{old}" (as_is (def: (scope_type_vars state) (Meta (List Nat)) (case state @@ -4889,7 +4889,7 @@ ..#scope_type_vars scope_type_vars ..#eval _eval] {#Right [state scope_type_vars]})) - (macro: .public (:parameter tokens) + (macro: .public (parameter tokens) (case tokens (pattern (list [_ {#Nat idx}])) (do meta_monad @@ -4910,13 +4910,13 @@ [current_module ..current_module_name imports (imports_parser #0 current_module {#End} _imports) .let [=imports (|> imports - (list#each (: (-> Importation Code) - (function (_ [module_name m_alias =refer]) - (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))])))) + (list#each (is (-> Importation Code) + (function (_ [module_name m_alias =refer]) + (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))])))) tuple$) - =refers (list#each (: (-> Importation Code) - (function (_ [module_name m_alias =refer]) - (refer_code module_name m_alias =refer))) + =refers (list#each (is (-> Importation Code) + (function (_ [module_name m_alias =refer]) + (refer_code module_name m_alias =refer))) imports) =module (` ("lux def module" (~ =imports)))] g!_ (..generated_symbol "")] @@ -4974,23 +4974,6 @@ Bit #1) -(macro: .public (:let tokens) - (case tokens - (pattern (list [_ {#Tuple bindings}] bodyT)) - (case (..pairs bindings) - {#Some bindings} - (meta#in (list (` (..with_expansions [(~+ (|> bindings - (list#each (function (_ [localT valueT]) - (list localT (` (..as_is (~ valueT)))))) - (list#mix list#composite (list))))] - (~ bodyT))))) - - {#None} - (..failure ":let requires an even number of parts")) - - _ - (..failure (..wrong_syntax_error (symbol ..:let))))) - (macro: .public (try tokens) (case tokens (pattern (list expression)) @@ -5055,4 +5038,4 @@ (def: .public macro (-> Macro Macro') - (|>> (:as Macro'))) + (|>> (as Macro'))) diff --git a/stdlib/source/library/lux/abstract/apply.lux b/stdlib/source/library/lux/abstract/apply.lux index 6a509bb0a..0d3a0fd1e 100644 --- a/stdlib/source/library/lux/abstract/apply.lux +++ b/stdlib/source/library/lux/abstract/apply.lux @@ -8,11 +8,11 @@ (type: .public (Apply f) (Interface - (: (Functor f) - &functor) - (: (All (_ a b) - (-> (f a) (f (-> a b)) (f b))) - on))) + (is (Functor f) + &functor) + (is (All (_ a b) + (-> (f a) (f (-> a b)) (f b))) + on))) (implementation: .public (composite f_monad f_apply g_apply) (All (_ F G) @@ -29,7 +29,7 @@ (for @.old (let [fgf' (# f_apply on fgf (# f_monad in (function (_ gf gx) (# g_apply on gx gf))))] - (:expected (# f_apply on (:expected fgx) (:expected fgf')))) + (as_expected (# f_apply on (as_expected fgx) (as_expected fgf')))) (let [fgf' (# f_apply on fgf (# f_monad in (function (_ gf gx) (# g_apply on gx gf))))] diff --git a/stdlib/source/library/lux/abstract/codec.lux b/stdlib/source/library/lux/abstract/codec.lux index 4e146fa41..d7ff3c13f 100644 --- a/stdlib/source/library/lux/abstract/codec.lux +++ b/stdlib/source/library/lux/abstract/codec.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [control - ["[0]" try {"+" Try}]]]] - [// - [monad {"+" do}] - ["[0]" functor]]) + [library + [lux "*" + [control + ["[0]" try {"+" Try}]]]] + [// + [monad {"+" do}] + ["[0]" functor]]) (type: .public (Codec m a) (Interface - (: (-> a m) - encoded) - (: (-> m (Try a)) - decoded))) + (is (-> a m) + encoded) + (is (-> m (Try a)) + decoded))) (implementation: .public (composite cb_codec ba_codec) (All (_ a b c) diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux index b5c1598d2..a0dd97014 100644 --- a/stdlib/source/library/lux/abstract/comonad.lux +++ b/stdlib/source/library/lux/abstract/comonad.lux @@ -14,48 +14,48 @@ (type: .public (CoMonad w) (Interface - (: (Functor w) - &functor) - (: (All (_ a) - (-> (w a) a)) - out) - (: (All (_ a) - (-> (w a) (w (w a)))) - disjoint))) + (is (Functor w) + &functor) + (is (All (_ a) + (-> (w a) a)) + out) + (is (All (_ a) + (-> (w a) (w (w a)))) + disjoint))) (macro: .public (be tokens state) - (case (: (Maybe [(Maybe Text) Code (List Code) Code]) - (case tokens - (pattern (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] comonad)}] [_ {.#Tuple bindings}] body)) - {.#Some [{.#Some name} comonad bindings body]} - - (pattern (list comonad [_ {.#Tuple bindings}] body)) - {.#Some [{.#None} comonad bindings body]} + (case (is (Maybe [(Maybe Text) Code (List Code) Code]) + (case tokens + (pattern (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] comonad)}] [_ {.#Tuple bindings}] body)) + {.#Some [{.#Some name} comonad bindings body]} + + (pattern (list comonad [_ {.#Tuple bindings}] body)) + {.#Some [{.#None} comonad bindings body]} - _ - {.#None})) + _ + {.#None})) {.#Some [?name comonad bindings body]} (case (list.pairs bindings) {.#Some bindings} (let [[module short] (symbol ..be) - symbol (: (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) + symbol (is (-> Text Code) + (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) g!_ (symbol "_") g!each (symbol "each") g!disjoint (symbol "disjoint") - body' (list#mix (: (-> [Code Code] Code Code) - (function (_ binding body') - (with_expansions [ (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))] - (let [[var value] binding] - (case var - [_ {.#Symbol ["" _]}] - + body' (list#mix (is (-> [Code Code] Code Code) + (function (_ binding body') + (with_expansions [ (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))] + (let [[var value] binding] + (case var + [_ {.#Symbol ["" _]}] + - [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) + [_ {.#Symbol _}] + (` ((~ var) (~ value) (~ body'))) - _ - ))))) + _ + ))))) body (list.reversed bindings))] {.#Right [state (list (case ?name diff --git a/stdlib/source/library/lux/abstract/enum.lux b/stdlib/source/library/lux/abstract/enum.lux index c172df2ab..fd9e19e37 100644 --- a/stdlib/source/library/lux/abstract/enum.lux +++ b/stdlib/source/library/lux/abstract/enum.lux @@ -6,16 +6,16 @@ (type: .public (Enum e) (Interface - (: (Order e) &order) - (: (-> e e) succ) - (: (-> e e) pred))) + (is (Order e) &order) + (is (-> e e) succ) + (is (-> e e) pred))) (def: .public (range enum from to) (All (_ a) (-> (Enum a) a a (List a))) (let [(open "/#[0]") enum] (loop [end to - output (`` (: (List (~~ (:of from))) - {.#End}))] + output (`` (is (List (~~ (type_of from))) + {.#End}))] (cond (/#< end from) (again (/#pred end) {.#Item end output}) diff --git a/stdlib/source/library/lux/abstract/equivalence.lux b/stdlib/source/library/lux/abstract/equivalence.lux index 30ed40f20..3a28cbba2 100644 --- a/stdlib/source/library/lux/abstract/equivalence.lux +++ b/stdlib/source/library/lux/abstract/equivalence.lux @@ -1,14 +1,14 @@ (.using - [library - [lux "*"]] - [// - [functor - ["[0]" contravariant]]]) + [library + [lux "*"]] + [// + [functor + ["[0]" contravariant]]]) (type: .public (Equivalence a) (Interface - (: (-> a a Bit) - =))) + (is (-> a a Bit) + =))) (def: .public (rec sub) (All (_ a) diff --git a/stdlib/source/library/lux/abstract/functor.lux b/stdlib/source/library/lux/abstract/functor.lux index 636e4c592..1dd348bc3 100644 --- a/stdlib/source/library/lux/abstract/functor.lux +++ b/stdlib/source/library/lux/abstract/functor.lux @@ -4,10 +4,10 @@ (type: .public (Functor f) (Interface - (: (All (_ a b) - (-> (-> a b) - (-> (f a) (f b)))) - each))) + (is (All (_ a b) + (-> (-> a b) + (-> (f a) (f b)))) + each))) (type: .public (Or f g) (All (_ a) (.Or (f a) (g a)))) diff --git a/stdlib/source/library/lux/abstract/functor/contravariant.lux b/stdlib/source/library/lux/abstract/functor/contravariant.lux index 5366a4ecf..8777299c4 100644 --- a/stdlib/source/library/lux/abstract/functor/contravariant.lux +++ b/stdlib/source/library/lux/abstract/functor/contravariant.lux @@ -1,10 +1,10 @@ (.using - [library - [lux "*"]]) + [library + [lux "*"]]) (type: .public (Functor f) (Interface - (: (All (_ a b) - (-> (-> b a) - (-> (f a) (f b)))) - each))) + (is (All (_ a b) + (-> (-> b a) + (-> (f a) (f b)))) + each))) diff --git a/stdlib/source/library/lux/abstract/hash.lux b/stdlib/source/library/lux/abstract/hash.lux index c556c4598..04610b639 100644 --- a/stdlib/source/library/lux/abstract/hash.lux +++ b/stdlib/source/library/lux/abstract/hash.lux @@ -1,17 +1,17 @@ (.using - [library - [lux "*"]] - [// - ["[0]" equivalence {"+" Equivalence}] - [functor - ["[0]" contravariant]]]) + [library + [lux "*"]] + [// + ["[0]" equivalence {"+" Equivalence}] + [functor + ["[0]" contravariant]]]) (type: .public (Hash a) (Interface - (: (Equivalence a) - &equivalence) - (: (-> a Nat) - hash))) + (is (Equivalence a) + &equivalence) + (is (-> a Nat) + hash))) (implementation: .public functor (contravariant.Functor Hash) diff --git a/stdlib/source/library/lux/abstract/interval.lux b/stdlib/source/library/lux/abstract/interval.lux index 68865241c..5ed94dafe 100644 --- a/stdlib/source/library/lux/abstract/interval.lux +++ b/stdlib/source/library/lux/abstract/interval.lux @@ -9,14 +9,14 @@ (type: .public (Interval a) (Interface - (: (Enum a) - &enum) + (is (Enum a) + &enum) - (: a - bottom) + (is a + bottom) - (: a - top))) + (is a + top))) (def: .public (between enum bottom top) (All (_ a) (-> (Enum a) a a (Interval a))) diff --git a/stdlib/source/library/lux/abstract/mix.lux b/stdlib/source/library/lux/abstract/mix.lux index 0a3c2088a..1c13dd985 100644 --- a/stdlib/source/library/lux/abstract/mix.lux +++ b/stdlib/source/library/lux/abstract/mix.lux @@ -6,9 +6,9 @@ (type: .public (Mix F) (Interface - (: (All (_ a b) - (-> (-> b a a) a (F b) a)) - mix))) + (is (All (_ a b) + (-> (-> b a a) a (F b) a)) + mix))) (def: .public (with_monoid monoid mix value) (All (_ F a) diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux index 0802c0198..6a07fe8a2 100644 --- a/stdlib/source/library/lux/abstract/monad.lux +++ b/stdlib/source/library/lux/abstract/monad.lux @@ -45,47 +45,47 @@ (type: .public (Monad m) (Interface - (: (Functor m) - &functor) - (: (All (_ a) - (-> a (m a))) - in) - (: (All (_ a) - (-> (m (m a)) (m a))) - conjoint))) + (is (Functor m) + &functor) + (is (All (_ a) + (-> a (m a))) + in) + (is (All (_ a) + (-> (m (m a)) (m a))) + conjoint))) (macro: .public (do tokens state) - (case (: (Maybe [(Maybe Text) Code (List Code) Code]) - (case tokens - (pattern (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] monad)}] [_ {.#Tuple bindings}] body)) - {.#Some [{.#Some name} monad bindings body]} - - (pattern (list monad [_ {.#Tuple bindings}] body)) - {.#Some [{.#None} monad bindings body]} - - _ - {.#None})) + (case (is (Maybe [(Maybe Text) Code (List Code) Code]) + (case tokens + (pattern (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] monad)}] [_ {.#Tuple bindings}] body)) + {.#Some [{.#Some name} monad bindings body]} + + (pattern (list monad [_ {.#Tuple bindings}] body)) + {.#Some [{.#None} monad bindings body]} + + _ + {.#None})) {.#Some [?name monad bindings body]} (if (|> bindings list#size .int ("lux i64 %" +2) ("lux i64 =" +0)) (let [[module short] (symbol ..do) - symbol (: (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) + symbol (is (-> Text Code) + (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy])) g!_ (symbol "_") g!each (symbol "each") g!conjoint (symbol "conjoint") - body' (list#mix (: (-> [Code Code] Code Code) - (function (_ binding body') - (with_expansions [ (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))] - (let [[var value] binding] - (case var - [_ {.#Symbol ["" _]}] - - - [_ {.#Symbol _}] - (` ((~ var) (~ value) (~ body'))) - - _ - ))))) + body' (list#mix (is (-> [Code Code] Code Code) + (function (_ binding body') + (with_expansions [ (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))] + (let [[var value] binding] + (case var + [_ {.#Symbol ["" _]}] + + + [_ {.#Symbol _}] + (` ((~ var) (~ value) (~ body'))) + + _ + ))))) body (reversed (pairs bindings)))] {.#Right [state (list (case ?name diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux index 97cfae478..a6b99afc4 100644 --- a/stdlib/source/library/lux/abstract/monad/indexed.lux +++ b/stdlib/source/library/lux/abstract/monad/indexed.lux @@ -1,28 +1,28 @@ (.using - [library - [lux "*" - [control - ["<>" parser - ["<[0]>" code {"+" Parser}]]] - [data - [collection - ["[0]" list ("[1]#[0]" functor mix)]]] - ["[0]" macro - [syntax {"+" syntax:}] - ["[0]" code]]]] - ["[0]" //]) + [library + [lux "*" + [control + ["<>" parser + ["<[0]>" code {"+" Parser}]]] + [data + [collection + ["[0]" list ("[1]#[0]" functor mix)]]] + ["[0]" macro + [syntax {"+" syntax:}] + ["[0]" code]]]] + ["[0]" //]) (type: .public (IxMonad m) (Interface - (: (All (_ p a) - (-> a (m p p a))) - in) + (is (All (_ p a) + (-> a (m p p a))) + in) - (: (All (_ ii it io vi vo) - (-> (-> vi (m it io vo)) - (m ii it vi) - (m ii io vo))) - then))) + (is (All (_ ii it io vi vo) + (-> (-> vi (m it io vo)) + (m ii it vi) + (m ii io vo))) + then))) (type: Binding [Code Code]) diff --git a/stdlib/source/library/lux/abstract/monoid.lux b/stdlib/source/library/lux/abstract/monoid.lux index cf6e59cec..fe386411d 100644 --- a/stdlib/source/library/lux/abstract/monoid.lux +++ b/stdlib/source/library/lux/abstract/monoid.lux @@ -1,13 +1,13 @@ (.using - [library - [lux {"-" and}]]) + [library + [lux {"-" and}]]) (type: .public (Monoid a) (Interface - (: a - identity) - (: (-> a a a) - composite))) + (is a + identity) + (is (-> a a a) + composite))) (def: .public (and left right) (All (_ l r) (-> (Monoid l) (Monoid r) (Monoid [l r]))) diff --git a/stdlib/source/library/lux/abstract/order.lux b/stdlib/source/library/lux/abstract/order.lux index 610d477bb..e09899ad5 100644 --- a/stdlib/source/library/lux/abstract/order.lux +++ b/stdlib/source/library/lux/abstract/order.lux @@ -1,20 +1,20 @@ (.using - [library - [lux "*" - [control - ["[0]" function]]]] - [// - ["[0]" equivalence {"+" Equivalence}] - [functor - ["[0]" contravariant]]]) + [library + [lux "*" + [control + ["[0]" function]]]] + [// + ["[0]" equivalence {"+" Equivalence}] + [functor + ["[0]" contravariant]]]) (type: .public (Order a) (Interface - (: (Equivalence a) - &equivalence) + (is (Equivalence a) + &equivalence) - (: (-> a a Bit) - <))) + (is (-> a a Bit) + <))) (type: .public (Comparison a) (-> (Order a) a a Bit)) diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux index 84383bba4..c4bf4c544 100644 --- a/stdlib/source/library/lux/control/concatenative.lux +++ b/stdlib/source/library/lux/control/concatenative.lux @@ -133,12 +133,12 @@ (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 (` (: (All ((~ g!_) (~+ g!inputs) (~ g!output)) - (-> (-> (~+ g!inputs) (~ g!output)) - (=> [(~+ g!inputs)] [(~ g!output)]))) - (function ((~ g!_) (~ g!func)) - (function ((~ g!_) (~ (stack_mix 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_mix g!inputs g!stack))) + [(~ g!stack) ((~ g!func) (~+ g!inputs))]))))))))) (template [] [(`` (def: .public (~~ (template.symbol ["apply/" ])) diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux index cfa4fb11f..bdb3db4ce 100644 --- a/stdlib/source/library/lux/control/concurrency/actor.lux +++ b/stdlib/source/library/lux/control/concurrency/actor.lux @@ -28,8 +28,8 @@ [number ["n" nat]]] ["[0]" meta {"+" monad}] - [type {"+" :sharing} - ["[0]" abstract {"+" abstract: :representation :abstraction}]]]] + [type {"+" sharing} + ["[0]" abstract {"+" abstract: representation abstraction}]]]] [// ["[0]" atom {"+" Atom atom}] ["[0]" async {"+" Async Resolver} ("[1]#[0]" monad)] @@ -81,21 +81,21 @@ (def: .public (spawn! behavior init) (All (_ o s) (-> (Behavior o s) o (IO (Actor s)))) (io (let [[on_init on_mail] behavior - self (:sharing [o s] - (Behavior o s) - behavior - - (Actor s) - (:abstraction [#obituary (async.async []) - #mailbox (atom (async.async []))])) + self (sharing [o s] + (Behavior o s) + behavior + + (Actor s) + (abstraction [#obituary (async.async []) + #mailbox (atom (async.async []))])) process (loop [state (on_init init) - [|mailbox| _] (io.run! (atom.read! (the #mailbox (:representation self))))] + [|mailbox| _] (io.run! (atom.read! (the #mailbox (representation self))))] (do [! async.monad] [[head tail] |mailbox| ?state' (on_mail head state self)] (case ?state' {try.#Failure error} - (let [[_ resolve] (the #obituary (:representation self))] + (let [[_ resolve] (the #obituary (representation self))] (exec (io.run! (do io.monad [pending (..pending tail)] @@ -108,7 +108,7 @@ (def: .public (alive? actor) (All (_ s) (-> (Actor s) (IO Bit))) - (let [[obituary _] (the #obituary (:representation actor))] + (let [[obituary _] (the #obituary (representation actor))] (|> obituary async.value (# io.functor each @@ -121,12 +121,12 @@ (def: .public (obituary' actor) (All (_ s) (-> (Actor s) (IO (Maybe (Obituary s))))) - (let [[obituary _] (the #obituary (:representation actor))] + (let [[obituary _] (the #obituary (representation actor))] (async.value obituary))) (def: .public obituary (All (_ s) (-> (Actor s) (Async (Obituary s)))) - (|>> :representation + (|>> representation (the #obituary) product.left)) @@ -137,7 +137,7 @@ (if alive? (let [entry [mail (async.async [])]] (do ! - [|mailbox|&resolve (atom.read! (the #mailbox (:representation actor)))] + [|mailbox|&resolve (atom.read! (the #mailbox (representation actor)))] (loop [[|mailbox| resolve] |mailbox|&resolve] (do ! [|mailbox| (async.value |mailbox|)] @@ -147,7 +147,7 @@ [resolved? (resolve entry)] (if resolved? (do ! - [_ (atom.write! (product.right entry) (the #mailbox (:representation actor)))] + [_ (atom.write! (product.right entry) (the #mailbox (representation actor)))] (in {try.#Success []})) (again |mailbox|&resolve))) @@ -160,13 +160,13 @@ (def: (mail message) (All (_ s o) (-> (Message s o) [(Async (Try o)) (Mail s)])) - (let [[async resolve] (:sharing [s o] - (Message s o) - message - - [(Async (Try o)) - (Resolver (Try o))] - (async.async []))] + (let [[async resolve] (sharing [s o] + (Message s o) + message + + [(Async (Try o)) + (Resolver (Try o))] + (async.async []))] [async (function (_ state self) (do [! async.monad] @@ -271,7 +271,7 @@ (def: (~ export_policy) (~ g!actor) (All ((~ g!_) (~+ g!vars)) (..Behavior (~ state_type) ((~ g!type) (~+ g!vars)))) - [..#on_init (|>> ((~! abstract.:abstraction) (~ g!type))) + [..#on_init (|>> ((~! abstract.abstraction) (~ g!type))) ..#on_mail (~ (..on_mail g!_ ?on_mail))]) (~+ messages)))))))) @@ -279,12 +279,12 @@ (syntax: .public (actor [[state_type init] (.tuple (<>.and .any .any)) ?on_mail on_mail^]) (with_symbols [g!_] - (in (list (` (: ((~! io.IO) (..Actor (~ state_type))) - (..spawn! (: (..Behavior (~ state_type) (~ state_type)) - [..#on_init (|>>) - ..#on_mail (~ (..on_mail g!_ ?on_mail))]) - (: (~ state_type) - (~ init))))))))) + (in (list (` (is ((~! io.IO) (..Actor (~ state_type))) + (..spawn! (is (..Behavior (~ state_type) (~ state_type)) + [..#on_init (|>>) + ..#on_mail (~ (..on_mail g!_ ?on_mail))]) + (is (~ state_type) + (~ init))))))))) (type: Signature (Record @@ -334,13 +334,13 @@ (..Message (~ (the abstract.#abstraction actor_scope)) (~ output_type)))) (function ((~ g!_) (~ g!state) (~ g!self)) - (let [(~ g!state) (:as (~ (the abstract.#representation actor_scope)) - (~ g!state))] + (let [(~ g!state) (as (~ (the abstract.#representation actor_scope)) + (~ g!state))] (|> (~ body) - (: ((~! async.Async) ((~! try.Try) [(~ (the abstract.#representation actor_scope)) - (~ output_type)]))) - (:as ((~! async.Async) ((~! try.Try) [(~ (the abstract.#abstraction actor_scope)) - (~ output_type)])))))))) + (is ((~! async.Async) ((~! try.Try) [(~ (the abstract.#representation actor_scope)) + (~ output_type)]))) + (as ((~! async.Async) ((~! try.Try) [(~ (the abstract.#abstraction actor_scope)) + (~ output_type)])))))))) ))))) (type: .public Stop @@ -351,10 +351,10 @@ (def: .public (observe! action channel actor) (All (_ e s) (-> (-> e Stop (Mail s)) (Channel e) (Actor s) (IO Any))) - (let [signal (: (Atom Bit) - (atom.atom ..continue!)) - stop (: Stop - (atom.write! ..stop! signal))] + (let [signal (is (Atom Bit) + (atom.atom ..continue!)) + stop (is Stop + (atom.write! ..stop! signal))] (frp.subscribe! (function (_ event) (do [! io.monad] [continue? (atom.read! signal)] diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux index 32bc8cca1..6070efb3e 100644 --- a/stdlib/source/library/lux/control/concurrency/async.lux +++ b/stdlib/source/library/lux/control/concurrency/async.lux @@ -13,8 +13,8 @@ ["[0]" product]] [macro ["^" pattern]] - [type {"+" :sharing} - abstract]]] + [type {"+" sharing} + [abstract {"-" pattern}]]]] [// ["[0]" thread] ["[0]" atom {"+" Atom atom}]]) @@ -29,7 +29,7 @@ (def: (resolver async) (All (_ a) (-> (Async a) (Resolver a))) (function (resolve value) - (let [async (:representation async)] + (let [async (representation async)] (do [! io.monad] [(^.let old [_value _observers]) (atom.read! async)] (case _value @@ -49,23 +49,23 @@ (def: .public (resolved value) (All (_ a) (-> a (Async a))) - (:abstraction (atom [{.#Some value} (list)]))) + (abstraction (atom [{.#Some value} (list)]))) (def: .public (async _) (All (_ a) (-> Any [(Async a) (Resolver a)])) - (let [async (:abstraction (atom [{.#None} (list)]))] + (let [async (abstraction (atom [{.#None} (list)]))] [async (..resolver async)])) (def: .public value (All (_ a) (-> (Async a) (IO (Maybe a)))) - (|>> :representation + (|>> representation atom.read! (# io.functor each product.left))) (def: .public (upon! f async) (All (_ a) (-> (-> a (IO Any)) (Async a) (IO Any))) (do [! io.monad] - [.let [async (:representation async)] + [.let [async (representation async)] (^.let old [_value _observers]) (atom.read! async)] (case _value {.#Some value} @@ -77,7 +77,7 @@ [swapped? (atom.compare_and_swap! old new async)] (if swapped? (in []) - (upon! f (:abstraction async)))))))) + (upon! f (abstraction async)))))))) ) (def: .public resolved? @@ -128,13 +128,13 @@ (def: .public (and left right) (All (_ a b) (-> (Async a) (Async b) (Async [a b]))) - (let [[read! write!] (:sharing [a b] - [(Async a) (Async b)] - [left right] + (let [[read! write!] (sharing [a b] + [(Async a) (Async b)] + [left right] - [(Async [a b]) - (Resolver [a b])] - (..async [])) + [(Async [a b]) + (Resolver [a b])] + (..async [])) _ (io.run! (..upon! (function (_ left) (..upon! (function (_ right) (write! [left right])) diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index b15cecead..1fe0d8262 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -13,7 +13,7 @@ [collection ["[0]" array]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (with_expansions [ (as_is (ffi.import: (java/util/concurrent/atomic/AtomicReference a) "[1]::[0]" @@ -54,27 +54,27 @@ (def: .public (atom value) (All (_ a) (-> a (Atom a))) - (:abstraction (with_expansions [ (java/util/concurrent/atomic/AtomicReference::new value)] - (for @.old - @.jvm - ( 0 value ( 1)))))) + (abstraction (with_expansions [ (java/util/concurrent/atomic/AtomicReference::new value)] + (for @.old + @.jvm + ( 0 value ( 1)))))) (def: .public (read! atom) (All (_ a) (-> (Atom a) (IO a))) - (with_expansions [ (java/util/concurrent/atomic/AtomicReference::get (:representation atom))] + (with_expansions [ (java/util/concurrent/atomic/AtomicReference::get (representation atom))] (for @.old @.jvm - (io.io ( 0 (:representation atom)))))) + (io.io ( 0 (representation atom)))))) (def: .public (compare_and_swap! current new atom) (All (_ a) (-> a a (Atom a) (IO Bit))) - (io.io (with_expansions [ (ffi.of_boolean (java/util/concurrent/atomic/AtomicReference::compareAndSet current new (:representation atom)))] + (io.io (with_expansions [ (ffi.of_boolean (java/util/concurrent/atomic/AtomicReference::compareAndSet current new (representation atom)))] (for @.old @.jvm - (let [old ( 0 (:representation atom))] + (let [old ( 0 (representation atom))] (if (same? old current) (exec - ( 0 new (:representation atom)) + ( 0 new (representation atom)) true) false)))))) )) diff --git a/stdlib/source/library/lux/control/concurrency/frp.lux b/stdlib/source/library/lux/control/concurrency/frp.lux index c366207f9..361a2439b 100644 --- a/stdlib/source/library/lux/control/concurrency/frp.lux +++ b/stdlib/source/library/lux/control/concurrency/frp.lux @@ -11,8 +11,8 @@ ["[0]" try {"+" Try}] ["[0]" exception {"+" exception:}] ["[0]" io {"+" IO io}]] - [type {"+" :sharing} - abstract]]] + [type {"+" sharing} + [abstract {"-" pattern}]]]] [// ["[0]" atom {"+" Atom}] ["[0]" async {"+" Async} ("[1]#[0]" monad)]]) @@ -24,10 +24,10 @@ (type: .public (Sink a) (Interface - (: (IO (Try Any)) - close) - (: (-> a (IO (Try Any))) - feed))) + (is (IO (Try Any)) + close) + (is (-> a (IO (Try Any))) + feed))) (def: (sink resolve) (All (_ a) @@ -56,13 +56,13 @@ (loop [_ []] (do [! io.monad] [current (atom.read! sink) - .let [[next resolve_next] (:sharing [a] - (async.Resolver (Maybe [a (Channel a)])) - current - - [(Async (Maybe [a (Channel a)])) - (async.Resolver (Maybe [a (Channel a)]))] - (async.async []))] + .let [[next resolve_next] (sharing [a] + (async.Resolver (Maybe [a (Channel a)])) + current + + [(Async (Maybe [a (Channel a)])) + (async.Resolver (Maybe [a (Channel a)]))] + (async.async []))] fed? (current {.#Some [value next]})] (if fed? ... I fed the sink. @@ -123,28 +123,28 @@ (def: (conjoint mma) (let [[output sink] (channel [])] (exec - (: (Async Any) - (loop [mma mma] - (do [! async.monad] - [?mma mma] - (case ?mma - {.#Some [ma mma']} - (do ! - [_ (loop [ma ma] - (do ! - [?ma ma] - (case ?ma - {.#Some [a ma']} - (exec - (io.run! (# sink feed a)) - (again ma')) - - {.#None} - (in []))))] - (again mma')) - - {.#None} - (in (: Any (io.run! (# sink close)))))))) + (is (Async Any) + (loop [mma mma] + (do [! async.monad] + [?mma mma] + (case ?mma + {.#Some [ma mma']} + (do ! + [_ (loop [ma ma] + (do ! + [?ma ma] + (case ?ma + {.#Some [a ma']} + (exec + (io.run! (# sink feed a)) + (again ma')) + + {.#None} + (in []))))] + (again mma')) + + {.#None} + (in (is Any (io.run! (# sink close)))))))) output)))) (type: .public (Subscriber a) @@ -153,21 +153,21 @@ (def: .public (subscribe! subscriber channel) (All (_ a) (-> (Subscriber a) (Channel a) (IO Any))) (io (exec - (: (Async Any) - (loop [channel channel] - (do async.monad - [item channel] - (case item - {.#Some [head tail]} - (case (io.run! (subscriber head)) - {.#Some _} - (again tail) - - {.#None} - (in [])) - - {.#None} - (in []))))) + (is (Async Any) + (loop [channel channel] + (do async.monad + [item channel] + (case item + {.#Some [head tail]} + (case (io.run! (subscriber head)) + {.#Some _} + (again tail) + + {.#None} + (in [])) + + {.#None} + (in []))))) []))) (def: .public (only pass? channel) diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index 753b32dff..504e5472b 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -18,7 +18,7 @@ ["n" nat] ["i" int]]] [type - abstract + ["[0]" abstract {"-" pattern}] ["[0]" refinement]]]] [// ["[0]" atom {"+" Atom}] @@ -40,15 +40,15 @@ (-> Nat Semaphore) (let [max_positions (n.min initial_open_positions ..most_positions_possible)] - (:abstraction (atom.atom [#max_positions max_positions - #open_positions (.int max_positions) - #waiting_list queue.empty])))) + (abstraction (atom.atom [#max_positions max_positions + #open_positions (.int max_positions) + #waiting_list queue.empty])))) (def: .public (wait! semaphore) (Ex (_ k) (-> Semaphore (Async Any))) - (let [semaphore (:representation semaphore) - [signal sink] (: [(Async Any) (Resolver Any)] - (async.async []))] + (let [semaphore (representation semaphore) + [signal sink] (is [(Async Any) (Resolver Any)] + (async.async []))] (exec (io.run! (with_expansions [ (as_is (the #open_positions) (i.> -1))] @@ -71,7 +71,7 @@ (def: .public (signal! semaphore) (Ex (_ k) (-> Semaphore (Async (Try Int)))) - (let [semaphore (:representation semaphore)] + (let [semaphore (representation semaphore)] (async.future (do [! io.monad] [[pre post] (atom.update! (function (_ state) @@ -99,15 +99,15 @@ (def: .public (mutex _) (-> Any Mutex) - (:abstraction (semaphore 1))) + (abstraction (semaphore 1))) (def: acquire! (-> Mutex (Async Any)) - (|>> :representation ..wait!)) + (|>> representation ..wait!)) (def: release! (-> Mutex (Async Any)) - (|>> :representation ..signal!)) + (|>> representation ..signal!)) (def: .public (synchronize! mutex procedure) (All (_ a) (-> Mutex (IO (Async a)) (Async a))) @@ -122,7 +122,7 @@ (refinement.refiner (n.> 0))) (type: .public Limit - (:~ (refinement.type limit))) + (~ (refinement.type limit))) (abstract: .public Barrier (Record @@ -133,10 +133,10 @@ (def: .public (barrier limit) (-> Limit Barrier) - (:abstraction [#limit limit - #count (atom.atom 0) - #start_turnstile (..semaphore 0) - #end_turnstile (..semaphore 0)])) + (abstraction [#limit limit + #count (atom.atom 0) + #start_turnstile (..semaphore 0) + #end_turnstile (..semaphore 0)])) (def: (un_block! times turnstile) (-> Nat Semaphore (Async Any)) @@ -148,7 +148,7 @@ (# async.monad in [])))) (template [ ] - [(def: ( (^:representation barrier)) + [(def: ( (abstract.pattern barrier)) (-> Barrier (Async Any)) (do async.monad [.let [limit (refinement.value (the #limit barrier)) diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux index 2be44daba..3668a2e9c 100644 --- a/stdlib/source/library/lux/control/concurrency/stm.lux +++ b/stdlib/source/library/lux/control/concurrency/stm.lux @@ -16,7 +16,7 @@ [macro ["^" pattern]] [type - abstract]]] + [abstract {"-" pattern}]]]] [// ["[0]" atom {"+" Atom atom}] ["[0]" async {"+" Async Resolver}] @@ -30,24 +30,24 @@ (def: .public (var value) (All (_ a) (-> a (Var a))) - (:abstraction (atom.atom [value (list)]))) + (abstraction (atom.atom [value (list)]))) (def: read! (All (_ a) (-> (Var a) a)) - (|>> :representation atom.read! io.run! product.left)) + (|>> representation atom.read! io.run! product.left)) (def: (un_follow! sink var) (All (_ a) (-> (Sink a) (Var a) (IO Any))) (do io.monad [_ (atom.update! (function (_ [value observers]) [value (list.only (|>> (same? sink) not) observers)]) - (:representation var))] + (representation var))] (in []))) (def: (write! new_value var) (All (_ a) (-> a (Var a) (IO Any))) (do [! io.monad] - [.let [var' (:representation var)] + [.let [var' (representation var)] (^.let old [old_value observers]) (atom.read! var') succeeded? (atom.compare_and_swap! old [new_value observers] var')] (if succeeded? @@ -71,7 +71,7 @@ [.let [[channel sink] (frp.channel [])] _ (atom.update! (function (_ [value observers]) [value {.#Item sink observers}]) - (:representation target))] + (representation target))] (in [channel sink]))) ) @@ -91,11 +91,11 @@ (All (_ a) (-> (Var a) Tx (Maybe a))) (|> tx (list.example (function (_ [_var _original _current]) - (same? (:as (Var Any) var) - (:as (Var Any) _var)))) + (same? (as (Var Any) var) + (as (Var Any) _var)))) (# maybe.monad each (function (_ [_var _original _current]) _current)) - :expected)) + as_expected)) (def: .public (read var) (All (_ a) (-> (Var a) (STM a))) @@ -116,11 +116,11 @@ {.#End} {.#Item [_var _original _current] tx'} - (if (same? (:as (Var Any) var) - (:as (Var Any) _var)) - {.#Item [#var (:as (Var Any) _var) - #original (:as Any _original) - #current (:as Any value)] + (if (same? (as (Var Any) var) + (as (Var Any) _var)) + {.#Item [#var (as (Var Any) _var) + #original (as Any _original) + #current (as Any value)] tx'} {.#Item [#var _var #original _original diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index ff25a2891..3d0be75fd 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -78,13 +78,13 @@ (def: exception (Parser [Code (List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)]) - (let [private (: (Parser [(List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)]) - ($_ <>.and - (<>.else (list) (.tuple (<>.some |type_variable|.parser))) - (<>.either (.form (<>.and .local_symbol |input|.parser)) - (<>.and .local_symbol (<>#in (list)))) - (<>.maybe .any) - ))] + (let [private (is (Parser [(List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)]) + ($_ <>.and + (<>.else (list) (.tuple (<>.some |type_variable|.parser))) + (<>.either (.form (<>.and .local_symbol |input|.parser)) + (<>.and .local_symbol (<>#in (list)))) + (<>.maybe .any) + ))] ($_ <>.either (<>.and .any private) (<>.and (<>#in (` .private)) private) @@ -118,15 +118,15 @@ largest_header_size)) text.together (text#composite text.new_line)) - on_entry (: (-> [Text Text] Text) - (function (_ [header message]) - (let [padding (|> " " - (list.repeated (n.- (text.size header) - largest_header_size)) - text.together)] - (|> message - (text.replaced text.new_line on_new_line) - ($_ text#composite padding header header_separator)))))] + on_entry (is (-> [Text Text] Text) + (function (_ [header message]) + (let [padding (|> " " + (list.repeated (n.- (text.size header) + largest_header_size)) + text.together)] + (|> message + (text.replaced text.new_line on_new_line) + ($_ text#composite padding header header_separator)))))] (case entries {.#End} "" diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index ef0836888..f932b64e9 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -36,9 +36,9 @@ (monad.all !)) .let [inlined (` (("lux in-module" (~ (code.text @)) - (.: (~ type) - (.function ((~ (code.local_symbol name)) (~+ parameters)) - (~ term)))) + (.is (~ type) + (.function ((~ (code.local_symbol name)) (~+ parameters)) + (~ term)))) (~+ (list#each (function (_ g!parameter) (` ((~' ~) (~ g!parameter)))) g!parameters)))) diff --git a/stdlib/source/library/lux/control/function/memo.lux b/stdlib/source/library/lux/control/function/memo.lux index 381a1ba28..69b78c0c3 100644 --- a/stdlib/source/library/lux/control/function/memo.lux +++ b/stdlib/source/library/lux/control/function/memo.lux @@ -3,6 +3,7 @@ (.using [library [lux {"-" open} + ["[0]" type] [abstract [hash {"+" Hash}] [monad {"+" do}]] @@ -37,7 +38,7 @@ (def: .public (open memo) (All (_ i o) - (:let [Memory (Dictionary i o)] + (type.let [Memory (Dictionary i o)] (-> (Memo i o) (-> [Memory i] [Memory o])))) (let [memo (//.fixed (//.mixed ..memoization (//.of_recursive memo)))] (function (_ [memory input]) diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index ba9da195e..02f5eaabb 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -47,8 +47,8 @@ (.def: (macro g!context g!self) (-> Code Code Macro) - (<| (:as Macro) - (: Macro') + (<| (as Macro) + (is Macro') (function (_ parameters) (# meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters)))))))) @@ -60,9 +60,9 @@ {.#Item mutual {.#End}} (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local_symbol)] - (in (list (` (.let [(~ g!name) (: (~ (the #type mutual)) - (function (~ (declaration.format (the #declaration mutual))) - (~ (the #body mutual))))] + (in (list (` (.let [(~ g!name) (is (~ (the #type mutual)) + (function (~ (declaration.format (the #declaration mutual))) + (~ (the #body mutual))))] (~ body)))))) _ @@ -84,9 +84,9 @@ (..macro g!context g!name)]) (list.zipped/2 hidden_names functions)))] - (in (list (` (.let [(~ g!context) (: (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) + (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)))) @@ -138,9 +138,9 @@ functions)))] (in (list& (` (.def: (~ g!context) [(~+ (list#each (the [#mutual #type]) functions))] - (.let [(~ g!context) (: (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) + (.let [(~ g!context) (is (Rec (~ g!context) + [(~+ context_types)]) + [(~+ definitions)]) [(~+ user_names)] (~ g!context)] [(~+ (list#each (function (_ g!name) (` ((~ g!name) (~ g!context)))) diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index f112b4e1b..3edf5e3ee 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -1,34 +1,35 @@ (.using - [library - [lux "*" - [abstract - [functor {"+" Functor}] - [apply {"+" Apply}] - [monad {"+" Monad do}]] - [control - [parser - ["<[0]>" code]]] - [type - abstract] - [macro {"+" with_symbols} - [syntax {"+" syntax:}] - ["[0]" template]]]]) + [library + [lux "*" + [abstract + [functor {"+" Functor}] + [apply {"+" Apply}] + [monad {"+" Monad do}]] + [control + [parser + ["<[0]>" code]]] + [type + [abstract {"-" pattern}]] + [macro {"+" with_symbols} + [syntax {"+" syntax:}] + ["[0]" template]]]]) (abstract: .public (IO a) (-> Any a) (def: label (All (_ a) (-> (-> Any a) (IO a))) - (|>> :abstraction)) + (|>> abstraction)) (template: (!io computation) - [(:abstraction (template.with_locals [g!func g!arg] - (function (g!func g!arg) - computation)))]) + [(abstraction + (template.with_locals [g!func g!arg] + (function (g!func g!arg) + computation)))]) (template: (run!' io) ... creatio ex nihilo - [((:representation io) [])]) + [((representation io) [])]) (syntax: .public (io [computation .any]) (with_symbols [g!func g!arg] diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux index 01b3432cd..27131e570 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -14,34 +14,34 @@ ["[0]" atom]]] [macro {"+" with_symbols} [syntax {"+" syntax:}]] - [type {"+" :sharing} - abstract]]]) + [type {"+" sharing} + [abstract {"-" pattern}]]]]) (abstract: .public (Lazy a) (-> [] a) (def: (lazy' generator) (All (_ a) (-> (-> [] a) (Lazy a))) - (let [cache (atom.atom (:sharing [a] - (-> [] a) - generator + (let [cache (atom.atom (sharing [a] + (-> [] a) + generator - (Maybe a) - {.#None}))] - (:abstraction (function (_ _) - (case (io.run! (atom.read! cache)) - {.#Some value} - value + (Maybe a) + {.#None}))] + (abstraction (function (_ _) + (case (io.run! (atom.read! cache)) + {.#Some value} + value - _ - (let [value (generator [])] - (exec - (io.run! (atom.compare_and_swap! _ {.#Some value} cache)) - value))))))) + _ + (let [value (generator [])] + (exec + (io.run! (atom.compare_and_swap! _ {.#Some value} cache)) + value))))))) (def: .public (value lazy) (All (_ a) (-> (Lazy a) a)) - ((:representation lazy) []))) + ((representation lazy) []))) (syntax: .public (lazy [expression .any]) (with_symbols [g!_] diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux index cd963db10..98192ffa1 100644 --- a/stdlib/source/library/lux/control/maybe.lux +++ b/stdlib/source/library/lux/control/maybe.lux @@ -39,7 +39,7 @@ ... {.#None} it - (:expected it)))) + (as_expected it)))) (implementation: .public apply (Apply Maybe) @@ -69,7 +69,7 @@ ... {.#None} it - (:expected it)))) + (as_expected it)))) (implementation: .public (equivalence super) (All (_ a) (-> (Equivalence a) (Equivalence (Maybe a)))) @@ -119,7 +119,7 @@ ... {.#None} it - (in (:expected it)))))) + (in (as_expected it)))))) (def: .public (lifted monad) (All (_ M a) (-> (Monad M) (-> (M a) (M (Maybe a))))) @@ -128,7 +128,7 @@ (macro: .public (else tokens state) (case tokens (pattern (.list else maybe)) - (let [g!temp (: Code [location.dummy {.#Symbol ["" ""]}])] + (let [g!temp (is Code [location.dummy {.#Symbol ["" ""]}])] {.#Right [state (.list (` (.case (~ maybe) {.#Some (~ g!temp)} (~ g!temp) diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux index ba305659a..b8c37c1bb 100644 --- a/stdlib/source/library/lux/control/parser/binary.lux +++ b/stdlib/source/library/lux/control/parser/binary.lux @@ -1,7 +1,7 @@ (.using [library [lux {"-" and or nat int rev list type symbol} - [type {"+" :sharing}] + [type {"+" sharing}] [abstract [hash {"+" Hash}] [monad {"+" do}]] @@ -111,8 +111,8 @@ (template: (!variant +) [(do [! //.monad] - [flag (: (Parser Nat) - ..bits/8)] + [flag (is (Parser Nat) + ..bits/8)] (with_expansions [+' (template.spliced +)] (case flag (^.template [ ] @@ -144,8 +144,8 @@ (def: .public bit (Parser Bit) (do //.monad - [value (: (Parser Nat) - ..bits/8)] + [value (is (Parser Nat) + ..bits/8)] (case value 0 (in #0) 1 (in #1) @@ -192,15 +192,15 @@ [(def: .public ( valueP) (All (_ v) (-> (Parser v) (Parser (Sequence v)))) (do //.monad - [amount (: (Parser Nat) - )] + [amount (is (Parser Nat) + )] (loop [index 0 - output (:sharing [v] - (Parser v) - valueP - - (Sequence v) - sequence.empty)] + output (sharing [v] + (Parser v) + valueP + + (Sequence v) + sequence.empty)] (if (n.< amount index) (do //.monad [value valueP] diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux index 8550ce29f..6587f2270 100644 --- a/stdlib/source/library/lux/control/parser/type.lux +++ b/stdlib/source/library/lux/control/parser/type.lux @@ -186,7 +186,7 @@ .let [funcL (label funcI) [all_varsL env'] (loop [current_arg 0 env' env - all_varsL (: (List Code) (list))] + all_varsL (is (List Code) (list))] (if (n.< num_args current_arg) (if (n.= 0 current_arg) (let [varL (label (++ funcI))] diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index f66ce87c4..b23ddf2e6 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["[0]" io {"+" IO}] - ["<>" parser - ["" code]] - [concurrency - ["[0]" async {"+" Async}]]] - [data - [text - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" functor)]]] - [type - abstract] - ["[0]" meta] - ["[0]" macro - ["[0]" code] - [syntax {"+" syntax:} - ["|[0]|" export] - ["|[0]|" declaration]]]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["[0]" io {"+" IO}] + ["<>" parser + ["" code]] + [concurrency + ["[0]" async {"+" Async}]]] + [data + [text + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" functor)]]] + [type + [abstract {"-" pattern}]] + ["[0]" meta] + ["[0]" macro + ["[0]" code] + [syntax {"+" syntax:} + ["|[0]|" export] + ["|[0]|" declaration]]]]]) (abstract: .public (Capability brand input output) (-> input output) @@ -30,14 +30,14 @@ (All (_ brand input output) (-> (-> input output) (Capability brand input output))) - (|>> :abstraction)) + (|>> abstraction)) (def: .public (use capability input) (All (_ brand input output) (-> (Capability brand input output) input output)) - ((:representation capability) input)) + ((representation capability) input)) (syntax: .public (capability: [[export_policy declaration [forger input output]] (|export|.parser @@ -65,5 +65,5 @@ (All (_ brand input output) (-> (Capability brand input (IO output)) (Capability brand input (Async output)))) - (..capability (|>> ((:representation capability)) async.future))) + (..capability (|>> ((representation capability)) async.future))) ) diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux index 17a7ff1d8..d3165f0c6 100644 --- a/stdlib/source/library/lux/control/security/policy.lux +++ b/stdlib/source/library/lux/control/security/policy.lux @@ -1,12 +1,12 @@ (.using - [library - [lux "*" - [abstract - [functor {"+" Functor}] - [apply {"+" Apply}] - [monad {"+" Monad}]] - [type - abstract]]]) + [library + [lux "*" + [abstract + [functor {"+" Functor}] + [apply {"+" Apply}] + [monad {"+" Monad}]] + [type + [abstract {"-" pattern}]]]]) (abstract: .public (Policy brand value label) value @@ -39,8 +39,8 @@ (def: privilege Privilege - [#can_upgrade (|>> :abstraction) - #can_downgrade (|>> :representation)]) + [#can_upgrade (|>> abstraction) + #can_downgrade (|>> representation)]) (def: .public (with_policy context) (All (_ brand scope) @@ -55,25 +55,25 @@ (constructor (All (_ value) (Policy brand value label)))))) (implementation: .public functor - (:~ (..of_policy Functor)) + (~ (..of_policy Functor)) (def: (each f fa) - (|> fa :representation f :abstraction))) + (|> fa representation f abstraction))) (implementation: .public apply - (:~ (..of_policy Apply)) + (~ (..of_policy Apply)) (def: &functor ..functor) (def: (on fa ff) - (:abstraction ((:representation ff) (:representation fa))))) + (abstraction ((representation ff) (representation fa))))) (implementation: .public monad - (:~ (..of_policy Monad)) + (~ (..of_policy Monad)) (def: &functor ..functor) - (def: in (|>> :abstraction)) - (def: conjoint (|>> :representation))) + (def: in (|>> abstraction)) + (def: conjoint (|>> representation))) ) (template [ ] diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux index b07c213a1..95c7ddc69 100644 --- a/stdlib/source/library/lux/control/thread.lux +++ b/stdlib/source/library/lux/control/thread.lux @@ -12,7 +12,7 @@ [collection ["[0]" array {"+" Array}]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (type: .public (Thread ! a) (-> ! a)) @@ -25,33 +25,33 @@ (function (_ !) (|> (array.empty 1) (array.write! 0 init) - :abstraction))) + abstraction))) (def: .public (read! box) (All (_ ! a) (-> (Box ! a) (Thread ! a))) (function (_ !) (for @.old - ("jvm aaload" (:representation box) 0) + ("jvm aaload" (representation box) 0) @.jvm ("jvm array read object" (|> 0 - (:as (Primitive "java.lang.Long")) + (as (Primitive "java.lang.Long")) "jvm object cast" "jvm conversion long-to-int") - (:representation box)) + (representation box)) - @.js ("js array read" 0 (:representation box)) - @.python ("python array read" 0 (:representation box)) - @.lua ("lua array read" 0 (:representation box)) - @.ruby ("ruby array read" 0 (:representation box)) - @.php ("php array read" 0 (:representation box)) - @.scheme ("scheme array read" 0 (:representation box))))) + @.js ("js array read" 0 (representation box)) + @.python ("python array read" 0 (representation box)) + @.lua ("lua array read" 0 (representation box)) + @.ruby ("ruby array read" 0 (representation box)) + @.php ("php array read" 0 (representation box)) + @.scheme ("scheme array read" 0 (representation box))))) (def: .public (write! value box) (All (_ a) (-> a (All (_ !) (-> (Box ! a) (Thread ! Any))))) (function (_ !) - (|> box :representation (array.write! 0 value) :abstraction))) + (|> box representation (array.write! 0 value) abstraction))) ) (def: .public (result thread) diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux index 6f50ef702..4da14bb92 100644 --- a/stdlib/source/library/lux/control/try.lux +++ b/stdlib/source/library/lux/control/try.lux @@ -25,7 +25,7 @@ ... {#Failure msg} it - (:expected it)))) + (as_expected it)))) (implementation: .public apply (Apply Try) @@ -41,11 +41,11 @@ ... {#Failure msg} it - (:expected it)) + (as_expected it)) ... {#Failure msg} it - (:expected it)))) + (as_expected it)))) (implementation: .public monad (Monad Try) @@ -62,7 +62,7 @@ ... {#Failure msg} it - (:expected it)))) + (as_expected it)))) (implementation: .public (with monad) ... TODO: Replace (All (_ a) (! (Try a))) with (functor.Then ! Try) @@ -85,7 +85,7 @@ ... {#Failure error} it - (in (:expected it)))))) + (in (as_expected it)))))) (def: .public (lifted monad) (All (_ ! a) (-> (Monad !) (-> (! a) (! (Try a))))) diff --git a/stdlib/source/library/lux/control/writer.lux b/stdlib/source/library/lux/control/writer.lux index 852891255..bfbf6183e 100644 --- a/stdlib/source/library/lux/control/writer.lux +++ b/stdlib/source/library/lux/control/writer.lux @@ -63,12 +63,12 @@ (def: (conjoint MlMla) (do monad [[l1 Mla] (for @.old - (: {.#Apply (Writer (:parameter 0) - {.#Apply (Writer (:parameter 0) - (:parameter 2)) - (:parameter 1)}) - (:parameter 1)} - MlMla) + (is {.#Apply (Writer (parameter 0) + {.#Apply (Writer (parameter 0) + (parameter 2)) + (parameter 1)}) + (parameter 1)} + MlMla) ... On new compiler MlMla) [l2 a] Mla] diff --git a/stdlib/source/library/lux/data/collection/bits.lux b/stdlib/source/library/lux/data/collection/bits.lux index 45527975a..797bb5981 100644 --- a/stdlib/source/library/lux/data/collection/bits.lux +++ b/stdlib/source/library/lux/data/collection/bits.lux @@ -83,7 +83,7 @@ chunk (|> (if (same? ..empty output) - (: Bits (array.empty size|output)) + (is Bits (array.empty size|output)) output) (array.write! idx|output (.i64 chunk)) (again (-- size|output)))) @@ -124,7 +124,7 @@ chunk (if (n.> 0 size|output) (|> (if (same? ..empty output) - (: Bits (array.empty size|output)) + (is Bits (array.empty size|output)) output) (array.write! idx (.i64 chunk)) (again (-- size|output))) @@ -151,7 +151,7 @@ chunk (|> (if (same? ..empty output) - (: Bits (array.empty size|output)) + (is Bits (array.empty size|output)) output) (array.write! idx (.i64 chunk)) (again (-- size|output)))) diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux index 4b0071ddd..450bfea3a 100644 --- a/stdlib/source/library/lux/data/collection/list.lux +++ b/stdlib/source/library/lux/data/collection/list.lux @@ -382,10 +382,10 @@ (if (< x x') [{.#Item x' pre} post] [pre {.#Item x' post}])) - (`` [(: (~~ (:of xs)) - (list)) - (: (~~ (:of xs)) - (list))]) + (`` [(is (~~ (type_of xs)) + (list)) + (is (~~ (type_of xs)) + (list))]) xs')] ($_ composite (sorted < pre) (list x) (sorted < post))))) @@ -460,9 +460,9 @@ (if (n.> 0 num_lists) (let [(open "[0]") ..functor indices (..indices num_lists) - type_vars (: (List Code) (each (|>> nat#encoded symbol$) indices)) + type_vars (is (List Code) (each (|>> nat#encoded symbol$) indices)) zipped_type (` (.All ((~ (symbol$ "0_")) (~+ type_vars)) - (-> (~+ (each (: (-> Code Code) (function (_ var) (` (List (~ var))))) + (-> (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var))))) type_vars)) (List [(~+ type_vars)])))) vars+lists (|> indices @@ -476,15 +476,15 @@ g!step (symbol$ "0step0") g!blank (symbol$ "0,0") list_vars (each product.right vars+lists) - code (` (: (~ zipped_type) - (function ((~ g!step) (~+ list_vars)) - (case [(~+ list_vars)] - (~ pattern) - {.#Item [(~+ (each product.left vars+lists))] - ((~ g!step) (~+ list_vars))} - - (~ g!blank) - {.#End}))))] + 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."}) @@ -502,10 +502,10 @@ indices (..indices num_lists) g!return_type (symbol$ "0return_type0") g!func (symbol$ "0func0") - type_vars (: (List Code) (each (|>> nat#encoded symbol$) indices)) + 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 (: (-> Code Code) (function (_ var) (` (List (~ var))))) + (~+ (each (is (-> Code Code) (function (_ var) (` (List (~ var))))) type_vars)) (List (~ g!return_type))))) vars+lists (|> indices @@ -519,15 +519,15 @@ g!step (symbol$ "0step0") g!blank (symbol$ "0,0") list_vars (each product.right vars+lists) - code (` (: (~ 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}))))] + 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."}) @@ -585,9 +585,9 @@ (do [! monad] [lMla MlMla ... TODO: Remove this version ASAP and use one below. - lla (for @.old (: {.#Apply (type (List (List (:parameter 1)))) - (:parameter 0)} - (monad.all ! lMla)) + lla (for @.old (is {.#Apply (type (List (List (parameter 1)))) + (parameter 0)} + (monad.all ! lMla)) (monad.all ! lMla))] (in (..together lla))))) diff --git a/stdlib/source/library/lux/data/collection/queue/priority.lux b/stdlib/source/library/lux/data/collection/queue/priority.lux index 86a1dc237..102472124 100644 --- a/stdlib/source/library/lux/data/collection/queue/priority.lux +++ b/stdlib/source/library/lux/data/collection/queue/priority.lux @@ -1,20 +1,20 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}] - [monad {"+" do}]] - [control - ["[0]" maybe]] - [data - [collection - ["[0]" tree "_" - ["[1]" finger {"+" Tree}]]]] - [math - [number - ["n" nat ("[1]#[0]" interval)]]] - [type {"+" :by_example} - [abstract {"+" abstract: :abstraction :representation}]]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}] + [monad {"+" do}]] + [control + ["[0]" maybe]] + [data + [collection + ["[0]" tree "_" + ["[1]" finger {"+" Tree}]]]] + [math + [number + ["n" nat ("[1]#[0]" interval)]]] + [type {"+" by_example} + [abstract {"+" abstract: abstraction representation}]]]]) (type: .public Priority Nat) @@ -31,29 +31,29 @@ (tree.builder n.maximum)) (def: :@: - (:by_example [@] - (tree.Builder @ Priority) - ..builder - - @)) + (by_example [@] + (tree.Builder @ Priority) + ..builder + + @)) (abstract: .public (Queue a) (Maybe (Tree :@: Priority a)) (def: .public empty Queue - (:abstraction {.#None})) + (abstraction {.#None})) (def: .public (front queue) (All (_ a) (-> (Queue a) (Maybe a))) (do maybe.monad - [tree (:representation queue)] + [tree (representation queue)] (tree.one (n.= (tree.tag tree)) tree))) (def: .public (size queue) (All (_ a) (-> (Queue a) Nat)) - (case (:representation queue) + (case (representation queue) {.#None} 0 @@ -68,7 +68,7 @@ (def: .public (member? equivalence queue member) (All (_ a) (-> (Equivalence a) (Queue a) a Bit)) - (case (:representation queue) + (case (representation queue) {.#None} false @@ -84,9 +84,9 @@ (def: .public (next queue) (All (_ a) (-> (Queue a) (Queue a))) - (:abstraction + (abstraction (do maybe.monad - [tree (:representation queue) + [tree (representation queue) .let [highest_priority (tree.tag tree)]] (loop [node tree] (case (tree.root node) @@ -113,8 +113,8 @@ (def: .public (end priority value queue) (All (_ a) (-> Priority a (Queue a) (Queue a))) (let [addition (# ..builder leaf priority value)] - (:abstraction - (case (:representation queue) + (abstraction + (case (representation queue) {.#None} {.#Some addition} diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 34a3e512d..285a65109 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -225,8 +225,8 @@ ... If so, a brand-new root must be established, that is ... 1-level taller. (|> sequence - (.has #root (|> (`` (: (Hierarchy (~~ (:of val))) - (empty_hierarchy []))) + (.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))))) (.revised #level level_up)) @@ -291,9 +291,9 @@ {try.#Success (if (n.< (tail_off sequence_size) idx) (.revised #root (hierarchy#has (the #level sequence) idx val) sequence) - (.revised #tail (`` (: (-> (Base (~~ (:of val))) - (Base (~~ (:of val)))) - (|>> array.clone (array.has! (branch_idx idx) 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])))) @@ -485,15 +485,15 @@ [(def: .public (All (_ a) (-> (Predicate a) (Sequence a) Bit)) - (let [help (: (All (_ a) - (-> (Predicate a) (Node a) Bit)) - (function (help predicate node) - (case node - {#Base base} - ( predicate base) - - {#Hierarchy hierarchy} - ( (help predicate) hierarchy))))] + (let [help (is (All (_ a) + (-> (Predicate a) (Node a) Bit)) + (function (help predicate node) + (case node + {#Base base} + ( predicate base) + + {#Hierarchy hierarchy} + ( (help predicate) hierarchy))))] (function ( predicate sequence) (let [(open "_[0]") sequence] ( (help predicate {#Hierarchy _#root}) diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux index ea7fd7df0..6de0ed5df 100644 --- a/stdlib/source/library/lux/data/collection/set/multi.lux +++ b/stdlib/source/library/lux/data/collection/set/multi.lux @@ -14,7 +14,7 @@ [number ["n" nat]]] [type - [abstract {"+" abstract: :abstraction :representation ^:representation}]]]] + ["[0]" abstract {"+" abstract: abstraction representation}]]]] ["[0]" // [// ["[0]" list ("[1]#[0]" mix monoid)] @@ -25,42 +25,42 @@ (def: .public empty (All (_ a) (-> (Hash a) (Set a))) - (|>> dictionary.empty :abstraction)) + (|>> dictionary.empty abstraction)) (def: .public size (All (_ a) (-> (Set a) Nat)) - (|>> :representation dictionary.values (list#mix n.+ 0))) + (|>> representation dictionary.values (list#mix n.+ 0))) (def: .public (has multiplicity elem set) (All (_ a) (-> Nat a (Set a) (Set a))) (case multiplicity 0 set _ (|> set - :representation + representation (dictionary.revised' elem 0 (n.+ multiplicity)) - :abstraction))) + abstraction))) (def: .public (lacks multiplicity elem set) (All (_ a) (-> Nat a (Set a) (Set a))) (case multiplicity 0 set - _ (case (dictionary.value elem (:representation set)) + _ (case (dictionary.value elem (representation set)) {.#Some current} - (:abstraction + (abstraction (if (n.> multiplicity current) - (dictionary.revised elem (n.- multiplicity) (:representation set)) - (dictionary.lacks elem (:representation set)))) + (dictionary.revised elem (n.- multiplicity) (representation set)) + (dictionary.lacks elem (representation set)))) {.#None} set))) (def: .public (multiplicity set elem) (All (_ a) (-> (Set a) a Nat)) - (|> set :representation (dictionary.value elem) (maybe.else 0))) + (|> set representation (dictionary.value elem) (maybe.else 0))) (def: .public list (All (_ a) (-> (Set a) (List a))) - (|>> :representation + (|>> representation dictionary.entries (list#mix (function (_ [elem multiplicity] output) (list#composite (list.repeated multiplicity elem) output)) @@ -69,13 +69,13 @@ (template [ ] [(def: .public ( parameter subject) (All (_ a) (-> (Set a) (Set a) (Set a))) - (:abstraction (dictionary.merged_with (:representation parameter) (:representation subject))))] + (abstraction (dictionary.merged_with (representation parameter) (representation subject))))] [union n.max] [sum n.+] ) - (def: .public (intersection parameter (^:representation subject)) + (def: .public (intersection parameter (abstract.pattern subject)) (All (_ a) (-> (Set a) (Set a) (Set a))) (list#mix (function (_ [elem multiplicity] output) (..has (n.min (..multiplicity parameter elem) @@ -88,7 +88,7 @@ (def: .public (difference parameter subject) (All (_ a) (-> (Set a) (Set a) (Set a))) (|> parameter - :representation + representation dictionary.entries (list#mix (function (_ [elem multiplicity] output) (..lacks multiplicity elem output)) @@ -97,7 +97,7 @@ (def: .public (sub? reference subject) (All (_ a) (-> (Set a) (Set a) Bit)) (|> subject - :representation + representation dictionary.entries (list.every? (function (_ [elem multiplicity]) (|> elem @@ -106,7 +106,7 @@ (def: .public (support set) (All (_ a) (-> (Set a) (//.Set a))) - (let [(^.let set [hash _]) (:representation set)] + (let [(^.let set [hash _]) (representation set)] (|> set dictionary.keys (//.of_list hash)))) @@ -114,9 +114,9 @@ (implementation: .public equivalence (All (_ a) (Equivalence (Set a))) - (def: (= (^:representation reference) sample) + (def: (= (abstract.pattern reference) sample) (and (n.= (dictionary.size reference) - (dictionary.size (:representation sample))) + (dictionary.size (representation sample))) (|> reference dictionary.entries (list.every? (function (_ [elem multiplicity]) @@ -129,7 +129,7 @@ (def: &equivalence ..equivalence) - (def: (hash (^:representation set)) + (def: (hash (abstract.pattern set)) (let [[hash _] set] (list#mix (function (_ [elem multiplicity] acc) (|> elem (# hash hash) (n.* multiplicity) (n.+ acc))) diff --git a/stdlib/source/library/lux/data/collection/set/ordered.lux b/stdlib/source/library/lux/data/collection/set/ordered.lux index 5827e0993..c73e4d04a 100644 --- a/stdlib/source/library/lux/data/collection/set/ordered.lux +++ b/stdlib/source/library/lux/data/collection/set/ordered.lux @@ -10,23 +10,23 @@ [dictionary ["/" ordered]]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (abstract: .public (Set a) (/.Dictionary a a) (def: .public empty (All (_ a) (-> (Order a) (Set a))) - (|>> /.empty :abstraction)) + (|>> /.empty abstraction)) (def: .public (member? set elem) (All (_ a) (-> (Set a) a Bit)) - (/.key? (:representation set) elem)) + (/.key? (representation set) elem)) (template [ ] [(def: .public (All (_ a) (-> (Set a) )) - (|>> :representation ))] + (|>> representation ))] [(Maybe a) min /.min] [(Maybe a) max /.max] @@ -36,15 +36,15 @@ (def: .public (has elem set) (All (_ a) (-> a (Set a) (Set a))) - (|> set :representation (/.has elem elem) :abstraction)) + (|> set representation (/.has elem elem) abstraction)) (def: .public (lacks elem set) (All (_ a) (-> a (Set a) (Set a))) - (|> set :representation (/.lacks elem) :abstraction)) + (|> set representation (/.lacks elem) abstraction)) (def: .public list (All (_ a) (-> (Set a) (List a))) - (|>> :representation /.keys)) + (|>> representation /.keys)) (def: .public (of_list &order list) (All (_ a) (-> (Order a) (List a) (Set a))) @@ -58,19 +58,19 @@ (All (_ a) (-> (Set a) (Set a) (Set a))) (|> (..list right) (list.only (..member? left)) - (..of_list (the /.#&order (:representation right))))) + (..of_list (the /.#&order (representation right))))) (def: .public (difference param subject) (All (_ a) (-> (Set a) (Set a) (Set a))) (|> (..list subject) (list.only (|>> (..member? param) not)) - (..of_list (the /.#&order (:representation subject))))) + (..of_list (the /.#&order (representation subject))))) (implementation: .public equivalence (All (_ a) (Equivalence (Set a))) (def: (= reference sample) - (# (list.equivalence (# (:representation reference) &equivalence)) + (# (list.equivalence (# (representation reference) &equivalence)) = (..list reference) (..list sample)))) ) diff --git a/stdlib/source/library/lux/data/collection/stack.lux b/stdlib/source/library/lux/data/collection/stack.lux index 5c096b40b..fa7a5c589 100644 --- a/stdlib/source/library/lux/data/collection/stack.lux +++ b/stdlib/source/library/lux/data/collection/stack.lux @@ -1,33 +1,33 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}] - [functor {"+" Functor}]] - [data - [collection - ["//" list]]] - [type - abstract]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}] + [functor {"+" Functor}]] + [data + [collection + ["//" list]]] + [type + [abstract {"-" pattern}]]]]) (abstract: .public (Stack a) (List a) (def: .public empty Stack - (:abstraction (list))) + (abstraction (list))) (def: .public size (All (_ a) (-> (Stack a) Nat)) - (|>> :representation //.size)) + (|>> representation //.size)) (def: .public empty? (All (_ a) (-> (Stack a) Bit)) - (|>> :representation //.empty?)) + (|>> representation //.empty?)) (def: .public (value stack) (All (_ a) (-> (Stack a) (Maybe a))) - (case (:representation stack) + (case (representation stack) {.#End} {.#None} @@ -36,16 +36,16 @@ (def: .public (next stack) (All (_ a) (-> (Stack a) (Maybe [a (Stack a)]))) - (case (:representation stack) + (case (representation stack) {.#End} {.#None} {.#Item top stack'} - {.#Some [top (:abstraction stack')]})) + {.#Some [top (abstraction stack')]})) (def: .public (top value stack) (All (_ a) (-> a (Stack a) (Stack a))) - (:abstraction {.#Item value (:representation stack)})) + (abstraction {.#Item value (representation stack)})) (implementation: .public (equivalence super) (All (_ a) @@ -53,14 +53,14 @@ (Equivalence (Stack a)))) (def: (= reference subject) - (# (//.equivalence super) = (:representation reference) (:representation subject)))) + (# (//.equivalence super) = (representation reference) (representation subject)))) (implementation: .public functor (Functor Stack) (def: (each f value) (|> value - :representation + representation (# //.functor each f) - :abstraction))) + abstraction))) ) diff --git a/stdlib/source/library/lux/data/collection/tree/finger.lux b/stdlib/source/library/lux/data/collection/tree/finger.lux index 30486daff..26caf5317 100644 --- a/stdlib/source/library/lux/data/collection/tree/finger.lux +++ b/stdlib/source/library/lux/data/collection/tree/finger.lux @@ -8,7 +8,7 @@ [collection ["[0]" list ("[1]#[0]" monoid)]]] [type - [abstract {"+" abstract: :abstraction :representation}]]]]) + [abstract {"+" abstract: abstraction representation}]]]]) ... https://en.wikipedia.org/wiki/Finger_tree (abstract: .public (Tree @ t v) @@ -20,19 +20,19 @@ (type: .public (Builder @ t) (Interface - (: (All (_ v) - (-> t v (Tree @ t v))) - leaf) - (: (All (_ v) - (-> (Tree @ t v) - (Tree @ t v) - (Tree @ t v))) - branch))) + (is (All (_ v) + (-> t v (Tree @ t v))) + leaf) + (is (All (_ v) + (-> (Tree @ t v) + (Tree @ t v) + (Tree @ t v))) + branch))) (template [ ] [(def: .public (All (_ @ t v) (-> (Tree @ t v) )) - (|>> :representation (the )))] + (|>> representation (the )))] [tag #tag t] [root #root (Either v [(Tree @ t v) (Tree @ t v)])] @@ -42,20 +42,20 @@ (All (_ t) (Ex (_ @) (-> (Monoid t) (Builder @ t)))) (def: (leaf tag value) - (:abstraction + (abstraction [#monoid monoid #tag tag #root {.#Left value}])) (def: (branch left right) - (:abstraction + (abstraction [#monoid monoid #tag (# monoid composite (..tag left) (..tag right)) #root {.#Right [left right]}]))) (def: .public (value tree) (All (_ @ t v) (-> (Tree @ t v) v)) - (case (the #root (:representation tree)) + (case (the #root (representation tree)) {0 #0 value} value @@ -64,9 +64,9 @@ (def: .public (tags tree) (All (_ @ t v) (-> (Tree @ t v) (List t))) - (case (the #root (:representation tree)) + (case (the #root (representation tree)) {0 #0 value} - (list (the #tag (:representation tree))) + (list (the #tag (representation tree))) {0 #1 [left right]} (list#composite (tags left) @@ -74,7 +74,7 @@ (def: .public (values tree) (All (_ @ t v) (-> (Tree @ t v) (List v))) - (case (the #root (:representation tree)) + (case (the #root (representation tree)) {0 #0 value} (list value) @@ -84,7 +84,7 @@ (def: .public (one predicate tree) (All (_ @ t v) (-> (Predicate t) (Tree @ t v) (Maybe v))) - (let [[monoid tag root] (:representation tree)] + (let [[monoid tag root] (representation tree)] (if (predicate tag) (let [(open "tag//[0]") monoid] (loop [_tag tag//identity @@ -96,8 +96,8 @@ {0 #1 [left right]} (let [shifted_tag (tag//composite _tag (..tag left))] (if (predicate shifted_tag) - (again _tag (the #root (:representation left))) - (again shifted_tag (the #root (:representation right)))))))) + (again _tag (the #root (representation left))) + (again shifted_tag (the #root (representation right)))))))) {.#None}))) ) diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux index e4fd53818..9986e63a8 100644 --- a/stdlib/source/library/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux @@ -104,11 +104,11 @@ [family (the #family zipper)] (in (let [(open "_[0]") family] (for @.old - (revised #node (: (-> (Tree (:parameter 0)) - (Tree (:parameter 0))) - (has //.#children (list#composite (list.reversed _#lefts) - {.#Item (the #node zipper) - _#rights}))) + (revised #node (is (-> (Tree (parameter 0)) + (Tree (parameter 0))) + (has //.#children (list#composite (list.reversed _#lefts) + {.#Item (the #node zipper) + _#rights}))) _#parent) (has [#node //.#children] (list#composite (list.reversed _#lefts) @@ -128,10 +128,10 @@ (has side') (revised (|>> {.#Item (the #node zipper)})))} #node next] - (let [move (: (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a))) - (function (_ side' zipper) - (|>> (has side') - (revised (|>> {.#Item (the #node zipper)})))))] + (let [move (is (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a))) + (function (_ side' zipper) + (|>> (has side') + (revised (|>> {.#Item (the #node zipper)})))))] [#family {.#Some (move side' zipper family)} #node next]))} @@ -158,11 +158,11 @@ (revised (|>> {.#Item (the #node zipper)} (list#composite prevs))))} #node last] - (let [move (: (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a))) - (function (_ prevs zipper) - (|>> (has {.#End}) - (revised (|>> {.#Item (the #node zipper)} - (list#composite prevs))))))] + (let [move (is (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a))) + (function (_ prevs zipper) + (|>> (has {.#End}) + (revised (|>> {.#Item (the #node zipper)} + (list#composite prevs))))))] [#family {.#Some (move prevs zipper family)} #node last]))})))] @@ -310,12 +310,12 @@ (the [#node //.#value])) (def: (disjoint (open "_[0]")) - (let [tree_splitter (: (All (_ a) (-> (Tree a) (Tree (Zipper a)))) - (function (tree_splitter tree) - [//.#value (..zipper tree) - //.#children (|> tree - (the //.#children) - (list#each tree_splitter))]))] + (let [tree_splitter (is (All (_ a) (-> (Tree a) (Tree (Zipper a)))) + (function (tree_splitter tree) + [//.#value (..zipper tree) + //.#children (|> tree + (the //.#children) + (list#each tree_splitter))]))] [#family (maybe#each (function (_ (open "_[0]")) [..#parent (disjoint _#parent) ..#lefts (list#each tree_splitter _#lefts) diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux index 093a2b6ba..c5cf003ef 100644 --- a/stdlib/source/library/lux/data/color.lux +++ b/stdlib/source/library/lux/data/color.lux @@ -16,7 +16,7 @@ ["[0]" rev ("[1]#[0]" interval)] ["[0]" i64]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (def: rgb_limit 256) (def: top (-- rgb_limit)) @@ -56,20 +56,20 @@ (def: .public (of_rgb [red green blue]) (-> RGB Color) - (:abstraction [#red (n.% ..rgb_limit red) - #green (n.% ..rgb_limit green) - #blue (n.% ..rgb_limit blue)])) + (abstraction [#red (n.% ..rgb_limit red) + #green (n.% ..rgb_limit green) + #blue (n.% ..rgb_limit blue)])) (def: .public rgb (-> Color RGB) - (|>> :representation)) + (|>> representation)) (implementation: .public equivalence (Equivalence Color) (def: (= reference sample) - (let [[rR gR bR] (:representation reference) - [rS gS bS] (:representation sample)] + (let [[rR gR bR] (representation reference) + [rS gS bS] (representation sample)] (and (n.= rR rS) (n.= gR gS) (n.= bR bS))))) @@ -80,7 +80,7 @@ (def: &equivalence ..equivalence) (def: (hash value) - (let [[r g b] (:representation value)] + (let [[r g b] (representation value)] ($_ i64.or (i64.left_shifted 16 r) (i64.left_shifted 8 g) @@ -104,11 +104,11 @@ (def: identity ..black) (def: (composite left right) - (let [[lR lG lB] (:representation left) - [rR rG rB] (:representation right)] - (:abstraction [#red (n.max lR rR) - #green (n.max lG rG) - #blue (n.max lB rB)])))) + (let [[lR lG lB] (representation left) + [rR rG rB] (representation right)] + (abstraction [#red (n.max lR rR) + #green (n.max lG rG) + #blue (n.max lB rB)])))) (def: (opposite_intensity value) (-> Nat Nat) @@ -116,10 +116,10 @@ (def: .public (complement color) (-> Color Color) - (let [[red green blue] (:representation color)] - (:abstraction [#red (opposite_intensity red) - #green (opposite_intensity green) - #blue (opposite_intensity blue)]))) + (let [[red green blue] (representation color)] + (abstraction [#red (opposite_intensity red) + #green (opposite_intensity green) + #blue (opposite_intensity blue)]))) (implementation: .public subtraction (Monoid Color) @@ -127,11 +127,11 @@ (def: identity ..white) (def: (composite left right) - (let [[lR lG lB] (:representation (..complement left)) - [rR rG rB] (:representation right)] - (:abstraction [#red (n.min lR rR) - #green (n.min lG rG) - #blue (n.min lB rB)])))) + (let [[lR lG lB] (representation (..complement left)) + [rR rG rB] (representation right)] + (abstraction [#red (n.min lR rR) + #green (n.min lG rG) + #blue (n.min lB rB)])))) ) (def: .public (hsl color) @@ -304,12 +304,12 @@ (-> Frac Color Color Color) (let [dS (..normal ratio) dE (|> +1.0 (f.- dS)) - interpolated' (: (-> Nat Nat Nat) - (function (_ end start) - (|> (|> start .int int.frac (f.* dS)) - (f.+ (|> end .int int.frac (f.* dE))) - f.int - .nat))) + interpolated' (is (-> Nat Nat Nat) + (function (_ end start) + (|> (|> start .int int.frac (f.* dS)) + (f.+ (|> end .int int.frac (f.* dE))) + f.int + .nat))) [redS greenS blueS] (rgb start) [redE greenE blueE] (rgb end)] (of_rgb [#red (interpolated' redE redS) diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux index 649e50f5d..dc42d50d2 100644 --- a/stdlib/source/library/lux/data/format/css.lux +++ b/stdlib/source/library/lux/data/format/css.lux @@ -13,7 +13,7 @@ [number ["[0]" nat]]] [type - [abstract {"-" Frame}]] + [abstract {"-" Frame pattern}]] [world [net {"+" URL}]]]] ["[0]" / "_" @@ -32,25 +32,25 @@ (def: .public css (-> (CSS Any) Text) - (|>> :representation)) + (|>> representation)) (def: .public empty (CSS Any) - (:abstraction "")) + (abstraction "")) (type: .public Style (List (Ex (_ brand) [(Property brand) (Value brand)]))) (def: .public (rule selector style) (-> (Selector Any) Style (CSS Common)) - (:abstraction (format (/selector.selector selector) "{" (/style.inline (/style.style style)) "}"))) + (abstraction (format (/selector.selector selector) "{" (/style.inline (/style.style style)) "}"))) (def: .public char_set (-> Encoding (CSS Special)) (|>> encoding.name %.text (text.enclosed ["@charset " ";"]) - :abstraction)) + abstraction)) (def: .public (font font) (-> Font (CSS Special)) @@ -73,18 +73,18 @@ text.together (text.enclosed ["{" "}"]) (format "@font-face") - :abstraction))) + abstraction))) (def: .public (import url query) (-> URL (Maybe Query) (CSS Special)) - (:abstraction (format (format "@import url(" (%.text url) ")") - (case query - {.#Some query} - (format " " (/query.query query)) - - {.#None} - "") - ";"))) + (abstraction (format (format "@import url(" (%.text url) ")") + (case query + {.#Some query} + (format " " (/query.query query)) + + {.#None} + "") + ";"))) (def: separator text.new_line) @@ -96,20 +96,20 @@ (def: .public (key_frames animation frames) (-> (Value Animation) (List Frame) (CSS Special)) - (:abstraction (format "@keyframes " (/value.value animation) " {" - (|> frames - (list#each (function (_ frame) - (format (/value.value (the #when frame)) " {" - (/style.inline (/style.style (the #what frame))) - "}"))) - (text.interposed ..separator)) - "}"))) + (abstraction (format "@keyframes " (/value.value animation) " {" + (|> frames + (list#each (function (_ frame) + (format (/value.value (the #when frame)) " {" + (/style.inline (/style.style (the #what frame))) + "}"))) + (text.interposed ..separator)) + "}"))) (template: (!composite
 )
-    [(:abstraction
-      (format (:representation 
)
+    [(abstraction
+      (format (representation 
)
               ..separator
-              (:representation )))])
+              (representation )))])
   
   (def: .public (and pre post)
     (All (_ kind) (-> (CSS kind) (CSS kind) (CSS kind)))
@@ -118,14 +118,14 @@
   (def: .public (in_context combinator selector css)
     (-> Combinator (Selector Any) (CSS Common) (CSS Common))
     (|> css
-        :representation
+        representation
         (text.all_split_by ..separator)
         (list#each (let [prefix (|> selector
                                     (combinator (/selector.tag ""))
                                     /selector.selector)]
                      (|>> (format prefix))))
         (text.interposed ..separator)
-        :abstraction))
+        abstraction))
 
   (def: .public (dependent combinator selector style inner)
     (-> Combinator (Selector Any) Style (CSS Common) (CSS Common))
@@ -145,14 +145,14 @@
     (All (_ kind)
       (-> (Specializer kind) (Selector (Generic Any)) (CSS Common) (CSS Common)))
     (|> css
-        :representation
+        representation
         (text.all_split_by ..separator)
         (list#each (let [prefix (|> selector
-                                    (specializer (:expected (/selector.tag "")))
+                                    (specializer (as_expected (/selector.tag "")))
                                     /selector.selector)]
                      (|>> (format prefix))))
         (text.interposed ..separator)
-        :abstraction))
+        abstraction))
 
   (def: .public (specialized combinator selector style inner)
     (All (_ kind)
diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux
index e3b1a67b7..6d056d1ac 100644
--- a/stdlib/source/library/lux/data/format/css/class.lux
+++ b/stdlib/source/library/lux/data/format/css/class.lux
@@ -11,18 +11,18 @@
     [syntax {"+" syntax:}]
     ["[0]" code]]
    [type
-    abstract]]])
+    [abstract {"-" pattern}]]]])
 
 (abstract: .public Class
   Text
 
   (def: .public class
     (-> Class Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public custom
     (-> Text Class)
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (syntax: .public (generic [])
     (do meta.monad
diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux
index c5a6f5862..1ace95687 100644
--- a/stdlib/source/library/lux/data/format/css/id.lux
+++ b/stdlib/source/library/lux/data/format/css/id.lux
@@ -11,18 +11,18 @@
     [syntax {"+" syntax:}]
     ["[0]" code]]
    [type
-    abstract]]])
+    [abstract {"-" pattern}]]]])
 
 (abstract: .public ID
   Text
 
   (def: .public id
     (-> ID Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public custom
     (-> Text ID)
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (syntax: .public (generic [])
     (do meta.monad
diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux
index 155297f84..65b4bfd5f 100644
--- a/stdlib/source/library/lux/data/format/css/property.lux
+++ b/stdlib/source/library/lux/data/format/css/property.lux
@@ -1,58 +1,58 @@
 (.using
-  [library
-   [lux {"-" All Location}
-    [control
-     [parser
-      ["s" code]]]
-    [data
-     ["[0]" text]]
-    [type
-     abstract]
-    [macro
-     ["[0]" template]
-     ["[0]" code]
-     [syntax {"+" syntax:}]]]]
-  [//
-   [value {"+" All
-           Number
-           Length Thickness Time
-           Color
-           Location Fit
-           Slice
-           Alignment Animation_Direction
-           Animation Animation_Fill
-           Column_Fill Column_Span
-           Iteration Count
-           Play
-           Timing Visibility Attachment
-           Blend Span Image
-           Angle Repeat Border
-           Collapse Box_Decoration_Break Caption
-           Float Clear
-           Content
-           Cursor
-           Shadow Clip
-           Text_Direction
-           Display Empty
-           Filter
-           Flex_Direction Flex_Wrap
-           Font Font_Kerning Font_Size Font_Stretch Font_Style Font_Weight Font_Variant
-           Grid Grid_Content Grid_Flow Grid_Span Grid_Template
-           Hanging_Punctuation Hyphens Isolation
-           List_Style_Position List_Style_Type
-           Overflow Page_Break Pointer_Events
-           Position
-           Quotes
-           Resize Scroll_Behavior Table_Layout
-           Text_Align Text_Align_Last
-           Text_Decoration_Line Text_Decoration_Style
-           Text_Justification Text_Overflow Text_Transform
-           Transform Transform_Origin Transform_Style
-           Transition
-           Bidi User_Select
-           Vertical_Align
-           White_Space Word_Break Word_Wrap Writing_Mode
-           Z_Index}]])
+ [library
+  [lux {"-" All Location}
+   [control
+    [parser
+     ["s" code]]]
+   [data
+    ["[0]" text]]
+   [type
+    [abstract {"-" pattern}]]
+   [macro
+    ["[0]" template]
+    ["[0]" code]
+    [syntax {"+" syntax:}]]]]
+ [//
+  [value {"+" All
+          Number
+          Length Thickness Time
+          Color
+          Location Fit
+          Slice
+          Alignment Animation_Direction
+          Animation Animation_Fill
+          Column_Fill Column_Span
+          Iteration Count
+          Play
+          Timing Visibility Attachment
+          Blend Span Image
+          Angle Repeat Border
+          Collapse Box_Decoration_Break Caption
+          Float Clear
+          Content
+          Cursor
+          Shadow Clip
+          Text_Direction
+          Display Empty
+          Filter
+          Flex_Direction Flex_Wrap
+          Font Font_Kerning Font_Size Font_Stretch Font_Style Font_Weight Font_Variant
+          Grid Grid_Content Grid_Flow Grid_Span Grid_Template
+          Hanging_Punctuation Hyphens Isolation
+          List_Style_Position List_Style_Type
+          Overflow Page_Break Pointer_Events
+          Position
+          Quotes
+          Resize Scroll_Behavior Table_Layout
+          Text_Align Text_Align_Last
+          Text_Decoration_Line Text_Decoration_Style
+          Text_Justification Text_Overflow Text_Transform
+          Transform Transform_Origin Transform_Style
+          Transition
+          Bidi User_Select
+          Vertical_Align
+          White_Space Word_Break Word_Wrap Writing_Mode
+          Z_Index}]])
 
 (syntax: (text_symbol [symbol s.text])
   (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
@@ -62,13 +62,13 @@
 
   (def: .public name
     (-> (Property Any) Text)
-    (|>> :representation))
+    (|>> representation))
 
   (template [ + +]
     [(`` (template [ ]
            [(def: .public 
               (Property )
-              (:abstraction ))]
+              (abstraction ))]
 
            (~~ (template.spliced +))))
 
@@ -76,7 +76,7 @@
        (template []
          [(`` (def: .public (~~ (text_symbol ))
                 (Property )
-                (:abstraction )))]
+                (abstraction )))]
          
          ))]
 
diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux
index 8251fcb06..7e2272c4a 100644
--- a/stdlib/source/library/lux/data/format/css/query.lux
+++ b/stdlib/source/library/lux/data/format/css/query.lux
@@ -1,25 +1,25 @@
 (.using
-  [library
-   [lux {"-" and or not}
-    [control
-     [parser
-      ["s" code]]]
-    [data
-     ["[0]" text
-      ["%" format {"+" format}]]]
-    [macro
-     ["[0]" template]
-     ["[0]" code]
-     [syntax {"+" syntax:}]]
-    [type
-     abstract]]]
-  ["[0]" // "_"
-   ["[1][0]" value {"+" Value Length Count Resolution Ratio
-                    Orientation Scan Boolean Update
-                    Block_Overflow Inline_Overflow
-                    Display_Mode Color_Gamut Inverted_Colors
-                    Pointer Hover
-                    Light Scripting Motion Color_Scheme}]])
+ [library
+  [lux {"-" and or not}
+   [control
+    [parser
+     ["s" code]]]
+   [data
+    ["[0]" text
+     ["%" format {"+" format}]]]
+   [macro
+    ["[0]" template]
+    ["[0]" code]
+    [syntax {"+" syntax:}]]
+   [type
+    [abstract {"-" pattern}]]]]
+ ["[0]" // "_"
+  ["[1][0]" value {"+" Value Length Count Resolution Ratio
+                   Orientation Scan Boolean Update
+                   Block_Overflow Inline_Overflow
+                   Display_Mode Color_Gamut Inverted_Colors
+                   Pointer Hover
+                   Light Scripting Motion Color_Scheme}]])
 
 (syntax: (text_symbol [symbol s.text])
   (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
@@ -29,12 +29,12 @@
 
   (def: .public media
     (-> Media Text)
-    (|>> :representation))
+    (|>> representation))
 
   (template []
     [(`` (def: .public (~~ (text_symbol ))
            Media
-           (:abstraction )))]
+           (abstraction )))]
 
     ["all"]
     ["print"]
@@ -47,12 +47,12 @@
 
   (def: .public feature
     (-> Feature Text)
-    (|>> :representation))
+    (|>> representation))
 
   (template [ ]
     [(`` (def: .public ((~~ (text_symbol )) input)
            (-> (Value ) Feature)
-           (:abstraction (format "("  ": " (//value.value input) ")"))))]
+           (abstraction (format "("  ": " (//value.value input) ")"))))]
 
     ["min-color" Count]
     ["color" Count]
@@ -107,12 +107,12 @@
 
   (def: .public query
     (-> Query Text)
-    (|>> :representation))
+    (|>> representation))
 
   (template [ ]
     [(def: .public 
        (-> Media Query)
-       (|>> ..media (format ) :abstraction))]
+       (|>> ..media (format ) abstraction))]
 
     [except "not "]
     [only "only "]
@@ -120,14 +120,14 @@
 
   (def: .public not
     (-> Feature Query)
-    (|>> ..feature (format "not ") :abstraction))
+    (|>> ..feature (format "not ") abstraction))
 
   (template [ ]
     [(def: .public ( left right)
        (-> Query Query Query)
-       (:abstraction (format (:representation left)
-                             
-                             (:representation right))))]
+       (abstraction (format (representation left)
+                            
+                            (representation right))))]
 
     [and " and "]
     [or " or "]
diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux
index 47a394603..fc53d8731 100644
--- a/stdlib/source/library/lux/data/format/css/selector.lux
+++ b/stdlib/source/library/lux/data/format/css/selector.lux
@@ -9,7 +9,7 @@
     [number
      ["i" int]]]
    [type
-    abstract]
+    [abstract {"-" pattern}]]
    [macro
     ["[0]" template]]]]
  ["[0]" // "_"
@@ -40,20 +40,20 @@
 
   (def: .public selector
     (-> (Selector Any) Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public any
     (Selector Cannot_Chain)
-    (:abstraction "*"))
+    (abstraction "*"))
 
   (def: .public tag
     (-> Tag (Selector Cannot_Chain))
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (template [    ]
     [(def: .public 
        (->  (Selector ))
-       (|>>  (format ) :abstraction))]
+       (|>>  (format ) abstraction))]
 
     [id ID "#" Unique //id.id]
     [class Class "." Can_Chain //class.class]
@@ -63,9 +63,9 @@
     [(`` (template [ ]
            [(def: .public ( right left)
               (-> (Selector ) (Selector ) (Selector Composite))
-              (:abstraction (format (:representation left)
-                                    
-                                    (:representation right))))]
+              (abstraction (format (representation left)
+                                   
+                                   (representation right))))]
 
            (~~ (template.spliced +))))]
 
@@ -91,12 +91,12 @@
 
   (def: .public (with? attribute)
     (-> Attribute (Selector Can_Chain))
-    (:abstraction (format "[" attribute "]")))
+    (abstraction (format "[" attribute "]")))
 
   (template [ ]
     [(def: .public ( attribute value)
        (-> Attribute Text (Selector Can_Chain))
-       (:abstraction (format "[" attribute  value "]")))]
+       (abstraction (format "[" attribute  value "]")))]
 
     ["=" same?]
     ["~=" has?]
@@ -110,7 +110,7 @@
     [(`` (template [ ]
            [(def: .public 
               (Selector )
-              (:abstraction ))]
+              (abstraction ))]
 
            (~~ (template.spliced +))))]
 
@@ -158,24 +158,24 @@
         locale.code
         (text.enclosed ["(" ")"])
         (format ":lang")
-        :abstraction))
+        abstraction))
 
   (def: .public not
     (-> (Selector Any) (Selector Can_Chain))
-    (|>> :representation
+    (|>> representation
          (text.enclosed ["(" ")"])
          (format ":not")
-         :abstraction))
+         abstraction))
 
   (abstract: .public Index
     Text
 
     (def: .public index
       (-> Nat Index)
-      (|>> %.nat :abstraction))
+      (|>> %.nat abstraction))
 
     (template [ ]
-      [(def: .public  Index (:abstraction ))]
+      [(def: .public  Index (abstraction ))]
       
       [odd "odd"]
       [even "even"]
@@ -189,18 +189,18 @@
     (def: .public (formula input)
       (-> Formula Index)
       (let [(open "_[0]") input]
-        (:abstraction (format (if (i.< +0 _#variable)
-                                (%.int _#variable)
-                                (%.nat (.nat _#variable)))
-                              (%.int _#constant)))))
+        (abstraction (format (if (i.< +0 _#variable)
+                               (%.int _#variable)
+                               (%.nat (.nat _#variable)))
+                             (%.int _#constant)))))
     
     (template [ ]
       [(def: .public ( index)
          (-> Index (Selector Can_Chain))
-         (|> (:representation index)
+         (|> (representation index)
              (text.enclosed ["(" ")"])
              (format )
-             (:abstraction Selector)))]
+             (abstraction Selector)))]
 
       [nth_child ":nth-child"]
       [nth_last_child ":nth-last-child"]
diff --git a/stdlib/source/library/lux/data/format/css/style.lux b/stdlib/source/library/lux/data/format/css/style.lux
index 8ec6a207f..42c7d07cb 100644
--- a/stdlib/source/library/lux/data/format/css/style.lux
+++ b/stdlib/source/library/lux/data/format/css/style.lux
@@ -7,7 +7,7 @@
     [collection
      ["[0]" list ("[1]#[0]" mix)]]]
    [type
-    abstract]]]
+    [abstract {"-" pattern}]]]]
  ["[0]" // "_"
   ["[1][0]" value {"+" Value}]
   ["[1][0]" property {"+" Property}]])
@@ -17,19 +17,19 @@
 
   (def: .public empty
     Style
-    (:abstraction ""))
+    (abstraction ""))
 
   (def: .public (with [property value])
     (All (_ brand)
       (-> [(Property brand) (Value brand)]
           (-> Style Style)))
-    (|>> :representation
+    (|>> representation
          (format (//property.name property) ": " (//value.value value) ";")
-         :abstraction))
+         abstraction))
 
   (def: .public inline
     (-> Style Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public (style config)
     (-> (List (Ex (_ brand) [(Property brand) (Value brand)]))
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index b48718568..dad95e9b8 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -23,7 +23,7 @@
      ["r" rev]
      ["f" frac]]]
    [type
-    abstract]
+    [abstract {"-" pattern}]]
    [world
     [net {"+" URL}]]]]
  [//
@@ -38,10 +38,10 @@
 
      (def: .public 
        (->  )
-       (|>> :representation))
+       (|>> representation))
 
      (`` (template [ ]
-           [(def: .public   (:abstraction ))]
+           [(def: .public   (abstraction ))]
 
            (~~ (template.spliced +))
            ))
@@ -51,9 +51,9 @@
 (template: (multi:   )
   [(def: .public ( pre post)
      (-> (Value ) (Value ) (Value ))
-     (:abstraction (format (:representation pre)
-                           
-                           (:representation post))))])
+     (abstraction (format (representation pre)
+                          
+                          (representation post))))])
 
 (def: (%number value)
   (Format Frac)
@@ -67,10 +67,10 @@
 
   (def: .public value
     (-> (Value Any) Text)
-    (|>> :representation))
+    (|>> representation))
 
   (template [ ]
-    [(def: .public  Value (:abstraction ))]
+    [(def: .public  Value (abstraction ))]
 
     [initial "initial"]
     [inherit "inherit"]
@@ -97,7 +97,7 @@
      (`` (template [ ]
            [(def: .public 
               (Value )
-              (:abstraction ))]
+              (abstraction ))]
            
            (~~ (template.spliced +))))
 
@@ -105,7 +105,7 @@
        (template []
          [(`` (def: .public (~~ (..text_symbol ))
                 (Value )
-                (:abstraction )))]
+                (abstraction )))]
          
          ))]
 
@@ -788,7 +788,7 @@
         (text.interposed ..value_separator)
         (text.enclosed ["(" ")"])
         (format name)
-        :abstraction))
+        abstraction))
 
   (enumeration: Step Text
     step
@@ -809,7 +809,7 @@
   (template [ ]
     [(def: .public 
        (-> Nat (Value ))
-       (|>> %.nat :abstraction))]
+       (|>> %.nat abstraction))]
 
     [iteration Iteration]
     [count Count]
@@ -819,7 +819,7 @@
 
   (def: .public animation
     (-> Label (Value Animation))
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (def: .public (rgb color)
     (-> color.Color (Value Color))
@@ -842,7 +842,7 @@
   (template [ ]
     [(def: .public ( value)
        (-> Frac (Value Length))
-       (:abstraction (format (%number value) )))]
+       (abstraction (format (%number value) )))]
 
     [em "em"]
     [ex "ex"]
@@ -871,10 +871,10 @@
   (template [ ]
     [(def: .public ( value)
        (-> Int (Value Time))
-       (:abstraction (format (if (i.< +0 value)
-                               (%.int value)
-                               (%.nat (.nat value)))
-                             )))]
+       (abstraction (format (if (i.< +0 value)
+                              (%.int value)
+                              (%.nat (.nat value)))
+                            )))]
 
     
     [seconds "s"]
@@ -883,50 +883,50 @@
 
   (def: .public thickness
     (-> (Value Length) (Value Thickness))
-    (|>> :transmutation))
+    (|>> transmutation))
 
   (def: slice_separator " ")
 
   (def: .public (slice_number/2 horizontal vertical)
     (-> Nat Nat (Value Slice))
-    (:abstraction (format (%.nat horizontal) ..slice_separator
-                          (%.nat vertical))))
+    (abstraction (format (%.nat horizontal) ..slice_separator
+                         (%.nat vertical))))
 
   (abstract: .public Stop
     Text
 
     (def: .public stop
       (-> (Value Color) Stop)
-      (|>> (:representation Value) (:abstraction Stop)))
+      (|>> (representation Value) (abstraction Stop)))
 
     (def: stop_separator " ")
 
     (def: .public (single_stop length color)
       (-> (Value Length) (Value Color) Stop)
-      (:abstraction (format (:representation Value color) ..stop_separator
-                            (:representation Value length))))
+      (abstraction (format (representation Value color) ..stop_separator
+                           (representation Value length))))
 
     (def: .public (double_stop start end color)
       (-> (Value Length) (Value Length) (Value Color) Stop)
-      (:abstraction (format (:representation Value color) ..stop_separator
-                            (:representation Value start) ..stop_separator
-                            (:representation Value end))))
+      (abstraction (format (representation Value color) ..stop_separator
+                           (representation Value start) ..stop_separator
+                           (representation Value end))))
 
     (abstract: .public Hint
       Text
 
       (def: .public hint
         (-> (Value Length) Hint)
-        (|>> (:representation Value) (:abstraction Hint)))
+        (|>> (representation Value) (abstraction Hint)))
 
       (def: (with_hint [hint stop])
         (-> [(Maybe Hint) Stop] Text)
         (case hint
           {.#None}
-          (:representation Stop stop)
+          (representation Stop stop)
           
           {.#Some hint}
-          (format (:representation Hint hint) ..value_separator (:representation Stop stop))))))
+          (format (representation Hint hint) ..value_separator (representation Stop stop))))))
 
   (type: .public (List/1 a)
     [a (List a)])
@@ -936,17 +936,17 @@
 
     (def: .public angle
       (-> Angle Text)
-      (|>> :representation))
+      (|>> representation))
 
     (def: .public (turn value)
       (-> Rev Angle)
-      (:abstraction (format (%.rev value) "turn")))
+      (abstraction (format (%.rev value) "turn")))
 
     (def: degree_limit Nat 360)
     
     (def: .public (degree value)
       (-> Nat Angle)
-      (:abstraction (format (%.nat (n.% ..degree_limit value)) "deg")))
+      (abstraction (format (%.nat (n.% ..degree_limit value)) "deg")))
 
     (template [ ]
       [(def: .public 
@@ -963,7 +963,7 @@
       [(def: .public ( angle start next)
          (-> Angle Stop (List/1 [(Maybe Hint) Stop]) (Value Image))
          (let [[now after] next]
-           (..apply  (list& (:representation Angle angle)
+           (..apply  (list& (representation Angle angle)
                                       (with_hint now)
                                       (list#each with_hint after)))))]
 
@@ -976,16 +976,16 @@
 
   (def: .public (%% value)
     (-> Nat (Value Percentage))
-    (:abstraction (format (%.nat (n.% percentage_limit value)) "%")))
+    (abstraction (format (%.nat (n.% percentage_limit value)) "%")))
 
   (def: .public slice_percent/1
     (-> (Value Percentage) (Value Slice))
-    (|>> :transmutation))
+    (|>> transmutation))
 
   (def: .public (slice_percent/2 horizontal vertical)
     (-> (Value Percentage) (Value Percentage) (Value Slice))
-    (:abstraction (format (:representation horizontal) ..slice_separator
-                          (:representation vertical))))
+    (abstraction (format (representation horizontal) ..slice_separator
+                         (representation vertical))))
 
   (template [ 
 +]
     [(`` (template [ ]
@@ -995,11 +995,11 @@
 
            (~~ (template.spliced +))))]
 
-    [Nat (<| :representation ..px n.frac)
+    [Nat (<| representation ..px n.frac)
      [[blur "blur"]]]
     [Nat (<| ..angle ..degree)
      [[hue_rotate "hue-rotate"]]]
-    [(Value Percentage) :representation
+    [(Value Percentage) representation
      [[brightness "brightness"]
       [contrast "contrast"]
       [grayscale "grayscale"]
@@ -1020,11 +1020,11 @@
         (Maybe (Value Length)) (Maybe (Value Length))
         (Value Color)
         (Value Filter))
-    (|> (list (:representation horizontal)
-              (:representation vertical)
-              (|> blur (maybe.else ..default_shadow_length) :representation)
-              (|> spread (maybe.else ..default_shadow_length) :representation)
-              (:representation color))
+    (|> (list (representation horizontal)
+              (representation vertical)
+              (|> blur (maybe.else ..default_shadow_length) representation)
+              (|> spread (maybe.else ..default_shadow_length) representation)
+              (representation color))
         (text.interposed " ")
         (list)
         (..apply "drop-shadow")))
@@ -1034,9 +1034,9 @@
   (template [ ]
     [(def: .public ( horizontal vertical)
        (-> (Value Length) (Value Length) (Value ))
-       (:abstraction (format (:representation horizontal)
-                             ..length_separator
-                             (:representation vertical))))]
+       (abstraction (format (representation horizontal)
+                            ..length_separator
+                            (representation vertical))))]
 
     [location Location]
     [fit Fit]
@@ -1071,7 +1071,7 @@
        (-> Shape (Maybe Extent) (Value Location)
            Stop (List/1 [(Maybe Hint) Stop])
            (Value Image))
-       (let [after_extent (format "at " (:representation location))
+       (let [after_extent (format "at " (representation location))
              with_extent (case extent
                            {.#Some extent}
                            (format (..extent extent) " " after_extent)
@@ -1096,14 +1096,14 @@
     (let [with_inset (if inset?
                        (list "inset")
                        (list))]
-      (|> (list& (:representation horizontal)
-                 (:representation vertical)
-                 (|> blur (maybe.else ..default_shadow_length) :representation)
-                 (|> spread (maybe.else ..default_shadow_length) :representation)
-                 (:representation color)
+      (|> (list& (representation horizontal)
+                 (representation vertical)
+                 (|> blur (maybe.else ..default_shadow_length) representation)
+                 (|> spread (maybe.else ..default_shadow_length) representation)
+                 (representation color)
                  with_inset)
           (text.interposed " ")
-          :abstraction)))
+          abstraction)))
 
   (type: .public Rectangle
     (Record
@@ -1115,21 +1115,21 @@
   (def: .public (clip rectangle)
     (-> Rectangle (Value Clip))
     (`` (..apply "rect" (list (~~ (template []
-                                    [(:representation (the  rectangle))]
+                                    [(representation (the  rectangle))]
 
                                     [#top] [#right] [#bottom] [#left]))))))
 
   (def: .public counter
     (-> Label (Value Counter))
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (def: .public current_count
     (-> (Value Counter) (Value Content))
-    (|>> :representation (list) (..apply "counter")))
+    (|>> representation (list) (..apply "counter")))
 
   (def: .public text
     (-> Text (Value Content))
-    (|>> %.text :abstraction))
+    (|>> %.text abstraction))
 
   (def: .public attribute
     (-> Label (Value Content))
@@ -1148,7 +1148,7 @@
      [monospace "monospace"]]
     [(def: .public font
        (-> Text Font)
-       (|>> %.text :abstraction))
+       (|>> %.text abstraction))
 
      (def: .public (font_family options)
        (-> (List Font) (Value Font))
@@ -1157,57 +1157,57 @@
          (|> options
              (list#each ..font_name)
              (text.interposed ",")
-             (:abstraction Value))
+             (abstraction Value))
          
          {.#End}
          ..initial))])
 
   (def: .public font_size
     (-> (Value Length) (Value Font_Size))
-    (|>> :transmutation))
+    (|>> transmutation))
 
   (def: .public number
     (-> Frac (Value Number))
-    (|>> %number :abstraction))
+    (|>> %number abstraction))
 
   (def: .public grid
     (-> Label (Value Grid))
-    (|>> :abstraction))
+    (|>> abstraction))
 
   (def: .public fit_content
     (-> (Value Length) (Value Grid_Content))
-    (|>> :representation (list) (..apply "fit-content")))
+    (|>> representation (list) (..apply "fit-content")))
 
   (def: .public (min_max min max)
     (-> (Value Grid_Content) (Value Grid_Content) (Value Grid_Content))
-    (..apply "minmax" (list (:representation min)
-                            (:representation max))))
+    (..apply "minmax" (list (representation min)
+                            (representation max))))
 
   (def: .public grid_span
     (-> Nat (Value Grid_Span))
-    (|>> %.nat (format "span ") :abstraction))
+    (|>> %.nat (format "span ") abstraction))
 
   (def: grid_column_separator " ")
   (def: grid_row_separator " ")
 
   (def: .public grid_template
     (-> (List (List (Maybe (Value Grid)))) (Value Grid_Template))
-    (let [empty (: (Value Grid)
-                   (:abstraction "."))]
+    (let [empty (is (Value Grid)
+                    (abstraction "."))]
       (|>> (list#each (|>> (list#each (|>> (maybe.else empty)
-                                           :representation))
+                                           representation))
                            (text.interposed ..grid_column_separator)
                            (text.enclosed ["'" "'"])))
            (text.interposed ..grid_row_separator)
-           :abstraction)))
+           abstraction)))
 
   (def: .public (resolution dpi)
     (-> Nat (Value Resolution))
-    (:abstraction (format (%.nat dpi) "dpi")))
+    (abstraction (format (%.nat dpi) "dpi")))
 
   (def: .public (ratio numerator denominator)
     (-> Nat Nat (Value Ratio))
-    (:abstraction (format (%.nat numerator) "/" (%.nat denominator))))
+    (abstraction (format (%.nat numerator) "/" (%.nat denominator))))
 
   (enumeration: Quote Text
     quote_text
@@ -1224,7 +1224,7 @@
      [low_double_quote "\201E"]]
     [(def: .public quote
        (-> Text Quote)
-       (|>> :abstraction))])
+       (|>> abstraction))])
 
   (def: quote_separator " ")
 
@@ -1233,7 +1233,7 @@
     (|> (list left0 right0 left1 right1)
         (list#each (|>> ..quote_text %.text))
         (text.interposed ..quote_separator)
-        :abstraction))
+        abstraction))
 
   (def: .public (matrix_2d [a b] [c d] [tx ty])
     (-> [Frac Frac]
@@ -1302,24 +1302,24 @@
 
   (def: .public (origin_2d x y)
     (-> (Value Length) (Value Length) (Value Transform_Origin))
-    (:abstraction (format (:representation x) ..origin_separator
-                          (:representation y))))
+    (abstraction (format (representation x) ..origin_separator
+                         (representation y))))
 
   (def: .public (origin_3d x y z)
     (-> (Value Length) (Value Length) (Value Length) (Value Transform_Origin))
-    (:abstraction (format (:representation x) ..origin_separator
-                          (:representation y) ..origin_separator
-                          (:representation z))))
+    (abstraction (format (representation x) ..origin_separator
+                         (representation y) ..origin_separator
+                         (representation z))))
 
   (def: .public vertical_align
     (-> (Value Length) (Value Vertical_Align))
-    (|>> :transmutation))
+    (|>> transmutation))
 
   (def: .public (z_index index)
     (-> Int (Value Z_Index))
-    (:abstraction (if (i.< +0 index)
-                    (%.int index)
-                    (%.nat (.nat index)))))
+    (abstraction (if (i.< +0 index)
+                   (%.int index)
+                   (%.nat (.nat index)))))
 
   (multi: multi_image Image ",")
   (multi: multi_shadow Shadow ",")
@@ -1331,11 +1331,11 @@
        (.All (_ kind)
          (-> (Value ) (Value (Numeric kind))
              (Value (Numeric kind))))
-       (|> (format (:representation subject)
+       (|> (format (representation subject)
                    (template.text [" "  " "])
-                   (:representation parameter))
+                   (representation parameter))
            (text.enclosed ["calc(" ")"])
-           :abstraction))]
+           abstraction))]
 
     [+ (Numeric kind)]
     [- (Numeric kind)]
diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux
index b6021695d..96de4515b 100644
--- a/stdlib/source/library/lux/data/format/html.lux
+++ b/stdlib/source/library/lux/data/format/html.lux
@@ -15,7 +15,7 @@
    [target
     ["[0]" js]]
    [type
-    abstract]
+    [abstract {"-" pattern}]]
    [world
     [net {"+" URL}]]]]
  [//
@@ -121,21 +121,21 @@
 
   (def: .public html
     (-> Document Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public (and pre post)
     (All (_ brand) (-> (HTML brand) (HTML brand) (HTML brand)))
-    (:abstraction (format (:representation pre) (:representation post))))
+    (abstraction (format (representation pre) (representation post))))
 
   (def: .public (comment content node)
     (All (_ brand) (-> Text (HTML brand) (HTML brand)))
-    (:abstraction
+    (abstraction
      (format (text.enclosed [""] content)
-             (:representation node))))
+             (representation node))))
 
   (def: (empty name attributes)
     (-> Tag Attributes HTML)
-    (:abstraction
+    (abstraction
      (format (..open name attributes)
              (..close name))))
 
@@ -143,18 +143,18 @@
     (-> Tag Attributes HTML)
     (|> attributes
         (..open tag)
-        :abstraction))
+        abstraction))
 
   (def: (tag name attributes content)
     (-> Tag Attributes (HTML Any) HTML)
-    (:abstraction
+    (abstraction
      (format (..open name attributes)
-             (:representation content)
+             (representation content)
              (..close name))))
 
   (def: (raw tag attributes content)
     (-> Text Attributes Text HTML)
-    (:abstraction
+    (abstraction
      (format (..open tag attributes)
              content
              (..close tag))))
@@ -197,7 +197,7 @@
   (def: .public text
     (-> Text Content)
     (|>> ..safe
-         :abstraction))
+         abstraction))
 
   (.template [  ]
     [(def: .public 
@@ -550,7 +550,7 @@
                     content
 
                     {.#Some caption}
-                    (..and (:as HTML caption)
+                    (..and (as HTML caption)
                            content))]
       (..tag "table" attributes
              content)))
@@ -561,9 +561,9 @@
        (let [doc_type ]
          (function (_ head body)
            (|> (..tag "html" (list) (..and head body))
-               :representation
+               representation
                (format doc_type)
-               :abstraction))))]
+               abstraction))))]
 
     [html/5    ""]
     [html/4_01 (format "")]
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index d5eafa15d..0a08da9b6 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -123,7 +123,7 @@
     code))
 
 (syntax: .public (json [token ..jsonP])
-  (in (list (` (: 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/markdown.lux b/stdlib/source/library/lux/data/format/markdown.lux
index 02a8de78e..984c023c1 100644
--- a/stdlib/source/library/lux/data/format/markdown.lux
+++ b/stdlib/source/library/lux/data/format/markdown.lux
@@ -1,15 +1,15 @@
 (.using
-  [library
-   [lux {"-" and}
-    [data
-     ["[0]" text
-      ["%" format {"+" format}]]
-     [collection
-      ["[0]" list ("[1]#[0]" functor)]]]
-    [type
-     abstract]
-    [world
-     [net {"+" URL}]]]])
+ [library
+  [lux {"-" and}
+   [data
+    ["[0]" text
+     ["%" format {"+" format}]]
+    [collection
+     ["[0]" list ("[1]#[0]" functor)]]]
+   [type
+    [abstract {"-" pattern}]]
+   [world
+    [net {"+" URL}]]]])
 
 ... https://www.markdownguide.org/basic-syntax/
 
@@ -39,11 +39,11 @@
 
   (def: .public empty
     Markdown
-    (:abstraction ""))
+    (abstraction ""))
 
   (def: .public text
     (-> Text (Markdown Span))
-    (|>> ..safe :abstraction))
+    (|>> ..safe abstraction))
 
   (def: blank_line
     (format text.new_line text.new_line))
@@ -51,7 +51,7 @@
   (template [ ]
     [(def: .public ( content)
        (-> Text (Markdown Block))
-       (:abstraction (format  " " (..safe content) ..blank_line)))]
+       (abstraction (format  " " (..safe content) ..blank_line)))]
 
     [heading/1 "#"]
     [heading/2 "##"]
@@ -63,22 +63,22 @@
 
   (def: (block content)
     (-> Text (Markdown Block))
-    (:abstraction (format content ..blank_line)))
+    (abstraction (format content ..blank_line)))
 
   (def: .public paragraph
     (-> (Markdown Span) (Markdown Block))
-    (|>> :representation ..block))
+    (|>> representation ..block))
 
   (def: .public break
     (Markdown Span)
-    (:abstraction (format "  " text.new_line)))
+    (abstraction (format "  " text.new_line)))
 
   (template [ ]
     [(def: .public 
        (-> (Markdown Span) (Markdown Span))
-       (|>> :representation
+       (|>> representation
             (text.enclosed [ ])
-            :abstraction))]
+            abstraction))]
 
     [bold "**"]
     [italic "_"]
@@ -99,20 +99,20 @@
 
   (def: .public quote
     (-> (Markdown Block) (Markdown Block))
-    (|>> :representation
+    (|>> representation
          (..prefix "> ")
-         :abstraction))
+         abstraction))
 
   (def: .public numbered_list
     (-> (List [(Markdown Span) (Maybe (Markdown Block))])
         (Markdown Block))
     (|>> list.enumeration
          (list#each (function (_ [idx [summary detail]])
-                      (format "1. " (:representation summary)
+                      (format "1. " (representation summary)
                               (case detail
                                 {.#Some detail}
                                 (|> detail
-                                    :representation
+                                    representation
                                     ..indent
                                     (text.enclosed [text.new_line text.new_line])
                                     (format text.new_line))
@@ -126,11 +126,11 @@
     (-> (List [(Markdown Span) (Maybe (Markdown Block))])
         (Markdown Block))
     (|>> (list#each (function (_ [summary detail])
-                      (format "* " (:representation summary)
+                      (format "* " (representation summary)
                               (case detail
                                 {.#Some detail}
                                 (|> detail
-                                    :representation
+                                    representation
                                     ..indent
                                     (text.enclosed [text.new_line text.new_line])
                                     (format text.new_line))
@@ -143,7 +143,7 @@
   ... A snippet of code.
   (def: .public snippet
     (-> Text (Markdown Span))
-    (|>> (text.enclosed ["`` " " ``"]) :abstraction))
+    (|>> (text.enclosed ["`` " " ``"]) abstraction))
 
   ... A (generic) block of code.
   (def: .public generic_code
@@ -163,7 +163,7 @@
 
   (def: .public (image description url)
     (-> Text URL (Markdown Span))
-    (:abstraction (format "![" (..safe description) "](" url ")")))
+    (abstraction (format "![" (..safe description) "](" url ")")))
 
   (def: .public horizontal_rule
     (Markdown Block)
@@ -171,7 +171,7 @@
 
   (def: .public (link description url)
     (-> (Markdown Span) URL (Markdown Span))
-    (:abstraction (format "[" (:representation description) "](" url ")")))
+    (abstraction (format "[" (representation description) "](" url ")")))
 
   (type: .public Email
     Text)
@@ -179,7 +179,7 @@
   (template [ ]
     [(def: .public 
        (->  (Markdown Span))
-       (|>> (text.enclosed ["<" ">"]) :abstraction))]
+       (|>> (text.enclosed ["<" ">"]) abstraction))]
 
     [url URL]
     [email Email]
@@ -188,7 +188,7 @@
   (template [  ]
     [(def: .public ( pre post)
        (-> (Markdown ) (Markdown ) (Markdown ))
-       (:abstraction (format (:representation pre)  (:representation post))))]
+       (abstraction (format (representation pre)  (representation post))))]
 
     [and Span " "]
     [then Block ""]
@@ -196,5 +196,5 @@
 
   (def: .public markdown
     (All (_ a) (-> (Markdown a) Text))
-    (|>> :representation))
+    (|>> representation))
   )
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index 567d1a10a..422d11814 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -33,7 +33,7 @@
    [world
     ["[0]" file]]
    [type
-    abstract]]])
+    [abstract {"-" pattern}]]]])
 
 (type: Size
   Nat)
@@ -78,18 +78,18 @@
      (def: .public ( value)
        (-> Nat (Try ))
        (if (n.<  value)
-         {try.#Success (:abstraction value)}
+         {try.#Success (abstraction value)}
          (exception.except  [value])))
 
      (def: .public 
        (->  Nat)
-       (|>> :representation))
+       (|>> representation))
 
      (def: 
        (Writer )
        (let [suffix 
              padded_size (n.+ (text.size suffix) )]
-         (|>> :representation
+         (|>> representation
               (# n.octal encoded)
               (..octal_padding )
               (text.suffix suffix)
@@ -99,7 +99,7 @@
      (def: 
        (-> Nat )
        (|>> (n.% )
-            :abstraction))
+            abstraction))
      )]
 
   [not_a_small_number small_limit ..small_size
@@ -161,11 +161,11 @@
 
   (def: from_checksum
     (-> Checksum Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: dummy_checksum
     Checksum
-    (:abstraction "        "))
+    (abstraction "        "))
 
   (def: checksum_suffix
     (format ..blank ..null))
@@ -176,7 +176,7 @@
 
   (def: checksum_checksum
     (|> ..dummy_checksum
-        :representation
+        representation
         (# utf8.codec encoded)
         ..checksum))
 
@@ -188,13 +188,13 @@
          (# n.octal encoded)
          (..octal_padding ..small_size)
          (text.suffix ..checksum_suffix)
-         :abstraction))
+         abstraction))
 
   (def: checksum_writer
     (Writer Checksum)
     (let [padded_size (n.+ (text.size ..checksum_suffix)
                            ..small_size)]
-      (|>> :representation
+      (|>> representation
            (# utf8.codec encoded)
            (format.segment padded_size))))
 
@@ -207,7 +207,7 @@
        value (<>.lifted
               (# n.octal decoded digits))]
       (in [value
-           (:abstraction (format digits ..checksum_suffix))])))
+           (abstraction (format digits ..checksum_suffix))])))
   )
 
 (def: last_ascii
@@ -263,18 +263,18 @@
                  binary.size
                  (n.> ))
            (exception.except  [value])
-           {try.#Success (:abstraction value)})
+           {try.#Success (abstraction value)})
          (exception.except ..not_ascii [value])))
 
      (def: .public 
        (->  )
-       (|>> :representation))
+       (|>> representation))
 
      (def: 
        (Writer )
        (let [suffix ..null
              padded_size (n.+ (text.size suffix) )]
-         (|>> :representation
+         (|>> representation
               (text.suffix suffix)
               (# utf8.codec encoded)
               (format.segment padded_size))))
@@ -308,17 +308,17 @@
   Text
 
   (def: ustar
-    (:abstraction "ustar  "))
+    (abstraction "ustar  "))
 
   (def: from_magic
     (-> Magic Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: magic_writer
     (Writer Magic)
     (let [padded_size (n.+ (text.size ..null)
                            ..magic_size)]
-      (|>> :representation
+      (|>> representation
            (# utf8.codec encoded)
            (format.segment padded_size))))
 
@@ -331,7 +331,7 @@
        _ (<>.assertion (exception.error ..wrong_character [expected end])
                        (n.= expected end))]
       (<>.lifted
-       (# try.monad each (|>> :abstraction)
+       (# try.monad each (|>> abstraction)
           (# utf8.codec decoded string)))))
   )
 
@@ -396,11 +396,11 @@
 
   (def: link_flag
     (-> Link_Flag Char)
-    (|>> :representation))
+    (|>> representation))
 
   (def: link_flag_writer
     (Writer Link_Flag)
-    (|>> :representation
+    (|>> representation
          format.bits/8))
 
   (with_expansions [ (as_is [0 old_normal]
@@ -415,7 +415,7 @@
     (template [ ]
       [(def: 
          Link_Flag
-         (:abstraction ))]
+         (abstraction ))]
 
       
       )
@@ -444,17 +444,17 @@
 
   (def: .public mode
     (-> Mode Nat)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public (and left right)
     (-> Mode Mode Mode)
-    (:abstraction
-     (i64.or (:representation left)
-             (:representation right))))
+    (abstraction
+     (i64.or (representation left)
+             (representation right))))
 
   (def: mode_writer
     (Writer Mode)
-    (|>> :representation
+    (|>> representation
          ..small
          try.trusted
          ..small_writer))
@@ -483,7 +483,7 @@
     (template [ ]
       [(def: .public 
          Mode
-         (:abstraction (number.oct )))]
+         (abstraction (number.oct )))]
 
       
       )
@@ -514,11 +514,11 @@
       (Parser Mode)
       (do [! <>.monad]
         [value (# ! each ..from_small ..small_parser)]
-        (if (n.> (:representation ..maximum_mode)
+        (if (n.> (representation ..maximum_mode)
                  value)
           (<>.lifted
            (exception.except ..invalid_mode [value]))
-          (in (:abstraction value))))))
+          (in (abstraction value))))))
   )
 
 (def: maximum_content_size
@@ -534,15 +534,15 @@
     (-> Binary (Try Content))
     (do try.monad
       [size (..big (binary.size content))]
-      (in (:abstraction [size content]))))
+      (in (abstraction [size content]))))
 
   (def: from_content
     (-> Content [Big Binary])
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public data
     (-> Content Binary)
-    (|>> :representation product.right))
+    (|>> representation product.right))
   )
 
 (type: .public ID
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index 825daeac3..2459936a2 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -220,9 +220,9 @@
 
 (def: xml_header
   Text
-  (let [quote (: (-> Text Text)
-                 (function (_ value)
-                   ($_ text#composite text.double_quote value text.double_quote)))]
+  (let [quote (is (-> Text Text)
+                  (function (_ value)
+                    ($_ text#composite text.double_quote value text.double_quote)))]
     ($_ text#composite
         " Attrs Text)
-                        (function (_ attrs)
-                          (|> attrs
-                              dictionary.entries
-                              (list#each (function (_ [key value])
-                                           ($_ text#composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote)))
-                              (text.interposed " "))))]
+    (let [attributes (is (-> Attrs Text)
+                         (function (_ attrs)
+                           (|> attrs
+                               dictionary.entries
+                               (list#each (function (_ [key value])
+                                            ($_ text#composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote)))
+                               (text.interposed " "))))]
       (function (_ input)
         ($_ text#composite
             ..xml_header text.new_line
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux
index 29d2d0ca8..922f1da3c 100644
--- a/stdlib/source/library/lux/data/text.lux
+++ b/stdlib/source/library/lux/data/text.lux
@@ -69,8 +69,8 @@
 (def: .public (last_index part text)
   (-> Text Text (Maybe Nat))
   (loop [offset 0
-         output (: (Maybe Nat)
-                   {.#None})]
+         output (is (Maybe Nat)
+                    {.#None})]
     (let [output' ("lux text index" offset part text)]
       (case output'
         {.#None}
@@ -165,7 +165,7 @@
 (def: .public (all_split_by token sample)
   (-> Text Text (List Text))
   (loop [input sample
-         output (: (List Text) (list))]
+         output (is (List Text) (list))]
     (case (..split_by token input)
       {.#Some [pre post]}
       (|> output
@@ -221,34 +221,34 @@
                                   {.#None}
                                   ("lux text concat" left right)))]
     (for @.old
-         (:as Text
-              ("jvm invokevirtual:java.lang.String:replace:java.lang.CharSequence,java.lang.CharSequence"
-               (:as (Primitive "java.lang.String") template)
-               (:as (Primitive "java.lang.CharSequence") pattern)
-               (:as (Primitive "java.lang.CharSequence") replacement)))
+         (as Text
+             ("jvm invokevirtual:java.lang.String:replace:java.lang.CharSequence,java.lang.CharSequence"
+              (as (Primitive "java.lang.String") template)
+              (as (Primitive "java.lang.CharSequence") pattern)
+              (as (Primitive "java.lang.CharSequence") replacement)))
          @.jvm
-         (:as Text
-              ("jvm member invoke virtual" [] "java.lang.String" "replace" []
-               (:as (Primitive "java.lang.String") template)
-               ["Ljava/lang/CharSequence;" (:as (Primitive "java.lang.CharSequence") pattern)]
-               ["Ljava/lang/CharSequence;" (:as (Primitive "java.lang.CharSequence") replacement)]))
+         (as Text
+             ("jvm member invoke virtual" [] "java.lang.String" "replace" []
+              (as (Primitive "java.lang.String") template)
+              ["Ljava/lang/CharSequence;" (as (Primitive "java.lang.CharSequence") pattern)]
+              ["Ljava/lang/CharSequence;" (as (Primitive "java.lang.CharSequence") replacement)]))
          @.js
          ... TODO: Remove this when Nashorn is no longer being used.
          (..if_nashorn
           
-          (:as Text
-               ("js object do" "replaceAll" template [pattern replacement])))
+          (as Text
+              ("js object do" "replaceAll" template [pattern replacement])))
          @.python
-         (:as Text
-              ("python object do" "replace" template [pattern replacement]))
+         (as Text
+             ("python object do" "replace" template [pattern replacement]))
          ... TODO @.lua
          @.ruby
-         (:as Text
-              ("ruby object do" "gsub" template [pattern replacement]))
+         (as Text
+             ("ruby object do" "gsub" template [pattern replacement]))
          @.php
-         (:as Text
-              ("php apply" (:expected ("php constant" "str_replace"))
-               pattern replacement template))
+         (as Text
+             ("php apply" (as_expected ("php constant" "str_replace"))
+              pattern replacement template))
          ... TODO @.scheme
          ... TODO @.common_lisp
          ... TODO @.r
@@ -286,19 +286,19 @@
   (def: (hash input)
     (for @.old
          (|> input
-             (: (Primitive "java.lang.String"))
+             (is (Primitive "java.lang.String"))
              "jvm invokevirtual:java.lang.String:hashCode:"
              "jvm convert int-to-long"
-             (:as Nat))
+             (as Nat))
 
          @.jvm
          (|> input
-             (:as (Primitive "java.lang.String"))
+             (as (Primitive "java.lang.String"))
              ("jvm member invoke virtual" [] "java.lang.String" "hashCode" [])
              "jvm conversion int-to-long"
              "jvm object cast"
-             (: (Primitive "java.lang.Long"))
-             (:as Nat))
+             (is (Primitive "java.lang.Long"))
+             (as Nat))
          ... Platform-independent default.
          (let [length ("lux text size" input)]
            (loop [index 0
@@ -355,45 +355,45 @@
 (def: .public (lower_cased value)
   (-> Text Text)
   (for @.old
-       (:as Text
-            ("jvm invokevirtual:java.lang.String:toLowerCase:"
-             (:as (Primitive "java.lang.String") value)))
+       (as Text
+           ("jvm invokevirtual:java.lang.String:toLowerCase:"
+            (as (Primitive "java.lang.String") value)))
        @.jvm
-       (:as Text
-            ("jvm member invoke virtual" [] "java.lang.String" "toLowerCase" []
-             (:as (Primitive "java.lang.String") value)))
+       (as Text
+           ("jvm member invoke virtual" [] "java.lang.String" "toLowerCase" []
+            (as (Primitive "java.lang.String") value)))
        @.js
-       (:as Text
-            ("js object do" "toLowerCase" value []))
+       (as Text
+           ("js object do" "toLowerCase" value []))
        @.python
-       (:as Text
-            ("python object do" "lower" value []))
+       (as Text
+           ("python object do" "lower" value []))
        @.lua
-       (:as Text
-            ("lua apply" ("lua constant" "string.lower") [value]))
+       (as Text
+           ("lua apply" ("lua constant" "string.lower") [value]))
        @.ruby
-       (:as Text
-            ("ruby object do" "downcase" value []))))
+       (as Text
+           ("ruby object do" "downcase" value []))))
 
 (def: .public (upper_cased value)
   (-> Text Text)
   (for @.old
-       (:as Text
-            ("jvm invokevirtual:java.lang.String:toUpperCase:"
-             (:as (Primitive "java.lang.String") value)))
+       (as Text
+           ("jvm invokevirtual:java.lang.String:toUpperCase:"
+            (as (Primitive "java.lang.String") value)))
        @.jvm
-       (:as Text
-            ("jvm member invoke virtual" [] "java.lang.String" "toUpperCase" []
-             (:as (Primitive "java.lang.String") value)))
+       (as Text
+           ("jvm member invoke virtual" [] "java.lang.String" "toUpperCase" []
+            (as (Primitive "java.lang.String") value)))
        @.js
-       (:as Text
-            ("js object do" "toUpperCase" value []))
+       (as Text
+           ("js object do" "toUpperCase" value []))
        @.python
-       (:as Text
-            ("python object do" "upper" value []))
+       (as Text
+           ("python object do" "upper" value []))
        @.lua
-       (:as Text
-            ("lua apply" ("lua constant" "string.upper") [value]))
+       (as Text
+           ("lua apply" ("lua constant" "string.upper") [value]))
        @.ruby
-       (:as Text
-            ("ruby object do" "upcase" value []))))
+       (as Text
+           ("ruby object do" "upcase" value []))))
diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux
index 98526e286..eb1cecf59 100644
--- a/stdlib/source/library/lux/data/text/buffer.lux
+++ b/stdlib/source/library/lux/data/text/buffer.lux
@@ -16,7 +16,7 @@
     [number
      ["n" nat]]]
    [type
-    abstract]]]
+    [abstract {"-" pattern}]]]]
  ["[0]" //])
 
 (with_expansions [ (as_is (import: java/lang/CharSequence
@@ -58,78 +58,78 @@
 
       (def: .public empty
         Buffer
-        (:abstraction (with_expansions [ [0 function.identity]]
-                        (for @.old 
-                             @.jvm 
-                             @.js [0 function.identity]
-                             @.lua [0 function.identity]
-                             ... default
-                             sequence.empty))))
+        (abstraction (with_expansions [ [0 function.identity]]
+                       (for @.old 
+                            @.jvm 
+                            @.js [0 function.identity]
+                            @.lua [0 function.identity]
+                            ... default
+                            sequence.empty))))
 
       (def: .public (then chunk buffer)
         (-> Text Buffer Buffer)
-        (with_expansions [ (let [[capacity transform] (:representation buffer)
-                                      then! (: (-> Text java/lang/StringBuilder java/lang/StringBuilder)
-                                               (function (_ chunk builder)
-                                                 (exec
-                                                   (java/lang/Appendable::append (:as java/lang/CharSequence chunk)
-                                                                                 builder)
-                                                   builder)))]
-                                  (:abstraction [(n.+ (//.size chunk) capacity)
-                                                 (|>> transform (then! chunk))]))]
+        (with_expansions [ (let [[capacity transform] (representation buffer)
+                                      then! (is (-> Text java/lang/StringBuilder java/lang/StringBuilder)
+                                                (function (_ chunk builder)
+                                                  (exec
+                                                    (java/lang/Appendable::append (as java/lang/CharSequence chunk)
+                                                                                  builder)
+                                                    builder)))]
+                                  (abstraction [(n.+ (//.size chunk) capacity)
+                                                (|>> transform (then! chunk))]))]
           (for @.old 
                @.jvm 
-               @.js (let [[capacity transform] (:representation buffer)
-                          then! (: (-> (JS_Array Text) (JS_Array Text))
-                                   (function (_ array)
-                                     (exec
-                                       (JS_Array::push chunk array)
-                                       array)))]
-                      (:abstraction [(n.+ (//.size chunk) capacity)
-                                     (|>> transform then!)]))
-               @.lua (let [[capacity transform] (:representation buffer)
-                           then! (: (-> (array.Array Text) (array.Array Text))
+               @.js (let [[capacity transform] (representation buffer)
+                          then! (is (-> (JS_Array Text) (JS_Array Text))
                                     (function (_ array)
                                       (exec
-                                        (table/insert array chunk)
+                                        (JS_Array::push chunk array)
                                         array)))]
-                       (:abstraction [(n.+ (//.size chunk) capacity)
-                                      (|>> transform then!)]))
+                      (abstraction [(n.+ (//.size chunk) capacity)
+                                    (|>> transform then!)]))
+               @.lua (let [[capacity transform] (representation buffer)
+                           then! (is (-> (array.Array Text) (array.Array Text))
+                                     (function (_ array)
+                                       (exec
+                                         (table/insert array chunk)
+                                         array)))]
+                       (abstraction [(n.+ (//.size chunk) capacity)
+                                     (|>> transform then!)]))
                ... default
-               (|> buffer :representation (sequence.suffix chunk) :abstraction))))
+               (|> buffer representation (sequence.suffix chunk) abstraction))))
 
       (def: .public size
         (-> Buffer Nat)
-        (with_expansions [ (|>> :representation product.left)]
+        (with_expansions [ (|>> representation product.left)]
           (for @.old 
                @.jvm 
                @.js 
                @.lua 
                ... default
-               (|>> :representation
+               (|>> representation
                     (sequence#mix (function (_ chunk total)
                                     (n.+ (//.size chunk) total))
                                   0)))))
 
       (def: .public (text buffer)
         (-> Buffer Text)
-        (with_expansions [ (let [[capacity transform] (:representation buffer)]
+        (with_expansions [ (let [[capacity transform] (representation buffer)]
                                   (|> (java/lang/StringBuilder::new (ffi.as_int (.int capacity)))
                                       transform
                                       java/lang/StringBuilder::toString
                                       ffi.of_string))]
           (for @.old 
                @.jvm 
-               @.js (let [[capacity transform] (:representation buffer)]
+               @.js (let [[capacity transform] (representation buffer)]
                       (|> (array.empty 0)
-                          (:as (JS_Array Text))
+                          (as (JS_Array Text))
                           transform
                           (JS_Array::join "")))
-               @.lua (let [[capacity transform] (:representation buffer)]
+               @.lua (let [[capacity transform] (representation buffer)]
                        (table/concat (transform (array.empty 0)) ""))
                ... default
                (sequence#mix (function (_ chunk total)
                                (format total chunk))
                              ""
-                             (:representation buffer)))))
+                             (representation buffer)))))
       ))
diff --git a/stdlib/source/library/lux/data/text/encoding.lux b/stdlib/source/library/lux/data/text/encoding.lux
index e28dd31f1..10a29ed5c 100644
--- a/stdlib/source/library/lux/data/text/encoding.lux
+++ b/stdlib/source/library/lux/data/text/encoding.lux
@@ -1,10 +1,10 @@
 (.using
-  [library
-   [lux "*"
-    [macro
-     ["[0]" template]]
-    [type
-     abstract]]])
+ [library
+  [lux "*"
+   [macro
+    ["[0]" template]]
+   [type
+    [abstract {"-" pattern}]]]])
 
 ... https://en.wikipedia.org/wiki/Character_encoding#Common_character_encodings
 (abstract: .public Encoding
@@ -13,7 +13,7 @@
   (template [ ]
     [(`` (def: .public 
            Encoding
-           (:abstraction )))]
+           (abstraction )))]
 
     [ascii "ASCII"]
 
@@ -162,5 +162,5 @@
 
   (def: .public name
     (-> Encoding Text)
-    (|>> :representation))
+    (|>> representation))
   )
diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux
index a1627c8d2..e618307b4 100644
--- a/stdlib/source/library/lux/data/text/encoding/utf8.lux
+++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux
@@ -75,13 +75,13 @@
 
        @.js
        (cond ffi.on_nashorn?
-             (:as Binary ("js object do" "getBytes" value ["utf8"]))
+             (as Binary ("js object do" "getBytes" value ["utf8"]))
              
              ffi.on_node_js?
              (|> (Buffer::from|encoded value "utf8")
                  ... This coercion is valid as per NodeJS's documentation:
                  ... https://nodejs.org/api/buffer.html#buffer_buffers_and_typedarrays
-                 (:as Uint8Array))
+                 (as Uint8Array))
              
              ... On the browser
              (|> (TextEncoder::new (//.name //.utf_8))
@@ -89,14 +89,14 @@
              )
 
        @.python
-       (:as Binary ("python apply" (:expected ("python constant" "bytearray")) [value "utf-8"]))
+       (as Binary ("python apply" (as_expected ("python constant" "bytearray")) [value "utf-8"]))
 
        @.lua
        ("lua utf8 encode" value)
 
        @.ruby
        (|> value
-           (:as String)
+           (as String)
            (String::encode "UTF-8")
            (String::bytes))
 
@@ -104,7 +104,7 @@
        (|> (..unpack [..php_byte_array_format value])
            ..array_values
            ("php object new" "ArrayObject")
-           (:as Binary))
+           (as Binary))
 
        @.scheme
        (..string->utf8 value)))
@@ -118,7 +118,7 @@
          @.js
          (cond ffi.on_nashorn?
                (|> ("js object new" ("js constant" "java.lang.String") [value "utf8"])
-                   (:as Text)
+                   (as Text)
                    {try.#Success})
 
                ffi.on_node_js?
@@ -132,16 +132,16 @@
                    {try.#Success}))
 
          @.python
-         (try (:as Text ("python object do" "decode" (:expected value) ["utf-8"])))
+         (try (as Text ("python object do" "decode" (as_expected value) ["utf-8"])))
 
          @.lua
          {try.#Success ("lua utf8 decode" value)}
 
          @.ruby
          (|> value
-             (:as Array)
+             (as Array)
              (Array::pack "C*")
-             (:as String)
+             (as String)
              (String::force_encoding "UTF-8")
              {try.#Success})
 
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 0e048bdcd..3ae94415b 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -81,7 +81,7 @@
   (-> Text (Parser Code))
   (do <>.monad
     [symbol (.enclosed ["\@<" ">"] (symbol^ current_module))]
-    (in (` (: ((~! .Parser) Text) (~ (code.symbol symbol)))))))
+    (in (` (is ((~! .Parser) Text) (~ (code.symbol symbol)))))))
 
 (def: re_range^
   (Parser Code)
@@ -286,38 +286,38 @@
                            (re_scoped^ current_module)))
      .let [g!total (code.symbol ["" "0total"])
            g!temp (code.symbol ["" "0temp"])
-           [_ names steps] (list#mix (: (-> (Either Code [Re_Group Code])
-                                            [Nat (List Code) (List (List Code))]
-                                            [Nat (List Code) (List (List Code))])
-                                        (function (_ part [idx names steps])
-                                          (case part
-                                            (^.or {.#Left complex}
-                                                  {.#Right [{#Non_Capturing} complex]})
-                                            [idx
-                                             names
-                                             (list& (list g!temp complex
-                                                          (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))]))
-                                                    steps)]
-                                            
-                                            {.#Right [{#Capturing [?name num_captures]} scoped]}
-                                            (let [[idx! name!] (case ?name
-                                                                 {.#Some _name}
-                                                                 [idx (code.symbol ["" _name])]
-
-                                                                 {.#None}
-                                                                 [(++ idx) (code.symbol ["" (n#encoded idx)])])
-                                                  access (if (n.> 0 num_captures)
-                                                           (` ((~! product.left) (~ name!)))
-                                                           name!)]
-                                              [idx!
-                                               (list& name! names)
-                                               (list& (list name! scoped
-                                                            (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ access))]))
-                                                      steps)])
-                                            )))
+           [_ names steps] (list#mix (is (-> (Either Code [Re_Group Code])
+                                             [Nat (List Code) (List (List Code))]
+                                             [Nat (List Code) (List (List Code))])
+                                         (function (_ part [idx names steps])
+                                           (case part
+                                             (^.or {.#Left complex}
+                                                   {.#Right [{#Non_Capturing} complex]})
+                                             [idx
+                                              names
+                                              (list& (list g!temp complex
+                                                           (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))]))
+                                                     steps)]
+                                             
+                                             {.#Right [{#Capturing [?name num_captures]} scoped]}
+                                             (let [[idx! name!] (case ?name
+                                                                  {.#Some _name}
+                                                                  [idx (code.symbol ["" _name])]
+
+                                                                  {.#None}
+                                                                  [(++ idx) (code.symbol ["" (n#encoded idx)])])
+                                                   access (if (n.> 0 num_captures)
+                                                            (` ((~! product.left) (~ name!)))
+                                                            name!)]
+                                               [idx!
+                                                (list& name! names)
+                                                (list& (list name! scoped
+                                                             (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ access))]))
+                                                       steps)])
+                                             )))
                                      [0
-                                      (: (List Code) (list))
-                                      (: (List (List Code)) (list))]
+                                      (is (List Code) (list))
+                                      (is (List (List Code)) (list))]
                                      parts)]]
     (in [(if capturing?
            (list.size names)
diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux
index feab490e3..d0dec884f 100644
--- a/stdlib/source/library/lux/data/text/unicode/block.lux
+++ b/stdlib/source/library/lux/data/text/unicode/block.lux
@@ -11,7 +11,7 @@
      ["n" nat ("[1]#[0]" interval)]
      ["[0]" i64]]]
    [type
-    abstract]]]
+    [abstract {"-" pattern}]]]]
  [/// {"+" Char}])
 
 (abstract: .public Block
@@ -21,13 +21,13 @@
     (Monoid Block)
     
     (def: identity
-      (:abstraction
+      (abstraction
        (interval.between n.enum n#top n#bottom)))
     
     (def: (composite left right)
-      (let [left (:representation left)
-            right (:representation right)]
-        (:abstraction
+      (let [left (representation left)
+            right (representation right)]
+        (abstraction
          (interval.between n.enum
                            (n.min (# left bottom)
                                   (# right bottom))
@@ -36,12 +36,12 @@
 
   (def: .public (block start additional)
     (-> Char Nat Block)
-    (:abstraction (interval.between n.enum start (n.+ additional start))))
+    (abstraction (interval.between n.enum start (n.+ additional start))))
 
   (template [ ]
     [(def: .public 
        (-> Block Char)
-       (|>> :representation (the )))]
+       (|>> representation (the )))]
 
     [start interval.bottom]
     [end   interval.top]
@@ -49,13 +49,13 @@
 
   (def: .public (size block)
     (-> Block Nat)
-    (let [start (the interval.bottom (:representation block))
-          end (the interval.top (:representation block))]
+    (let [start (the interval.bottom (representation block))
+          end (the interval.top (representation block))]
       (|> end (n.- start) ++)))
 
   (def: .public (within? block char)
     (All (_ a) (-> Block Char Bit))
-    (interval.within? (:representation block) char))
+    (interval.within? (representation block) char))
   )
 
 (implementation: .public equivalence
diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux
index b6b1e06b2..89359273b 100644
--- a/stdlib/source/library/lux/data/text/unicode/set.lux
+++ b/stdlib/source/library/lux/data/text/unicode/set.lux
@@ -1,51 +1,51 @@
 (.using
-  [library
-   [lux "*"
-    [abstract
-     [equivalence {"+" Equivalence}]]
-    [data
-     [collection
-      ["[0]" list ("[1]#[0]" mix functor)]
-      ["[0]" set ("[1]#[0]" equivalence)]
-      ["[0]" tree "_"
-       ["[1]" finger {"+" Tree}]]]]
-    [type {"+" :by_example}
-     abstract]]]
-  ["[0]" / "_"
-   ["/[1]" // "_"
-    [// {"+" Char}]
-    ["[1][0]" block {"+" Block}]]])
+ [library
+  [lux "*"
+   [abstract
+    [equivalence {"+" Equivalence}]]
+   [data
+    [collection
+     ["[0]" list ("[1]#[0]" mix functor)]
+     ["[0]" set ("[1]#[0]" equivalence)]
+     ["[0]" tree "_"
+      ["[1]" finger {"+" Tree}]]]]
+   [type {"+" by_example}
+    [abstract {"-" pattern}]]]]
+ ["[0]" / "_"
+  ["/[1]" // "_"
+   [// {"+" Char}]
+   ["[1][0]" block {"+" Block}]]])
 
 (def: builder
   (tree.builder //block.monoid))
 
 (def: :@:
-  (:by_example [@]
-               (tree.Builder @ Block)
-               ..builder
-               
-               @))
+  (by_example [@]
+              (tree.Builder @ Block)
+              ..builder
+              
+              @))
 
 (abstract: .public Set
   (Tree :@: Block [])
 
   (def: .public (composite left right)
     (-> Set Set Set)
-    (:abstraction
+    (abstraction
      (# builder branch
-        (:representation left)
-        (:representation right))))
+        (representation left)
+        (representation right))))
 
   (def: (singleton block)
     (-> Block Set)
-    (:abstraction
+    (abstraction
      (# builder leaf block [])))
 
   (def: .public (set [head tail])
     (-> [Block (List Block)] Set)
-    (list#mix (: (-> Block Set Set)
-                 (function (_ block set)
-                   (..composite (..singleton block) set)))
+    (list#mix (is (-> Block Set Set)
+                  (function (_ block set)
+                    (..composite (..singleton block) set)))
               (..singleton head)
               tail))
 
@@ -202,19 +202,19 @@
 
   (def: .public start
     (-> Set Char)
-    (|>> :representation
+    (|>> representation
          tree.tag
          //block.start))
 
   (def: .public end
     (-> Set Char)
-    (|>> :representation
+    (|>> representation
          tree.tag
          //block.end))
 
   (def: .public (member? set character)
     (-> Set Char Bit)
-    (loop [tree (:representation set)]
+    (loop [tree (representation set)]
       (if (//block.within? (tree.tag tree) character)
         (case (tree.root tree)
           {0 #0 _}
@@ -229,8 +229,8 @@
     (Equivalence Set)
 
     (def: (= reference subject)
-      (set#= (set.of_list //block.hash (tree.tags (:representation reference)))
-             (set.of_list //block.hash (tree.tags (:representation subject))))))
+      (set#= (set.of_list //block.hash (tree.tags (representation reference)))
+             (set.of_list //block.hash (tree.tags (representation subject))))))
   )
 
 (template [ ]
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index d4665f058..987a25120 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -136,7 +136,7 @@
   (-> Inspector Inspector)
   (with_expansions [ (for @.lua (~~ (as_is ..tuple_array))
                                     (~~ (as_is)))]
-    (`` (|>> (:as (array.Array Any))
+    (`` (|>> (as (array.Array Any))
              
              (array.list {.#None})
              (list#each inspection)
@@ -145,7 +145,7 @@
 
 (def: .public (inspection value)
   Inspector
-  (with_expansions [ (let [object (:as java/lang/Object value)]
+  (with_expansions [ (let [object (as java/lang/Object value)]
                             (`` (<| (~~ (template [ ]
                                           [(case (ffi.check  object)
                                              {.#Some value}
@@ -160,7 +160,7 @@
                                           ))
                                     (case (ffi.check [java/lang/Object] object)
                                       {.#Some value}
-                                      (let [value (:as (array.Array java/lang/Object) value)]
+                                      (let [value (as (array.Array java/lang/Object) value)]
                                         (case (array.read! 0 value)
                                           (^.multi {.#Some tag}
                                                    [(ffi.check java/lang/Integer tag)
@@ -187,9 +187,9 @@
            (^.template [ ]
              [
               (`` (|> value (~~ (template.spliced ))))])
-           (["boolean" [(:as .Bit) %.bit]]
-            ["number" [(:as .Frac) %.frac]]
-            ["string" [(:as .Text) %.text]]
+           (["boolean" [(as .Bit) %.bit]]
+            ["number" [(as .Frac) %.frac]]
+            ["string" [(as .Text) %.text]]
             ["undefined" [JSON::stringify]])
            
            "object"
@@ -206,7 +206,7 @@
 
                    (not (or ("js object undefined?" ("js object get" "_lux_low" value))
                             ("js object undefined?" ("js object get" "_lux_high" value))))
-                   (|> value (:as .Int) %.int)
+                   (|> value (as .Int) %.int)
 
                    (Array::isArray value)
                    (tuple_inspection inspection value)
@@ -222,17 +222,17 @@
            (^.template [  ]
              [(^.or  )
               (`` (|> value (~~ (template.spliced ))))])
-           (["" "" [(:as .Bit) %.bit]]
-            ["" "" [(:as .Int) %.int]]
-            ["" "" [(:as .Frac) %.frac]]
-            ["" "" [(:as .Text) %.text]]
-            ["" "" [(:as .Text) %.text]])
+           (["" "" [(as .Bit) %.bit]]
+            ["" "" [(as .Int) %.int]]
+            ["" "" [(as .Frac) %.frac]]
+            ["" "" [(as .Text) %.text]]
+            ["" "" [(as .Text) %.text]])
 
            (^.or "" "")
            (tuple_inspection inspection value)
 
            (^.or "" "")
-           (let [variant (:as (array.Array Any) value)]
+           (let [variant (as (array.Array Any) value)]
              (case (array.size variant)
                3 (let [variant_tag ("python array read" 0 variant)
                        variant_flag ("python array read" 1 variant)
@@ -240,7 +240,7 @@
                    (if (or ("python object none?" variant_tag)
                            ("python object none?" variant_value))
                      (..str value)
-                     (|> (%.format (|> variant_tag (:as .Nat) %.nat)
+                     (|> (%.format (|> variant_tag (as .Nat) %.nat)
                                    " " (|> variant_flag "python object none?" not %.bit)
                                    " " (inspection variant_value))
                          (text.enclosed ["{" "}"]))))
@@ -254,14 +254,14 @@
            (^.template [ ]
              [
               (`` (|> value (~~ (template.spliced ))))])
-           (["boolean" [(:as .Bit) %.bit]]
-            ["string" [(:as .Text) %.text]]
+           (["boolean" [(as .Bit) %.bit]]
+            ["string" [(as .Text) %.text]]
             ["nil" [(pipe.new "nil" [])]])
 
            "number"
            (case (math::type value)
-             {.#Some "integer"} (|> value (:as .Int) %.int)
-             {.#Some "float"} (|> value (:as .Frac) %.frac)
+             {.#Some "integer"} (|> value (as .Int) %.int)
+             {.#Some "float"} (|> value (as .Frac) %.frac)
              
              _
              (..tostring value))
@@ -273,7 +273,7 @@
              (if (or ("lua object nil?" variant_tag)
                      ("lua object nil?" variant_value))
                (tuple_inspection inspection value)
-               (|> (%.format (|> variant_tag (:as .Nat) %.nat)
+               (|> (%.format (|> variant_tag (as .Nat) %.nat)
                              " " (%.bit (not ("lua object nil?" variant_flag)))
                              " " (inspection variant_value))
                    (text.enclosed ["{" "}"]))))
@@ -284,17 +284,17 @@
          @.ruby
          (template.let [(class_of )
                         [(|> 
-                             (:as ..Object)
+                             (as ..Object)
                              Object::class)]
 
                         (to_s )
                         [(|> 
-                             (:as ..Object)
+                             (as ..Object)
                              Object::to_s)]]
            (let [value_class (class_of value)]
              (`` (cond (~~ (template [  ]
                              [(same? (class_of ) value_class)
-                              (|> value (:as ) )]
+                              (|> value (as ) )]
 
                              [#0 Bit %.bit]
                              [#1 Bit %.bit]
@@ -311,7 +311,7 @@
                          (if (or ("ruby object nil?" variant_tag)
                                  ("ruby object nil?" variant_value))
                            (tuple_inspection inspection value)
-                           (|> (%.format (|> variant_tag (:as .Nat) %.nat)
+                           (|> (%.format (|> variant_tag (as .Nat) %.nat)
                                          " " (%.bit (not ("ruby object nil?" variant_flag)))
                                          " " (inspection variant_value))
                                (text.enclosed ["{" "}"]))))
@@ -327,10 +327,10 @@
            (^.template [ ]
              [
               (`` (|> value (~~ (template.spliced ))))])
-           (["boolean" [(:as .Bit) %.bit]]
-            ["integer" [(:as .Int) %.int]]
-            ["double" [(:as .Frac) %.frac]]
-            ["string" [(:as .Text) %.text]]
+           (["boolean" [(as .Bit) %.bit]]
+            ["integer" [(as .Int) %.int]]
+            ["double" [(as .Frac) %.frac]]
+            ["string" [(as .Text) %.text]]
             ["NULL" [(pipe.new "null" [])]]
             ["array" [(tuple_inspection inspection)]])
 
@@ -341,7 +341,7 @@
              (if (or ("php object null?" variant_tag)
                      ("php object null?" variant_value))
                (..strval value)
-               (|> (%.format (|> variant_tag (:as .Nat) %.nat)
+               (|> (%.format (|> variant_tag (as .Nat) %.nat)
                              " " (%.bit (not ("php object null?" variant_flag)))
                              " " (inspection variant_value))
                    (text.enclosed ["{" "}"]))))
@@ -354,10 +354,10 @@
                          [( value)
                           (`` (|> value (~~ (template.spliced ))))]
 
-                         [..boolean? [(:as .Bit) %.bit]]
-                         [..integer? [(:as .Int) %.int]]
-                         [..real? [(:as .Frac) %.frac]]
-                         [..string? [(:as .Text) %.text]]
+                         [..boolean? [(as .Bit) %.bit]]
+                         [..integer? [(as .Int) %.int]]
+                         [..real? [(as .Frac) %.frac]]
+                         [..string? [(as .Text) %.text]]
                          ["scheme object nil?" [(pipe.new "()" [])]]
                          [..vector? [(tuple_inspection inspection)]]))
 
@@ -365,11 +365,11 @@
                    (let [variant_tag (..car value)
                          variant_rest (..cdr value)]
                      (if (and (..integer? variant_tag)
-                              (i.> +0 (:as Int variant_tag))
+                              (i.> +0 (as Int variant_tag))
                               (..pair? variant_rest))
                        (let [variant_flag (..car variant_rest)
                              variant_value (..cdr variant_rest)]
-                         (|> (%.format (|> variant_tag (:as .Nat) %.nat)
+                         (|> (%.format (|> variant_tag (as .Nat) %.nat)
                                        " " (%.bit (not ("scheme object nil?" variant_flag)))
                                        " " (inspection variant_value))
                              (text.enclosed ["{" "}"])))
@@ -397,7 +397,7 @@
           (~~ (template [ ]
                 [(do <>.monad
                    [_ (.sub )]
-                   (in (|>> (:as ) )))]
+                   (in (|>> (as ) )))]
 
                 [Bit %.bit]
                 [Nat %.nat]
@@ -413,7 +413,7 @@
           (~~ (template [ ]
                 [(do <>.monad
                    [_ (.sub )]
-                   (in (|>> (:as ) )))]
+                   (in (|>> (as ) )))]
 
                 [Ratio %.ratio]
                 [Symbol %.symbol]
@@ -434,12 +434,12 @@
           (do <>.monad
             [[_ elemT] (.applied (<>.and (.exactly List) .any))
              elemR (.local (list elemT) representation)]
-            (in (|>> (:as (List Any)) (%.list elemR))))
+            (in (|>> (as (List Any)) (%.list elemR))))
 
           (do <>.monad
             [[_ elemT] (.applied (<>.and (.exactly Maybe) .any))
              elemR (.local (list elemT) representation)]
-            (in (|>> (:as (Maybe Any))
+            (in (|>> (as (Maybe Any))
                      (%.maybe elemR)))))))
 
 (def: (variant_representation representation)
@@ -452,7 +452,7 @@
                                                variantV variantV]
                                           (case representations
                                             {.#Item leftR {.#Item rightR extraR+}}
-                                            (case (:as (Or Any Any) variantV)
+                                            (case (as (Or Any Any) variantV)
                                               {.#Left left}
                                               [lefts #0 (leftR left)]
 
@@ -483,7 +483,7 @@
                                (lastR tupleV)
                                
                                {.#Item headR tailR}
-                               (let [[leftV rightV] (:as [Any Any] tupleV)]
+                               (let [[leftV rightV] (as [Any Any] tupleV)]
                                  (%.format (headR leftV) " " (again tailR rightV)))))]
             (%.format "[" tuple_body "]"))))))
 
@@ -538,7 +538,7 @@
    "Location" (%.location location)
    "Type" (%.type type)))
 
-(syntax: .public (:hole [])
+(syntax: .public (hole [])
   (do meta.monad
     [location meta.location
      expectedT meta.expected_type]
@@ -558,10 +558,10 @@
   (exception.report
    "Name" (%.text name)))
 
-(syntax: .public (here [targets (: (.Parser (List Target))
-                                   (|> ..target
-                                       <>.some
-                                       (<>.else (list))))])
+(syntax: .public (here [targets (is (.Parser (List Target))
+                                    (|> ..target
+                                        <>.some
+                                        (<>.else (list))))])
   (do [! meta.monad]
     [location meta.location
      locals meta.locals
@@ -571,20 +571,20 @@
                            ... later bindings overshadow earlier ones if they have the same name.
                            list.reversed
                            (dictionary.of_list text.hash))]
-     targets (: (Meta (List Target))
-                (case targets
-                  {.#End}
-                  (|> environment
-                      dictionary.keys
-                      (list#each (function (_ local) [local {.#None}]))
-                      in)
-
-                  _
-                  (monad.each ! (function (_ [name format])
-                                  (if (dictionary.key? environment name)
-                                    (in [name format])
-                                    (function.constant (exception.except ..unknown_local_binding [name]))))
-                              targets)))]
+     targets (is (Meta (List Target))
+                 (case targets
+                   {.#End}
+                   (|> environment
+                       dictionary.keys
+                       (list#each (function (_ local) [local {.#None}]))
+                       in)
+
+                   _
+                   (monad.each ! (function (_ [name format])
+                                   (if (dictionary.key? environment name)
+                                     (in [name format])
+                                     (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)
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index f6640a9b2..3d4cdcced 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -519,11 +519,11 @@
                          ... Type
                          (let [(~ g!type) ("lux in-module"
                                            (~ g!module)
-                                           (.:of (~ (code.symbol name))))]
+                                           (.type_of (~ (code.symbol name))))]
                            ((~! md.code) "clojure"
                             (~ (if (type#= .Type def_type)
                                  (` (|> (~ (code.symbol name))
-                                        (:as .Type)
+                                        (as .Type)
                                         ((~! type.anonymous))
                                         ((~! ..type_definition)
                                          (~ g!module)
@@ -582,11 +582,11 @@
 
 (syntax: .public (default [[name parameters] ..declaration])
   (let [[_ short] name]
-    (in (list (` (: (.List ..Definition)
-                    (list [..#definition (~ (code.text short))
-                           ..#documentation ((~! ..minimal_definition_documentation)
-                                             ((~ (code.symbol name))
-                                              (~+ (list#each code.local_symbol parameters))))])))))))
+    (in (list (` (is (.List ..Definition)
+                     (list [..#definition (~ (code.text short))
+                            ..#documentation ((~! ..minimal_definition_documentation)
+                                              ((~ (code.symbol name))
+                                               (~+ (list#each code.local_symbol parameters))))])))))))
 
 (syntax: .public (documentation: [[name parameters] ..declaration
                                   extra (<>.some .any)])
@@ -630,18 +630,18 @@
                           subs (.tuple (<>.some .any))])
   (do meta.monad
     [expected (meta.exports name)]
-    (in (list (` (: (List Module)
-                    (list& [..#module (~ (code.text name))
-                            ..#description (~ description)
-                            ..#expected ((~! ..expected)
-                                         (~ (code.text (|> expected
-                                                           (list#each product.left)
-                                                           ..expected_format))))
-                            ..#definitions ((~! list.together) (list (~+ definitions)))]
-                           ($_ (# (~! list.monoid) (~' composite))
-                               (: (List Module)
-                                  (# (~! list.monoid) (~' identity)))
-                               (~+ subs)))))))))
+    (in (list (` (is (List Module)
+                     (list& [..#module (~ (code.text name))
+                             ..#description (~ description)
+                             ..#expected ((~! ..expected)
+                                          (~ (code.text (|> expected
+                                                            (list#each product.left)
+                                                            ..expected_format))))
+                             ..#definitions ((~! list.together) (list (~+ definitions)))]
+                            ($_ (# (~! list.monoid) (~' composite))
+                                (is (List Module)
+                                    (# (~! list.monoid) (~' identity)))
+                                (~+ subs)))))))))
 
 (def: listing
   (-> (List Text) (Markdown Block))
@@ -706,5 +706,5 @@
                       (text#< (the #module right) (the #module left))))
        (list#each ..module_documentation)
        (list.interposed md.horizontal_rule)
-       (list#mix md.then (: (Markdown Block) md.empty))
+       (list#mix md.then (is (Markdown Block) md.empty))
        md.markdown))
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index f9d3dd004..446f2e738 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -1,6 +1,6 @@
 (.using
  [library
-  [lux {"-" Primitive Type type int char :as}
+  [lux {"-" Primitive Type type int char as}
    ["[0]" meta]
    [abstract
     ["[0]" monad {"+" do}]]
@@ -115,9 +115,9 @@
      (-> (Type Value) Text Code Code)
      (let [unboxed (..reflection unboxed)]
        (` (|> (~ raw)
-              (: (.Primitive (~ (code.text 
))))
+              (is (.Primitive (~ (code.text 
))))
               "jvm object cast"
-              (: (.Primitive (~ (code.text ))))))))]
+              (is (.Primitive (~ (code.text ))))))))]
 
   [unbox boxed unboxed]
   [box unboxed boxed]
@@ -126,11 +126,11 @@
 (template [   ]
   [(template: .public ( value)
      [(|> value
-          (: )
+          (is )
           "jvm object cast"
           
           "jvm object cast"
-          (: ))])]
+          (is ))])]
 
   [byte_to_long    "jvm conversion byte-to-long"    ..Byte      ..Long]
 
@@ -424,8 +424,8 @@
   (-> Text Text Text (Parser Code))
   (do <>.monad
     [.let [dotted_name (format "::" field_name)]
-     [_ _ value] (: (Parser [Any Any Code])
-                    (.form ($_ <>.and (.this! (' :=)) (.this! (code.symbol ["" dotted_name])) .any)))]
+     [_ _ value] (is (Parser [Any Any Code])
+                     (.form ($_ <>.and (.this! (' :=)) (.this! (code.symbol ["" dotted_name])) .any)))]
     (in (`' ("jvm member put virtual"
              (~ (code.text class_name))
              (~ (code.text field_name))
@@ -472,9 +472,9 @@
 (def: (constructor_parser class_name arguments)
   (-> Text (List Argument) (Parser Code))
   (do <>.monad
-    [args (: (Parser (List Code))
-             (.form (<>.after (.this! (' ::new!))
-                                    (.tuple (<>.exactly (list.size arguments) .any)))))]
+    [args (is (Parser (List Code))
+              (.form (<>.after (.this! (' ::new!))
+                                     (.tuple (<>.exactly (list.size arguments) .any)))))]
     (in (` ("jvm member invoke constructor" (~ (code.text class_name))
             (~+ (|> args
                     (list.zipped/2 (list#each product.right arguments))
@@ -484,9 +484,9 @@
   (-> Text Text (List Argument) (Parser Code))
   (do <>.monad
     [.let [dotted_name (format "::" method_name "!")]
-     args (: (Parser (List Code))
-             (.form (<>.after (.this! (code.symbol ["" dotted_name]))
-                                    (.tuple (<>.exactly (list.size arguments) .any)))))]
+     args (is (Parser (List Code))
+              (.form (<>.after (.this! (code.symbol ["" dotted_name]))
+                                     (.tuple (<>.exactly (list.size arguments) .any)))))]
     (in (` ("jvm member invoke static" (~ (code.text class_name)) (~ (code.text method_name))
             (~+ (|> args
                     (list.zipped/2 (list#each product.right arguments))
@@ -497,9 +497,9 @@
      (-> (List (Type Var)) Text (List (Type Var)) Text (List Argument) Text (Parser Code))
      (do <>.monad
        [.let [dotted_name (format "::" method_name "!")]
-        args (: (Parser (List Code))
-                (.form (<>.after (.this! (code.symbol ["" dotted_name]))
-                                       (.tuple (<>.exactly (list.size arguments) .any)))))]
+        args (is (Parser (List Code))
+                 (.form (<>.after (.this! (code.symbol ["" dotted_name]))
+                                        (.tuple (<>.exactly (list.size arguments) .any)))))]
        (in (` ( [(~+ (list#each (|>> ..signature code.text) class_vars))]
                         (~ (code.text class_name)) (~ (code.text method_name))
                         [(~+ (list#each (|>> ..signature code.text) type_vars))]
@@ -582,10 +582,10 @@
       (-> (List (Type Var)) (Parser (Type Class))))
   (do <>.monad
     [.let [class_name^ (..valid_class_name type_vars)]
-     [name parameters] (: (Parser [External (List (Type Parameter))])
-                          ($_ <>.either
-                              (<>.and class_name^ (<>#in (list)))
-                              (.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))]
+     [name parameters] (is (Parser [External (List (Type Parameter))])
+                           ($_ <>.either
+                               (<>.and class_name^ (<>#in (list)))
+                               (.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))]
     (in (jvm.class (name.safe name) parameters))))
 
 (exception: .public (unknown_type_variable [name Text
@@ -691,12 +691,12 @@
 (def: declaration^
   (Parser (Type Declaration))
   (do <>.monad
-    [[name variables] (: (Parser [External (List (Type Var))])
-                         (<>.either (<>.and (..valid_class_name (list))
-                                            (<>#in (list)))
-                                    (.form (<>.and (..valid_class_name (list))
-                                                         (<>.some var^)))
-                                    ))]
+    [[name variables] (is (Parser [External (List (Type Var))])
+                          (<>.either (<>.and (..valid_class_name (list))
+                                             (<>#in (list)))
+                                     (.form (<>.and (..valid_class_name (list))
+                                                          (<>.some var^)))
+                                     ))]
     (in (jvm.declaration name variables))))
 
 (def: (class^ type_vars)
@@ -964,9 +964,9 @@
                                             []]})
                      ))
       (.form (do <>.monad
-                     [kind (: (Parser ImportMethodKind)
-                              (<>.or (.this! (' "static"))
-                                     (in [])))
+                     [kind (is (Parser ImportMethodKind)
+                               (<>.or (.this! (' "static"))
+                                      (in [])))
                       tvars (<>.else (list) ..vars^)
                       name .local_symbol
                       ?alias import_member_alias^
@@ -1209,10 +1209,10 @@
                           methods (<>.some (..method_def^ class_vars))])
   (do meta.monad
     [.let [fully_qualified_class_name full_class_name
-           method_parser (: (Parser Code)
-                            (|> methods
-                                (list#each (method->parser class_vars fully_qualified_class_name))
-                                (list#mix <>.either (<>.failure ""))))]]
+           method_parser (is (Parser Code)
+                             (|> methods
+                                 (list#each (method->parser class_vars fully_qualified_class_name))
+                                 (list#mix <>.either (<>.failure ""))))]]
     (in (list (` ("jvm class"
                   (~ (declaration$ (jvm.declaration full_class_name class_vars)))
                   (~ (class$ super))
@@ -1278,19 +1278,19 @@
           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))}
+                          {.#Some (.as (~ class_type)
+                                       (~ g!unchecked))}
                           {.#None}))]
       (case unchecked
         {.#Some unchecked}
-        (in (list (` (: (~ check_type)
-                        (let [(~ g!unchecked) (~ unchecked)]
-                          (~ check_code))))))
+        (in (list (` (is (~ check_type)
+                         (let [(~ g!unchecked) (~ unchecked)]
+                           (~ check_code))))))
 
         {.#None}
-        (in (list (` (: (-> (.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))))))
         ))))
 
 (syntax: .public (synchronized [lock .any
@@ -1340,18 +1340,18 @@
     (let [(open "[0]") commons]
       (do [! meta.monad]
         [arg_inputs (monad.each !
-                                (: (-> [Bit (Type Value)] (Meta [Bit Code]))
-                                   (function (_ [maybe? _])
-                                     (with_symbols [arg_name]
-                                       (in [maybe? arg_name]))))
+                                (is (-> [Bit (Type Value)] (Meta [Bit Code]))
+                                    (function (_ [maybe? _])
+                                      (with_symbols [arg_name]
+                                        (in [maybe? arg_name]))))
                                 #import_member_args)
          .let [input_jvm_types (list#each product.right #import_member_args)
-               arg_types (list#each (: (-> [Bit (Type Value)] Code)
-                                       (function (_ [maybe? arg])
-                                         (let [arg_type (value_type (the #import_member_mode commons) arg)]
-                                           (if maybe?
-                                             (` (Maybe (~ arg_type)))
-                                             arg_type))))
+               arg_types (list#each (is (-> [Bit (Type Value)] Code)
+                                        (function (_ [maybe? arg])
+                                          (let [arg_type (value_type (the #import_member_mode commons) arg)]
+                                            (if maybe?
+                                              (` (Maybe (~ arg_type)))
+                                              arg_type))))
                                     #import_member_args)]]
         (in [arg_inputs input_jvm_types arg_types])))
 
@@ -1372,8 +1372,8 @@
           ... else
           (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
             (` (let [(~ g!temp) (~ return_term)]
-                 (if (not (..null? (.:as (.Primitive "java.lang.Object")
-                                         (~ g!temp))))
+                 (if (not (..null? (.as (.Primitive "java.lang.Object")
+                                        (~ g!temp))))
                    (~ g!temp)
                    (panic! "Cannot produce null references from method calls."))))))
 
@@ -1399,28 +1399,28 @@
 (template [   ]
   [(def: ( mode [unboxed raw])
      (-> Primitive_Mode [(Type Value) Code] Code)
-     (let [[unboxed refined post] (: [(Type Value) Code (List Code)]
-                                     (case mode
-                                       {#ManualPrM}
-                                       [unboxed raw (list)]
-                                       
-                                       {#AutoPrM}
-                                       (with_expansions [' (template.spliced )
-                                                          (template [ 
 ]
-                                                                        [(# jvm.equivalence =  unboxed)
-                                                                         (with_expansions [' (template.spliced )]
-                                                                           [
-                                                                            (` (.|> (~ raw) (~+ 
)))
-                                                                            (list ')])]
-
-                                                                        ')]
-                                         (cond 
-                                               ... else
-                                               [unboxed
-                                                (if 
-                                                  (` ("jvm object cast" (~ raw)))
-                                                  raw)
-                                                (list)]))))
+     (let [[unboxed refined post] (is [(Type Value) Code (List Code)]
+                                      (case mode
+                                        {#ManualPrM}
+                                        [unboxed raw (list)]
+                                        
+                                        {#AutoPrM}
+                                        (with_expansions [' (template.spliced )
+                                                           (template [ 
 ]
+                                                                         [(# jvm.equivalence =  unboxed)
+                                                                          (with_expansions [' (template.spliced )]
+                                                                            [
+                                                                             (` (.|> (~ raw) (~+ 
)))
+                                                                             (list ')])]
+
+                                                                         ')]
+                                          (cond 
+                                                ... else
+                                                [unboxed
+                                                 (if 
+                                                   (` ("jvm object cast" (~ raw)))
+                                                   raw)
+                                                 (list)]))))
            unboxed/boxed (case (dictionary.value unboxed ..boxes)
                            {.#Some boxed}
                            ( unboxed boxed refined)
@@ -1435,23 +1435,23 @@
          (` (.|> (~ 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 (` (.: (.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) [(` (.: (.Primitive (~ (code.text box.boolean)))))]]
-    [jvm.byte (list) [(` (.: (.Primitive (~ (code.text box.byte)))))]]
-    [jvm.short (list) [(` (.: (.Primitive (~ (code.text box.short)))))]]
-    [jvm.int (list) [(` (.: (.Primitive (~ (code.text box.int)))))]]
-    [jvm.long (list) [(` (.: (.Primitive (~ (code.text box.long)))))]]
-    [jvm.char (list) [(` (.: (.Primitive (~ (code.text box.char)))))]]
-    [jvm.float (list) [(` (.: (.Primitive (~ (code.text box.float)))))]]
-    [jvm.double (list) [(` (.: (.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)
@@ -1464,8 +1464,8 @@
       (list.zipped/2 classes)
       (list#each (function (_ [class [maybe? input]])
                    (|> (if maybe?
-                         (` (: (.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))))))
@@ -1489,21 +1489,21 @@
       {#EnumDecl enum_members}
       (with_symbols [g!_]
         (do meta.monad
-          [.let [enum_type (: Code
-                              (case class_tvars
-                                {.#End}
-                                (` (.Primitive (~ (code.text full_name))))
-
-                                _
-                                (let [=class_tvars (list#each ..var$' class_tvars)]
-                                  (` (All ((~ g!_) (~+ =class_tvars))
-                                       (.Primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
-                 getter_interop (: (-> 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)))))))]]
+          [.let [enum_type (is Code
+                               (case class_tvars
+                                 {.#End}
+                                 (` (.Primitive (~ (code.text full_name))))
+
+                                 _
+                                 (let [=class_tvars (list#each ..var$' 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)))))))]]
           (in (list#each getter_interop enum_members))))
       
       {#ConstructorDecl [commons _]}
@@ -1531,51 +1531,51 @@
           [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))])
                  (open "[0]") commons
                  (open "[0]") method
-                 [jvm_op object_ast] (: [Text (List Code)]
-                                        (case #import_member_kind
-                                          {#StaticIMK}
-                                          ["jvm member invoke static"
-                                           (list)]
-
-                                          {#VirtualIMK}
-                                          (case kind
-                                            {#Class}
-                                            ["jvm member invoke virtual"
-                                             (list g!obj)]
-                                            
-                                            {#Interface}
-                                            ["jvm member invoke interface"
-                                             (list g!obj)]
-                                            )))
+                 [jvm_op object_ast] (is [Text (List Code)]
+                                         (case #import_member_kind
+                                           {#StaticIMK}
+                                           ["jvm member invoke static"
+                                            (list)]
+
+                                           {#VirtualIMK}
+                                           (case kind
+                                             {#Class}
+                                             ["jvm member invoke virtual"
+                                              (list g!obj)]
+                                             
+                                             {#Interface}
+                                             ["jvm member invoke interface"
+                                              (list g!obj)]
+                                             )))
                  method_return (the #import_method_return method)
-                 callC (: 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
-                                      (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)
-                                      (list.zipped/2 input_jvm_types)
-                                      (list#each ..decorate_input))))))
-                 jvm_interop (: Code
-                                (case (jvm.void? method_return)
-                                  {.#Left method_return}
-                                  (|> [method_return
-                                       callC]
-                                      (with_automatic_output_conversion (the #import_member_mode commons))
-                                      (with_return_maybe member false method_return)
-                                      (with_return_try member)
-                                      (with_return_io member))
-                                  
-                                  
-                                  {.#Right method_return}
-                                  (|> callC
-                                      (with_return_try member)
-                                      (with_return_io member))))]]
+                 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
+                                       (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)
+                                       (list.zipped/2 input_jvm_types)
+                                       (list#each ..decorate_input))))))
+                 jvm_interop (is Code
+                                 (case (jvm.void? method_return)
+                                   {.#Left method_return}
+                                   (|> [method_return
+                                        callC]
+                                       (with_automatic_output_conversion (the #import_member_mode commons))
+                                       (with_return_maybe member false method_return)
+                                       (with_return_try member)
+                                       (with_return_io member))
+                                   
+                                   
+                                   {.#Right method_return}
+                                   (|> callC
+                                       (with_return_try member)
+                                       (with_return_io member))))]]
           (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))
                                                     (~+ (syntax_inputs object_ast))])
                         ((~' in) (.list (.` (~ jvm_interop))))))))))
@@ -1602,27 +1602,27 @@
                                               getter_body)]
                             (in (` ((~! syntax:) (~ getter_call)
                                     ((~' in) (.list (.` (~ getter_body)))))))))
-         setter_interop (: (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_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_command (format (if _#import_field_static? "jvm putstatic" "jvm putfield")
-                                                            ":" full_name ":" _#import_field_name)
-                                     g!obj+ (: (List Code)
-                                               (if _#import_field_static?
-                                                 (list)
-                                                 (list (..un_quoted g!obj))))]
-                                 (in (list (` ((~! syntax:) (~ setter_call)
-                                               ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))
-                             (in (list))))]
+         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_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_command (format (if _#import_field_static? "jvm putstatic" "jvm putfield")
+                                                             ":" full_name ":" _#import_field_name)
+                                      g!obj+ (is (List Code)
+                                                 (if _#import_field_static?
+                                                   (list)
+                                                   (list (..un_quoted g!obj))))]
+                                  (in (list (` ((~! syntax:) (~ setter_call)
+                                                ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))
+                              (in (list))))]
         (in (list& getter_interop setter_interop)))
       )))
 
@@ -1638,12 +1638,12 @@
   (All (_ a) (-> (.Primitive "java.lang.Class" [a]) Bit))
   (|>> ("jvm member invoke virtual" [] "java.lang.Class" "isInterface" [])
        "jvm object cast"
-       (: ..Boolean)
-       (.:as Bit)))
+       (is ..Boolean)
+       (.as Bit)))
 
 (def: load_class
   (-> External (Try (.Primitive "java.lang.Class" [Any])))
-  (|>> (.:as (.Primitive "java.lang.String"))
+  (|>> (.as (.Primitive "java.lang.String"))
        ["Ljava/lang/String;"]
        ("jvm member invoke static" [] "java.lang.Class" "forName" [])
        try))
@@ -1674,8 +1674,8 @@
 (syntax: .public (array [type (..type^ (list))
                          size .any])
   (let [g!size (` (|> (~ size)
-                      (.: .Nat)
-                      (.:as (.Primitive (~ (code.text box.long))))
+                      (.is .Nat)
+                      (.as (.Primitive (~ (code.text box.long))))
                       "jvm object cast"
                       "jvm conversion long-to-int"))]
     (`` (cond (~~ (template [ ]
@@ -1691,8 +1691,8 @@
                     [jvm.double  "jvm array new double"]
                     [jvm.char    "jvm array new char"]))
               ... else
-              (in (list (` (: (~ (value_type {#ManualPrM} (jvm.array type)))
-                              ("jvm array new object" (~ g!size))))))))))
+              (in (list (` (is (~ (value_type {#ManualPrM} (jvm.array type)))
+                               ("jvm array new object" (~ g!size))))))))))
 
 (exception: .public (cannot_convert_to_jvm_type [type .Type])
   (exception.report
@@ -1762,18 +1762,18 @@
 
                   ... else
                   (# meta.monad each (jvm.class name)
-                     (: (Meta (List (Type Parameter)))
-                        (monad.each meta.monad
-                                    (function (_ paramLT)
-                                      (do meta.monad
-                                        [paramJT (lux_type->jvm_type context paramLT)]
-                                        (case (parser.parameter? paramJT)
-                                          {.#Some paramJT}
-                                          (in paramJT)
-
-                                          {.#None}
-                                          )))
-                                    params)))))
+                     (is (Meta (List (Type Parameter)))
+                         (monad.each meta.monad
+                                     (function (_ paramLT)
+                                       (do meta.monad
+                                         [paramJT (lux_type->jvm_type context paramLT)]
+                                         (case (parser.parameter? paramJT)
+                                           {.#Some paramJT}
+                                           (in paramJT)
+
+                                           {.#None}
+                                           )))
+                                     params)))))
 
         {.#Apply A F}
         (case (type.applied (list A) F)
@@ -1824,8 +1824,8 @@
       (in (list (` (.|> ((~ g!extension) (~ array))
                         "jvm conversion int-to-long"
                         "jvm object cast"
-                        (.: (.Primitive (~ (code.text box.long))))
-                        (.:as .Nat))))))
+                        (.is (.Primitive (~ (code.text box.long))))
+                        (.as .Nat))))))
 
     _
     (with_symbols [g!array]
@@ -1841,8 +1841,8 @@
        context meta.type_context
        array_jvm_type (lux_type->jvm_type context array_type)
        .let [g!idx (` (.|> (~ idx)
-                           (.: .Nat)
-                           (.:as (.Primitive (~ (code.text box.long))))
+                           (.is .Nat)
+                           (.as (.Primitive (~ (code.text box.long))))
                            "jvm object cast"
                            "jvm conversion long-to-int"))]]
       (`` (cond (~~ (template [  ]
@@ -1851,7 +1851,7 @@
                           array_jvm_type)
                        (in (list (` (.|> ( (~ g!idx) (~ array))
                                          "jvm object cast"
-                                         (.: (.Primitive (~ (code.text ))))))))]
+                                         (.is (.Primitive (~ (code.text ))))))))]
 
                       [jvm.boolean "jvm array read boolean" box.boolean]
                       [jvm.byte "jvm array read byte" box.byte]
@@ -1880,8 +1880,8 @@
        context meta.type_context
        array_jvm_type (lux_type->jvm_type context array_type)
        .let [g!idx (` (.|> (~ idx)
-                           (.: .Nat)
-                           (.:as (.Primitive (~ (code.text box.long))))
+                           (.is .Nat)
+                           (.as (.Primitive (~ (code.text box.long))))
                            "jvm object cast"
                            "jvm conversion long-to-int"))]]
       (`` (cond (~~ (template [  ]
@@ -1889,7 +1889,7 @@
                           (jvm.array )
                           array_jvm_type)
                        (let [g!value (` (.|> (~ value)
-                                             (.:as (.Primitive (~ (code.text ))))
+                                             (.as (.Primitive (~ (code.text ))))
                                              "jvm object cast"))]
                          (in (list (` ( (~ g!idx) (~ g!value) (~ array))))))]
 
@@ -1921,23 +1921,23 @@
    "Signature" (..signature type)
    "Reflection" (..reflection type)))
 
-(syntax: .public (:as [type (..type^ (list))
-                       object .any])
+(syntax: .public (as [type (..type^ (list))
+                      object .any])
   (case [(parser.array? type)
          (parser.class? type)]
     (^.or [{.#Some _} _] [_ {.#Some _}])
-    (in (list (` (.: (~ (..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]))))
 
 (template [   ]
   [(template: .public ( it)
-     [(|> it (: ) (:as ))])
+     [(|> it (is ) (as ))])
 
    (template: .public ( it)
-     [(|> it (: ) (:as ))])]
+     [(|> it (is ) (as ))])]
 
   [as_boolean .Bit ..Boolean of_boolean]
   [as_long .Int ..Long of_long]
@@ -1947,10 +1947,10 @@
 
 (template [  <$>  <$'>  ]
   [(template: .public ( it)
-     [(|> it (: ) (:as ) <$> (: ))])
+     [(|> it (is ) (as ) <$> (is ))])
 
    (template: .public ( it)
-     [(|> it (: ) <$'> (: ) (:as ))])]
+     [(|> it (is ) <$'> (is ) (as ))])]
 
   [as_byte .Int ..long_to_byte ..Long ..byte_to_long ..Byte of_byte]
   [as_short .Int ..long_to_short ..Long ..short_to_long ..Short of_short]
diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux
index f5b578b62..6554a4082 100644
--- a/stdlib/source/library/lux/ffi.lux
+++ b/stdlib/source/library/lux/ffi.lux
@@ -264,7 +264,7 @@
                   ]
         [(def: .public ( _)
            (-> Any Nothing)
-           (:expected ()))
+           (as_expected ()))
 
          (def: .public 
            (-> Any Bit)
@@ -385,10 +385,10 @@
                         (..input_type input)))))
            (.exec
              (~+ import!)
-             (.:expected
+             (.as_expected
               (~ (<| (..input_term input)
                      (..lux_optional :output:)
-                     (` ( (.:expected (~ source))
+                     (` ( (.as_expected (~ source))
                                  [(~+ (list#each ..host_optional g!parameters))]))))))))))
 
   (def: (namespaced namespace class alias member)
@@ -409,8 +409,8 @@
            {.#Item head tail}
            (list#mix (.function (_ sub super)
                        (` ( (~ (code.text sub))
-                                 (.:as (..Object .Any)
-                                       (~ super)))))
+                                 (.as (..Object .Any)
+                                      (~ super)))))
                      (` ( (~ (code.text head))))
                      tail)
            
@@ -427,7 +427,7 @@
            (~ (..output_type :output:))
            (.exec
              (~+ import!)
-             (.:expected
+             (.as_expected
               (~ (<| (lux_optional :output:)
                      (` ( (~ (code.text (..host_path (the #name it))))))))))))))
   
@@ -455,12 +455,12 @@
                        (~ (|> :output:
                               ..output_type
                               (..input_type input)))))
-                (.:expected
+                (.as_expected
                  (~ (<| (..input_term input)
                         (..lux_optional :output:)
                         (` ( (~ (for @.js (` ( (~ (code.text (..host_path class_name)))))
-                                          @.python (` (.:as ..Function
-                                                            (~ (..imported class_name))))))
+                                          @.python (` (.as ..Function
+                                                           (~ (..imported class_name))))))
                                   [(~+ (list#each ..host_optional g!parameters))]))))))))))
 
   (def: (static_field_definition import! [class_name class_parameters] alias namespace it)
@@ -475,12 +475,12 @@
           (.# (~! 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))))))))))))))))
+                           (.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)
@@ -497,7 +497,7 @@
            (.All ((~ g!it) (~+ g!variables))
              (.-> (~ g!class)
                   (~ (..output_type :field:))))
-           (.:expected
+           (.as_expected
             (~ (<| (lux_optional :field:)
                    (` ( (~ (code.text name)) (~ g!it))))))))))
 
@@ -519,8 +519,8 @@
                                   (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))))))))))
+                                                 (.as (..Object .Any)
+                                                      (~ (..imported class_name))))))))))
 
   (def: (virtual_method_definition [class_name class_parameters] alias namespace it)
     (-> Declaration Alias Namespace (Named Procedure) Code)
@@ -544,7 +544,7 @@
                   (~ (|> :output:
                          ..output_type
                          (..input_type input)))))
-           (.:expected
+           (.as_expected
             (~ (<| (..input_term input)
                    (..lux_optional :output:)
                    (` ( (~ (code.text method))
@@ -559,13 +559,13 @@
 
   (syntax: .public (import: [host_module (<>.maybe .text)
                              it ..import])
-    (let [host_module_import! (: (List Code)
-                                 (case host_module
-                                   {.#Some host_module}
-                                   (list (` ( (~ (code.text host_module)))))
+    (let [host_module_import! (is (List Code)
+                                  (case host_module
+                                    {.#Some host_module}
+                                    (list (` ( (~ (code.text host_module)))))
 
-                                   {.#None}
-                                   (list)))]
+                                    {.#None}
+                                    (list)))]
       (case it
         {#Global it}
         (in (list (..global_definition host_module_import! it)))
@@ -608,12 +608,12 @@
                                                       (.tuple (<>.some (<>.and .any .any)))))
                                    type .any
                                    term .any])
-         (in (list (` (.<| (.:as ..Function)
+         (in (list (` (.<| (.as ..Function)
                            ( (~ (code.nat (list.size inputs))))
-                           (.:as (.-> [(~+ (list.repeated (list.size inputs) (` .Any)))]
-                                      .Any))
-                           (.: (.-> [(~+ (list#each product.right inputs))]
-                                    (~ type)))
+                           (.as (.-> [(~+ (list.repeated (list.size inputs) (` .Any)))]
+                                     .Any))
+                           (.is (.-> [(~+ (list#each product.right inputs))]
+                                     (~ type)))
                            (.function ((~ (code.local_symbol self)) [(~+ (list#each product.left inputs))])
                              (~ term))))))))
 
@@ -626,24 +626,24 @@
                        (let [global (` ("js constant" (~ (code.text head))))]
                          (case tail
                            {.#End}
-                           (in (list (` (: (.Maybe (~ type))
-                                           (case (..type_of (~ global))
-                                             "undefined"
-                                             {.#None}
+                           (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 (` (: (.Maybe (~ type))
-                                             (case (..type_of (~ global))
-                                               "undefined"
-                                               {.#None}
+                             (in (list (` (is (.Maybe (~ type))
+                                              (case (..type_of (~ global))
+                                                "undefined"
+                                                {.#None}
 
-                                               (~ g!_)
-                                               (..global (~ type) [(~ (code.local_symbol (%.format head "." next)))
-                                                                   (~+ (list#each code.local_symbol tail))])))))))))))
+                                                (~ g!_)
+                                                (..global (~ type) [(~ (code.local_symbol (%.format head "." next)))
+                                                                    (~+ (list#each code.local_symbol tail))])))))))))))
 
                    (template: (!defined? )
                      [(.case (..global Any )
@@ -667,7 +667,7 @@
                      (|> (..global (Object Any) [process])
                          (maybe#each (|>> []
                                           ("js apply" ("js constant" "Object.prototype.toString.call"))
-                                          (:as Text)
+                                          (as Text)
                                           (text#= "[object process]")))
                          (maybe.else false)))
                    )
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index 2cd19ade0..697177697 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -1,6 +1,6 @@
 (.using
  [library
-  [lux {"-" :as type}
+  [lux {"-" as type}
    ["[0]" type ("[1]#[0]" equivalence)]
    [abstract
     ["[0]" monad {"+" Monad do}]
@@ -65,10 +65,10 @@
 
 (template [   ]
   [(template: .public ( it)
-     [(|> it (: ) (.:as (Primitive )))])
+     [(|> it (is ) (.as (Primitive )))])
 
    (template: .public ( it)
-     [(|> it (: (Primitive )) (.:as ))])]
+     [(|> it (is (Primitive )) (.as ))])]
 
   [as_boolean .Bit "java.lang.Boolean" of_boolean]
   [as_long .Int "java.lang.Long" of_long]
@@ -78,10 +78,10 @@
 
 (template [  <$>  <$'>  ]
   [(template: .public ( it)
-     [(|> it (: ) (.:as (Primitive )) <$> (: (Primitive )))])
+     [(|> it (is ) (.as (Primitive )) <$> (is (Primitive )))])
 
    (template: .public ( it)
-     [(|> it (: (Primitive )) <$'> (: (Primitive )) (.:as ))])]
+     [(|> it (is (Primitive )) <$'> (is (Primitive )) (.as ))])]
 
   [as_byte .Int ..long_to_byte "java.lang.Long" ..byte_to_long "java.lang.Byte" of_byte]
   [as_short .Int ..long_to_short "java.lang.Long" ..short_to_long "java.lang.Short" of_short]
@@ -380,14 +380,14 @@
 
 (def: (class_decl_type$ (open "[0]"))
   (-> Class_Declaration Code)
-  (let [=params (list#each (: (-> Type_Parameter Code)
-                              (function (_ [pname pbounds])
-                                (case pbounds
-                                  {.#End}
-                                  (code.symbol ["" pname])
-
-                                  {.#Item bound1 _}
-                                  (class_type {#ManualPrM} #class_params bound1))))
+  (let [=params (list#each (is (-> Type_Parameter Code)
+                               (function (_ [pname pbounds])
+                                 (case pbounds
+                                   {.#End}
+                                   (code.symbol ["" pname])
+
+                                   {.#Item bound1 _}
+                                   (class_type {#ManualPrM} #class_params bound1))))
                            #class_params)]
     (` (Primitive (~ (code.text (safe #class_name)))
                   [(~+ =params)]))))
@@ -457,8 +457,8 @@
   (-> Text Text (Parser Code))
   (do <>.monad
     [.let [dotted_name (format "::" field_name)]
-     [_ _ value] (: (Parser [Any Any Code])
-                    (.form ($_ <>.and (.this! (' :=)) (.this! (code.symbol ["" dotted_name])) .any)))]
+     [_ _ value] (is (Parser [Any Any Code])
+                     (.form ($_ <>.and (.this! (' :=)) (.this! (code.symbol ["" dotted_name])) .any)))]
     (in (`' ((~ (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (~ value))))))
 
 (def: (pre_walk_replace f input)
@@ -497,10 +497,10 @@
 (def: (constructor_parser params class_name arg_decls)
   (-> (List Type_Parameter) Text (List ArgDecl) (Parser Code))
   (do <>.monad
-    [args (: (Parser (List Code))
-             (.form (<>.after (.this! (' ::new!))
-                                    (.tuple (<>.exactly (list.size arg_decls) .any)))))
-     .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
+    [args (is (Parser (List Code))
+              (.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))))))
 
@@ -508,10 +508,10 @@
   (-> (List Type_Parameter) Text Text (List ArgDecl) (Parser Code))
   (do <>.monad
     [.let [dotted_name (format "::" method_name "!")]
-     args (: (Parser (List Code))
-             (.form (<>.after (.this! (code.symbol ["" dotted_name]))
-                                    (.tuple (<>.exactly (list.size arg_decls) .any)))))
-     .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
+     args (is (Parser (List Code))
+              (.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))))))
 
@@ -520,10 +520,10 @@
      (-> (List Type_Parameter) Text Text (List ArgDecl) (Parser Code))
      (do <>.monad
        [.let [dotted_name (format "::" method_name "!")]
-        args (: (Parser (List Code))
-                (.form (<>.after (.this! (code.symbol ["" dotted_name]))
-                                       (.tuple (<>.exactly (list.size arg_decls) .any)))))
-        .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
+        args (is (Parser (List Code))
+                 (.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))))))]
 
@@ -933,9 +933,9 @@
                                              #import_member_io?     io?]
                                             []]})))
       (.form (do <>.monad
-                     [kind (: (Parser ImportMethodKind)
-                              (<>.or (.this! (' "static"))
-                                     (in [])))
+                     [kind (is (Parser ImportMethodKind)
+                               (<>.or (.this! (' "static"))
+                                      (in [])))
                       tvars ..type_params^
                       name .local_symbol
                       ?alias import_member_alias^
@@ -1128,8 +1128,8 @@
     (let [super_replacer (parser_replacer (.form (do <>.monad
                                                          [_ (.this! (' ::super!))
                                                           args (.tuple (<>.exactly (list.size arg_decls) .any))
-                                                          .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ (list)))
-                                                                                                     arg_decls))]]
+                                                          .let [arg_decls' (is (List Text) (list#each (|>> product.right (simple_class$ (list)))
+                                                                                                      arg_decls))]]
                                                          (in (`' ((~ (code.text (format "jvm invokespecial"
                                                                                         ":" (the #super_class_name super_class)
                                                                                         ":" name
@@ -1284,19 +1284,19 @@
           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))}
+                          {.#Some (.as (~ class_type)
+                                       (~ g!unchecked))}
                           {.#None}))]
       (case unchecked
         {.#Some unchecked}
-        (in (list (` (: (~ check_type)
-                        (let [(~ g!unchecked) (~ unchecked)]
-                          (~ check_code))))))
+        (in (list (` (is (~ check_type)
+                         (let [(~ g!unchecked) (~ unchecked)]
+                           (~ check_code))))))
 
         {.#None}
-        (in (list (` (: (-> (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))))))
         ))))
 
 (syntax: .public (synchronized [lock .any
@@ -1344,20 +1344,20 @@
     (let [(open "[0]") commons]
       (do [! meta.monad]
         [arg_inputs (monad.each !
-                                (: (-> [Bit GenericType] (Meta [Bit Code]))
-                                   (function (_ [maybe? _])
-                                     (with_symbols [arg_name]
-                                       (in [maybe? arg_name]))))
+                                (is (-> [Bit GenericType] (Meta [Bit Code]))
+                                    (function (_ [maybe? _])
+                                      (with_symbols [arg_name]
+                                        (in [maybe? arg_name]))))
                                 #import_member_args)
-         .let [arg_classes (: (List Text)
-                              (list#each (|>> product.right (simple_class$ (list#composite type_params #import_member_tvars)))
-                                         #import_member_args))
-               arg_types (list#each (: (-> [Bit GenericType] Code)
-                                       (function (_ [maybe? arg])
-                                         (let [arg_type (class_type (the #import_member_mode commons) type_params arg)]
-                                           (if maybe?
-                                             (` (Maybe (~ arg_type)))
-                                             arg_type))))
+         .let [arg_classes (is (List Text)
+                               (list#each (|>> product.right (simple_class$ (list#composite type_params #import_member_tvars)))
+                                          #import_member_args))
+               arg_types (list#each (is (-> [Bit GenericType] Code)
+                                        (function (_ [maybe? arg])
+                                          (let [arg_type (class_type (the #import_member_mode commons) type_params arg)]
+                                            (if maybe?
+                                              (` (Maybe (~ arg_type)))
+                                              arg_type))))
                                     #import_member_args)]]
         (in [arg_inputs arg_classes arg_types])))
 
@@ -1372,8 +1372,8 @@
       (` (??? (~ return_term)))
       (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
         (` (let [(~ g!temp) (~ return_term)]
-             (if (not (..null? (.:as (Primitive "java.lang.Object")
-                                     (~ g!temp))))
+             (if (not (..null? (.as (Primitive "java.lang.Object")
+                                    (~ g!temp))))
                (~ g!temp)
                (panic! (~ (code.text (format "Cannot produce null references from method calls @ "
                                              (the #class_name class)
@@ -1459,22 +1459,22 @@
       {#EnumDecl enum_members}
       (macro.with_symbols [g!_]
         (do [! meta.monad]
-          [.let [enum_type (: Code
-                              (case class_tvars
-                                {.#End}
-                                (` (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)]))))))
-                 getter_interop (: (-> 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)))))))))]]
+          [.let [enum_type (is Code
+                               (case class_tvars
+                                 {.#End}
+                                 (` (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)]))))))
+                 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)))))))))]]
           (in (list#each getter_interop enum_members))))
       
       {#ConstructorDecl [commons _]}
@@ -1495,22 +1495,22 @@
           [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (the #import_member_alias commons))])
                  (open "[0]") commons
                  (open "[0]") method
-                 [jvm_op object_ast] (: [Text (List Code)]
-                                        (case #import_member_kind
-                                          {#StaticIMK}
-                                          ["invokestatic"
-                                           (list)]
-
-                                          {#VirtualIMK}
-                                          (case kind
-                                            {#Class}
-                                            ["invokevirtual"
-                                             (list g!obj)]
-                                            
-                                            {#Interface}
-                                            ["invokeinterface"
-                                             (list g!obj)]
-                                            )))
+                 [jvm_op object_ast] (is [Text (List Code)]
+                                         (case #import_member_kind
+                                           {#StaticIMK}
+                                           ["invokestatic"
+                                            (list)]
+
+                                           {#VirtualIMK}
+                                           (case kind
+                                             {#Class}
+                                             ["invokevirtual"
+                                              (list g!obj)]
+                                             
+                                             {#Interface}
+                                             ["invokeinterface"
+                                              (list g!obj)]
+                                             )))
                  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))
@@ -1531,10 +1531,10 @@
                typeC (if #import_field_maybe?
                        (` (Maybe (~ base_gtype)))
                        base_gtype)
-               tvar_asts (: (List Code)
-                            (|> class_tvars
-                                (list.only free_type_param?)
-                                (list#each lux_type_parameter)))
+               tvar_asts (is (List Code)
+                             (|> class_tvars
+                                 (list.only free_type_param?)
+                                 (list#each lux_type_parameter)))
                getter_name (code.symbol ["" (..import_name import_format method_prefix #import_field_name)])
                setter_name (code.symbol ["" (..import_name import_format method_prefix (format #import_field_name "!"))])]
          getter_interop (with_symbols [g!obj]
@@ -1556,27 +1556,27 @@
                                               getter_body)]
                             (in (` ((~! syntax:) (~ getter_call)
                                     ((~' in) (.list (.` (~ getter_body)))))))))
-         setter_interop (: (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_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_command (format (if #import_field_static? "jvm putstatic" "jvm putfield")
-                                                            ":" full_name ":" #import_field_name)
-                                     g!obj+ (: (List Code)
-                                               (if #import_field_static?
-                                                 (list)
-                                                 (list (un_quote g!obj))))]
-                                 (in (list (` ((~! syntax:) (~ setter_call)
-                                               ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))
-                             (in (list))))]
+         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_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_command (format (if #import_field_static? "jvm putstatic" "jvm putfield")
+                                                             ":" full_name ":" #import_field_name)
+                                      g!obj+ (is (List Code)
+                                                 (if #import_field_static?
+                                                   (list)
+                                                   (list (un_quote g!obj))))]
+                                  (in (list (` ((~! syntax:) (~ setter_call)
+                                                ((~' in) (.list (.` ((~! io.io) ((~ (code.text setter_command)) (~+ g!obj+) (~ setter_value))))))))))))
+                              (in (list))))]
         (in (list& getter_interop setter_interop)))
       )))
 
@@ -1727,5 +1727,5 @@
 (syntax: .public (type [type (..generic_type^ (list))])
   (in (list (..class_type {#ManualPrM} (list) type))))
 
-(template: .public (:as type term)
-  [(.:as type term)])
+(template: .public (as type term)
+  [(.as type term)])
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index cfcfec9f8..cb2c6a615 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -1,27 +1,27 @@
 (.using
-  [library
-   [lux {"-" Alias}
-    ["@" target]
-    ["[0]" meta]
-    [abstract
-     [monad {"+" do}]]
-    [control
-     ["[0]" io]
-     ["[0]" maybe]
-     ["<>" parser ("[1]#[0]" monad)
-      ["<[0]>" code {"+" Parser}]]]
-    [data
-     ["[0]" product]
-     ["[0]" text
-      ["%" format]]
-     [collection
-      ["[0]" list ("[1]#[0]" functor)]]]
-    [type
-     abstract]
-    [macro {"+" with_symbols}
-     [syntax {"+" syntax:}]
-     ["[0]" code]
-     ["[0]" template]]]])
+ [library
+  [lux {"-" Alias}
+   ["@" target]
+   ["[0]" meta]
+   [abstract
+    [monad {"+" do}]]
+   [control
+    ["[0]" io]
+    ["[0]" maybe]
+    ["<>" parser ("[1]#[0]" monad)
+     ["<[0]>" code {"+" Parser}]]]
+   [data
+    ["[0]" product]
+    ["[0]" text
+     ["%" format]]
+    [collection
+     ["[0]" list ("[1]#[0]" functor)]]]
+   [type
+    abstract]
+   [macro {"+" with_symbols}
+    [syntax {"+" syntax:}]
+    ["[0]" code]
+    ["[0]" template]]]])
 
 (abstract: .public (Object brand) Any)
 
@@ -228,12 +228,12 @@
              (~ (|> (nullable_type outputT)
                     (try_type try?)
                     (io_type io?))))
-         (:expected
+         (as_expected
           (~ (<| (with_io io?)
                  (with_try try?)
                  (without_null g!temp outputT)
                  (` ("php apply"
-                     (:as ..Function (~ source))
+                     (as ..Function (~ source))
                      (~+ (list#each (with_null g!temp) g!inputs)))))))))))
 
 (syntax: .public (import: [import ..import])
@@ -241,12 +241,12 @@
     (case import
       {#Class [class alias format members]}
       (with_symbols [g!object]
-        (let [qualify (: (-> Text Code)
-                         (function (_ member_name)
-                           (|> format
-                               (text.replaced "[1]" (maybe.else class alias))
-                               (text.replaced "[0]" member_name)
-                               code.local_symbol)))
+        (let [qualify (is (-> Text Code)
+                          (function (_ member_name)
+                            (|> format
+                                (text.replaced "[1]" (maybe.else class alias))
+                                (text.replaced "[0]" member_name)
+                                code.local_symbol)))
               g!type (code.local_symbol (maybe.else class alias))
               class_import (` ("php constant" (~ (code.text class))))]
           (in (list& (` (type: (~ g!type)
@@ -257,15 +257,15 @@
                                     (if static?
                                       (` ((~! syntax:) ((~ (qualify (maybe.else field alias))) [])
                                           (# (~! meta.monad) (~' in)
-                                             (list (` (.:as (~ (nullable_type fieldT))
-                                                            ("php constant" (~ (code.text (%.format class "::" field))))))))))
+                                             (list (` (.as (~ (nullable_type fieldT))
+                                                           ("php constant" (~ (code.text (%.format class "::" field))))))))))
                                       (` (def: ((~ (qualify field))
                                                 (~ g!object))
                                            (-> (~ g!type)
                                                (~ (nullable_type fieldT)))
-                                           (:expected
+                                           (as_expected
                                             (~ (without_null g!temp fieldT (` ("php object get" (~ (code.text field))
-                                                                               (:as (..Object .Any) (~ g!object))))))))))
+                                                                               (as (..Object .Any) (~ g!object))))))))))
                                     
                                     {#Method method}
                                     (case method
@@ -273,8 +273,8 @@
                                       (..make_function (qualify (maybe.else method alias))
                                                        g!temp
                                                        (` ("php object get" (~ (code.text method))
-                                                           (:as (..Object .Any)
-                                                                ("php constant" (~ (code.text (%.format class "::" method)))))))
+                                                           (as (..Object .Any)
+                                                               ("php constant" (~ (code.text (%.format class "::" method)))))))
                                                        inputsT
                                                        io?
                                                        try?
@@ -290,7 +290,7 @@
                                                  (~ (|> (nullable_type outputT)
                                                         (try_type try?)
                                                         (io_type io?))))
-                                             (:expected
+                                             (as_expected
                                               (~ (<| (with_io io?)
                                                      (with_try try?)
                                                      (without_null g!temp outputT)
@@ -314,5 +314,5 @@
       (let [imported (` ("php constant" (~ (code.text name))))]
         (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))) [])
                       (# (~! meta.monad) (~' in)
-                         (list (` (.:as (~ (nullable_type fieldT)) (~ imported))))))))))
+                         (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 8beef44d5..93fe11d15 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -1,27 +1,27 @@
 (.using
-  [library
-   [lux {"-" Alias}
-    ["@" target]
-    ["[0]" meta]
-    [abstract
-     [monad {"+" do}]]
-    [control
-     ["[0]" io]
-     ["[0]" maybe]
-     ["<>" parser ("[1]#[0]" monad)
-      ["<[0]>" code {"+" Parser}]]]
-    [data
-     ["[0]" product]
-     ["[0]" text
-      ["%" format {"+" format}]]
-     [collection
-      ["[0]" list ("[1]#[0]" functor)]]]
-    [type
-     abstract]
-    [macro {"+" with_symbols}
-     [syntax {"+" syntax:}]
-     ["[0]" code]
-     ["[0]" template]]]])
+ [library
+  [lux {"-" Alias}
+   ["@" target]
+   ["[0]" meta]
+   [abstract
+    [monad {"+" do}]]
+   [control
+    ["[0]" io]
+    ["[0]" maybe]
+    ["<>" parser ("[1]#[0]" monad)
+     ["<[0]>" code {"+" Parser}]]]
+   [data
+    ["[0]" product]
+    ["[0]" text
+     ["%" format {"+" format}]]
+    [collection
+     ["[0]" list ("[1]#[0]" functor)]]]
+   [type
+    abstract]
+   [macro {"+" with_symbols}
+    [syntax {"+" syntax:}]
+    ["[0]" code]
+    ["[0]" template]]]])
 
 (abstract: .public (Object brand) Any)
 
@@ -193,12 +193,12 @@
              (~ (|> (nilable_type outputT)
                     (try_type try?)
                     (io_type io?))))
-         (:expected
+         (as_expected
           (~ (<| (with_io io?)
                  (with_try try?)
                  (without_nil g!temp outputT)
                  (` ("scheme apply"
-                     (:as ..Function (~ source))
+                     (as ..Function (~ source))
                      (~+ (list#each (with_nil g!temp) g!inputs)))))))))))
 
 (syntax: .public (import: [import ..import])
@@ -218,5 +218,5 @@
       (let [imported (` ("scheme constant" (~ (code.text name))))]
         (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))))
                       (# (~! meta.monad) (~' in)
-                         (list (` (.:as (~ (nilable_type fieldT)) (~ imported))))))))))
+                         (list (` (.as (~ (nilable_type fieldT)) (~ imported))))))))))
       )))
diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux
index 7473ae233..3368f1671 100644
--- a/stdlib/source/library/lux/ffi/export.jvm.lux
+++ b/stdlib/source/library/lux/ffi/export.jvm.lux
@@ -66,15 +66,15 @@
 
 (syntax: .public (export: [api .local_symbol
                            exports (<>.many ..export)])
-  (let [initialization (: (List (API Constant))
-                          (list.all (.function (_ it)
-                                      (case it
-                                        {#Constant it}
-                                        {.#Some it}
-                                        
-                                        _
-                                        {.#None}))
-                                    exports))]
+  (let [initialization (is (List (API Constant))
+                           (list.all (.function (_ it)
+                                       (case it
+                                         {#Constant it}
+                                         {.#Some it}
+                                         
+                                         _
+                                         {.#None}))
+                                     exports))]
     (in (list (` (//.class: "final" (~ (code.local_symbol api))
                    (~+ (list#each (.function (_ it)
                                     (case it
diff --git a/stdlib/source/library/lux/locale.lux b/stdlib/source/library/lux/locale.lux
index 89d77b0e7..59b9e26e6 100644
--- a/stdlib/source/library/lux/locale.lux
+++ b/stdlib/source/library/lux/locale.lux
@@ -1,20 +1,20 @@
 (.using
-  [library
-   [lux "*"
-    [abstract
-     [equivalence {"+" Equivalence}]
-     ["[0]" hash {"+" Hash}]]
-    [control
-     ["[0]" maybe ("[1]#[0]" functor)]]
-    [data
-     ["[0]" text
-      ["%" format {"+" format}]
-      ["[0]" encoding {"+" Encoding}]]]
-    [type
-     abstract]]]
-  [/
-   ["[0]" language {"+" Language}]
-   ["[0]" territory {"+" Territory}]])
+ [library
+  [lux "*"
+   [abstract
+    [equivalence {"+" Equivalence}]
+    ["[0]" hash {"+" Hash}]]
+   [control
+    ["[0]" maybe ("[1]#[0]" functor)]]
+   [data
+    ["[0]" text
+     ["%" format {"+" format}]
+     ["[0]" encoding {"+" Encoding}]]]
+   [type
+    [abstract {"-" pattern}]]]]
+ [/
+  ["[0]" language {"+" Language}]
+  ["[0]" territory {"+" Territory}]])
 
 (abstract: .public Locale
   Text
@@ -24,17 +24,17 @@
 
   (def: .public (locale language territory encoding)
     (-> Language (Maybe Territory) (Maybe Encoding) Locale)
-    (:abstraction (format (language.code language)
-                          (|> territory
-                              (maybe#each (|>> territory.long_code (format ..territory_separator)))
-                              (maybe.else ""))
-                          (|> encoding
-                              (maybe#each (|>> encoding.name (format ..encoding_separator)))
-                              (maybe.else "")))))
+    (abstraction (format (language.code language)
+                         (|> territory
+                             (maybe#each (|>> territory.long_code (format ..territory_separator)))
+                             (maybe.else ""))
+                         (|> encoding
+                             (maybe#each (|>> encoding.name (format ..encoding_separator)))
+                             (maybe.else "")))))
 
   (def: .public code
     (-> Locale Text)
-    (|>> :representation))
+    (|>> representation))
 
   (def: .public hash
     (Hash Locale)
diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux
index 50604e065..3685740da 100644
--- a/stdlib/source/library/lux/locale/language.lux
+++ b/stdlib/source/library/lux/locale/language.lux
@@ -7,7 +7,7 @@
    [data
     ["[0]" text]]
    [type
-    abstract]
+    [abstract {"-" pattern}]]
    [macro
     ["[0]" template]]]])
 
@@ -20,7 +20,7 @@
   (template [ ]
     [(def: .public 
        (-> Language Text)
-       (|>> :representation (the )))]
+       (|>> representation (the )))]
 
     [name #name]
     [code #code]
@@ -31,8 +31,8 @@
        (template [   +]
          [(def: .public 
             Language
-            (:abstraction [#name 
-                           #code ]))
+            (abstraction [#name 
+                          #code ]))
           (`` (template []
                 [(def: .public 
                    Language
diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux
index 8df6f861d..dcbf207e7 100644
--- a/stdlib/source/library/lux/locale/territory.lux
+++ b/stdlib/source/library/lux/locale/territory.lux
@@ -7,7 +7,7 @@
    [data
     ["[0]" text]]
    [type
-    abstract]
+    [abstract {"-" pattern}]]
    [macro
     ["[0]" template]]]])
 
@@ -22,7 +22,7 @@
   (template [  ]
     [(def: .public 
        (-> Territory )
-       (|>> :representation
+       (|>> representation
             (the )))]
 
     [name         #name  Text]
@@ -34,10 +34,10 @@
   (template [    
+] [(def: .public
Territory - (:abstraction [#name - #short - #long - #code ])) + (abstraction [#name + #short + #long + #code ])) (`` (template [] [(def: .public Territory
)] @@ -307,7 +307,7 @@ (def: &equivalence ..equivalence) (def: hash - (|>> :representation + (|>> representation (the #long) (# text.hash hash)))) ) diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux index 60df4a57f..eb8fd2531 100644 --- a/stdlib/source/library/lux/macro.lux +++ b/stdlib/source/library/lux/macro.lux @@ -26,7 +26,7 @@ [?macro (//.macro name)] (case ?macro {.#Some macro} - ((:as Macro' macro) args) + ((as Macro' macro) args) {.#None} (# //.monad in (list syntax)))) @@ -43,7 +43,7 @@ (case ?macro {.#Some macro} (do [! //.monad] - [top_level_expansion ((:as Macro' macro) args)] + [top_level_expansion ((as Macro' macro) args)] (|> top_level_expansion (monad.each //.monad expansion) (# ! each list#conjoint))) @@ -63,7 +63,7 @@ (case ?macro {.#Some macro} (do //.monad - [expansion ((:as Macro' macro) args) + [expansion ((as Macro' macro) args) expansion' (monad.each //.monad full_expansion expansion)] (in (list#conjoint expansion'))) @@ -76,7 +76,7 @@ (do //.monad [harg+ (full_expansion harg) targs+ (monad.each //.monad full_expansion targs)] - (in (list (code.form (list#composite harg+ (list#conjoint (: (List (List Code)) targs+))))))) + (in (list (code.form (list#composite harg+ (list#conjoint (is (List (List Code)) targs+))))))) [_ {.#Variant members}] (do //.monad @@ -120,8 +120,8 @@ (pattern (list [_ {.#Tuple symbols}] body)) (do [! //.monad] [symbol_names (monad.each ! ..local_symbol symbols) - .let [symbol_defs (list#conjoint (list#each (: (-> Text (List Code)) - (function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name))))))) + .let [symbol_defs (list#conjoint (list#each (is (-> Text (List Code)) + (function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name))))))) symbol_names))]] (in (list (` ((~! do) (~! //.monad) [(~+ symbol_defs)] @@ -146,17 +146,17 @@ (let [[module _] (.symbol .._) [_ short] (.symbol ) macro_name [module short]] - (case (: (Maybe [Bit Code]) - (case tokens - (pattern (list [_ {.#Text "omit"}] - token)) - {.#Some [#1 token]} + (case (is (Maybe [Bit Code]) + (case tokens + (pattern (list [_ {.#Text "omit"}] + token)) + {.#Some [#1 token]} - (pattern (list token)) - {.#Some [#0 token]} + (pattern (list token)) + {.#Some [#0 token]} - _ - {.#None})) + _ + {.#None})) {.#Some [omit? token]} (do //.monad [location //.location diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux index 0e9bd029b..f1060fed1 100644 --- a/stdlib/source/library/lux/macro/local.lux +++ b/stdlib/source/library/lux/macro/local.lux @@ -52,9 +52,9 @@ (-> [Symbol Macro] (Meta Any)) (do meta.monad [[module_name definition_name] (meta.normal name) - .let [definition (: Global {.#Definition [false .Macro macro]}) - add_macro! (: (-> (PList Global) (PList Global)) - (plist.has definition_name definition))]] + .let [definition (is Global {.#Definition [false .Macro macro]}) + add_macro! (is (-> (PList Global) (PList Global)) + (plist.has definition_name definition))]] (..with_module module_name (function (_ module) (case (|> module (the .#definitions) (plist.value definition_name)) @@ -69,8 +69,8 @@ (-> Symbol (Meta Any)) (do meta.monad [[module_name definition_name] (meta.normal name) - .let [lacks_macro! (: (-> (PList Global) (PList Global)) - (plist.lacks definition_name))]] + .let [lacks_macro! (is (-> (PList Global) (PList Global)) + (plist.lacks definition_name))]] (..with_module module_name (function (_ module) (case (|> module (the .#definitions) (plist.value definition_name)) @@ -102,7 +102,7 @@ [_ (monad.each meta.monad ..push_one macros) seed meta.seed g!pop (//.symbol "pop") - _ (let [g!pop (: Symbol - ["" (//code.format g!pop)])] + _ (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)))))) diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux index b789e1f19..1b237996e 100644 --- a/stdlib/source/library/lux/macro/pattern.lux +++ b/stdlib/source/library/lux/macro/pattern.lux @@ -89,20 +89,20 @@ [_ {.#Tuple templates}])}] [_ {.#Form data}] branches)) - (case (: (Maybe (List Code)) - (do maybe_monad - [bindings' (monad#each maybe_monad symbol_short bindings) - data' (monad#each maybe_monad tuple_list data)] - (.let [num_bindings (list#size bindings')] - (if (every? (|>> ("lux i64 =" num_bindings)) - (list#each list#size data')) - (.let [apply (: (-> Replacement_Environment (List Code)) - (function (_ env) (list#each (realized_template env) templates)))] - (.|> data' - (list#each (function#composite apply (replacement_environment bindings'))) - list#conjoint - in)) - {.#None})))) + (case (is (Maybe (List Code)) + (do maybe_monad + [bindings' (monad#each maybe_monad symbol_short bindings) + data' (monad#each maybe_monad tuple_list data)] + (.let [num_bindings (list#size bindings')] + (if (every? (|>> ("lux i64 =" num_bindings)) + (list#each list#size data')) + (.let [apply (is (-> Replacement_Environment (List Code)) + (function (_ env) (list#each (realized_template env) templates)))] + (.|> data' + (list#each (function#composite apply (replacement_environment bindings'))) + list#conjoint + in)) + {.#None})))) {.#Some output} (meta#in (list#composite output branches)) diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux index 46fb3b98d..8530307be 100644 --- a/stdlib/source/library/lux/macro/syntax.lux +++ b/stdlib/source/library/lux/macro/syntax.lux @@ -1,29 +1,29 @@ (.using - [library - [lux "*" - ["[0]" macro {"+" with_symbols}] - ["[0]" meta] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" maybe] - ["[0]" try] - ["<>" parser - ["" code {"+" Parser}]]] - [data - ["[0]" text ("[1]#[0]" monoid)] - [collection - ["[0]" list]]] - [math - [number - ["[0]" nat] - ["[0]" int] - ["[0]" rev] - ["[0]" frac]]]]] - [// - ["[0]" code]] - ["[0]" / "_" - ["[1][0]" export]]) + [library + [lux "*" + ["[0]" macro {"+" with_symbols}] + ["[0]" meta] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" maybe] + ["[0]" try] + ["<>" parser + ["" code {"+" Parser}]]] + [data + ["[0]" text ("[1]#[0]" monoid)] + [collection + ["[0]" list]]] + [math + [number + ["[0]" nat] + ["[0]" int] + ["[0]" rev] + ["[0]" frac]]]]] + [// + ["[0]" code]] + ["[0]" / "_" + ["[1][0]" export]]) (def: (self_documenting binding parser) (All (_ a) (-> Code (Parser a) (Parser a))) @@ -60,20 +60,20 @@ [vars+parsers (case (list.pairs args) {.#Some args} (monad.each ! - (: (-> [Code Code] (Meta [Code Code])) - (function (_ [var parser]) - (with_expansions [ (in [var - (` ((~! ..self_documenting) (' (~ var)) - (~ parser)))])] - (case var - [_ {.#Symbol ["" _]}] - + (is (-> [Code Code] (Meta [Code Code])) + (function (_ [var parser]) + (with_expansions [ (in [var + (` ((~! ..self_documenting) (' (~ var)) + (~ parser)))])] + (case var + [_ {.#Symbol ["" _]}] + - [_ {.#Symbol _}] - (in [var parser]) + [_ {.#Symbol _}] + (in [var parser]) - _ - )))) + _ + )))) args) _ @@ -83,10 +83,10 @@ error_msg (code.text (macro.wrong_syntax_error [this_module name]))]] (in (list (` (.macro: (~ export_policy) ((~ (code.symbol ["" name])) (~ g!tokens) (~ g!state)) (.case ((~! .result) - (: ((~! .Parser) (Meta (List Code))) - ((~! do) (~! <>.monad) - [(~+ (..un_paired vars+parsers))] - ((~' in) (~ body)))) + (is ((~! .Parser) (Meta (List Code))) + ((~! do) (~! <>.monad) + [(~+ (..un_paired vars+parsers))] + ((~' in) (~ body)))) (~ g!tokens)) {try.#Success (~ g!body)} ((~ g!body) (~ g!state)) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index 247c752c7..d2260f584 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -136,9 +136,9 @@ (.let [parameters_amount (list.size _#parameters) inputs_amount (list.size inputs)] (if (nat.= parameters_amount inputs_amount) - (.let [environment (: Environment - (|> (list.zipped/2 _#parameters inputs) - (dictionary.of_list text.hash)))] + (.let [environment (is Environment + (|> (list.zipped/2 _#parameters inputs) + (dictionary.of_list text.hash)))] {.#Right [compiler (list#each (..applied environment) _#template)]}) (exception.except ..irregular_arguments [parameters_amount inputs_amount])))))) @@ -156,14 +156,14 @@ body .any]) (do meta.monad [here_name meta.current_module_name - expression? (: (Meta Bit) - (function (_ lux) - {try.#Success [lux (case (the .#expected lux) - {.#None} - false - - {.#Some _} - true)]})) + expression? (is (Meta Bit) + (function (_ lux) + {try.#Success [lux (case (the .#expected lux) + {.#None} + false + + {.#Some _} + true)]})) g!pop (local.push (list#each (function (_ local) [[here_name (the #name local)] (..macro local)]) diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index f556c1404..8f4ef73a8 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -23,7 +23,7 @@ [number ["i" int ("[1]#[0]" decimal)]]] [type - abstract]]] + [abstract {"-" pattern}]]]] ["[0]" // "_" ["[1]" modulus {"+" Modulus}]]) @@ -34,13 +34,13 @@ (def: .public (modular modulus value) (All (_ %) (-> (Modulus %) Int (Mod %))) - (:abstraction [#modulus modulus - #value (i.mod (//.divisor modulus) value)])) + (abstraction [#modulus modulus + #value (i.mod (//.divisor modulus) value)])) (template [ ] [(def: .public (All (_ %) (-> (Mod %) )) - (|>> :representation ))] + (|>> representation ))] [modulus (Modulus %) product.left] [value Int product.right] @@ -64,7 +64,7 @@ (All (_ %) (-> (Modulus %) (Codec Text (Mod %)))) (def: (encoded modular) - (let [[_ value] (:representation modular)] + (let [[_ value] (representation modular)] ($_ text#composite (i#encoded value) ..separator @@ -81,8 +81,8 @@ (template [ ] [(def: .public ( reference subject) (All (_ %) (-> (Mod %) (Mod %) Bit)) - (let [[_ reference] (:representation reference) - [_ subject] (:representation subject)] + (let [[_ reference] (representation reference) + [_ subject] (representation subject)] ( reference subject)))] [= i.=] @@ -106,12 +106,12 @@ (template [ ] [(def: .public ( param subject) (All (_ %) (-> (Mod %) (Mod %) (Mod %))) - (let [[modulus param] (:representation param) - [_ subject] (:representation subject)] - (:abstraction [#modulus modulus - #value (|> subject - ( param) - (i.mod (//.divisor modulus)))])))] + (let [[modulus param] (representation param) + [_ subject] (representation subject)] + (abstraction [#modulus modulus + #value (|> subject + ( param) + (i.mod (//.divisor modulus)))])))] [+ i.+] [- i.-] @@ -133,7 +133,7 @@ (def: .public (inverse modular) (All (_ %) (-> (Mod %) (Maybe (Mod %)))) - (let [[modulus value] (:representation modular) + (let [[modulus value] (representation modular) [[vk mk] gcd] (i.extended_gcd value (//.divisor modulus))] (case gcd +1 {.#Some (..modular modulus vk)} diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 4a8daaa97..6a08451e1 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -1,22 +1,22 @@ (.using - [library - [lux "*" - ["[0]" meta] - [abstract - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - [parser - ["<[0]>" code]]] - [macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - [number - ["i" int]]] - [type - abstract]]]) + [library + [lux "*" + ["[0]" meta] + [abstract + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + [parser + ["<[0]>" code]]] + [macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + [number + ["i" int]]] + [type + [abstract {"-" pattern}]]]]) (exception: .public zero_cannot_be_a_modulus) @@ -27,22 +27,22 @@ (Ex (_ %) (-> Int (Try (Modulus %)))) (if (i.= +0 value) (exception.except ..zero_cannot_be_a_modulus []) - {try.#Success (:abstraction value)})) + {try.#Success (abstraction value)})) (def: .public divisor (All (_ %) (-> (Modulus %) Int)) - (|>> :representation)) + (|>> representation)) (def: .public (= reference subject) (All (_ %r %s) (-> (Modulus %r) (Modulus %s) Bit)) - (i.= (:representation reference) - (:representation subject))) + (i.= (representation reference) + (representation subject))) (def: .public (congruent? modulus reference subject) (All (_ %) (-> (Modulus %) Int Int Bit)) (|> subject (i.- reference) - (i.% (:representation modulus)) + (i.% (representation modulus)) (i.= +0))) ) diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux index 511b0fef9..6d81a958b 100644 --- a/stdlib/source/library/lux/math/number/frac.lux +++ b/stdlib/source/library/lux/math/number/frac.lux @@ -64,14 +64,14 @@ @.jvm (as_is (template: (!double value) [(|> value - (:as (Primitive "java.lang.Double")) + (as (Primitive "java.lang.Double")) "jvm object cast")]) (template: (!frac value) [(|> value "jvm object cast" - (: (Primitive "java.lang.Double")) - (:as Frac))]) + (is (Primitive "java.lang.Double")) + (as Frac))]) (template [ ] [(def: .public @@ -111,7 +111,7 @@ (-> Frac Frac) (|>> [] ("js apply" ("js constant" )) - (:as Frac)))] + (as Frac)))] [cos "Math.cos"] [sin "Math.sin"] @@ -133,7 +133,7 @@ (def: .public (pow param subject) (-> Frac Frac Frac) - (:as Frac ("js apply" ("js constant" "Math.pow") [subject param])))) + (as Frac ("js apply" ("js constant" "Math.pow") [subject param])))) @.python (as_is (template [ ] @@ -141,7 +141,7 @@ (-> Frac Frac) (|>> [] ("python object do" ("python import" "math")) - (:as Frac)))] + (as Frac)))] [cos "cos"] [sin "sin"] @@ -162,7 +162,7 @@ (def: .public (pow param subject) (-> Frac Frac Frac) - (:as Frac ("python object do" "pow" ("python import" "math") [subject param]))) + (as Frac ("python object do" "pow" ("python import" "math") [subject param]))) (def: .public (root/3 it) (-> Frac Frac) @@ -180,7 +180,7 @@ (-> Frac Frac) (|>> [] ("lua apply" ("lua constant" )) - (:as Frac)))] + (as Frac)))] [cos "math.cos"] [sin "math.sin"] @@ -219,7 +219,7 @@ (-> Frac Frac) (|>> [] ("ruby apply" ("ruby constant" )) - (:as Frac)))] + (as Frac)))] [cos "Math.cos"] [sin "Math.sin"] @@ -240,7 +240,7 @@ [(def: .public ( it) (-> Frac Frac) (|> ("ruby object do" it []) - (:as Int) + (as Int) ("lux i64 f64")))] [ceil "ceil"] @@ -249,14 +249,14 @@ (def: .public (pow param subject) (-> Frac Frac Frac) - (:as Frac ("ruby object do" "**" subject [param])))) + (as Frac ("ruby object do" "**" subject [param])))) @.php (as_is (template [ ] [(def: .public (-> Frac Frac) (|>> ("php apply" ("php constant" )) - (:as Frac)))] + (as Frac)))] [cos "cos"] [sin "sin"] @@ -277,7 +277,7 @@ (def: .public (pow param subject) (-> Frac Frac Frac) - (:as Frac ("php apply" ("php constant" "pow") subject param))) + (as Frac ("php apply" ("php constant" "pow") subject param))) (def: .public root/3 (-> Frac Frac) @@ -288,7 +288,7 @@ [(def: .public (-> Frac Frac) (|>> ("scheme apply" ("scheme constant" )) - (:as Frac)))] + (as Frac)))] [cos "cos"] [sin "sin"] @@ -309,7 +309,7 @@ (def: .public (pow param subject) (-> Frac Frac Frac) - (:as Frac ("scheme apply" ("scheme constant" "expt") subject param))) + (as Frac ("scheme apply" ("scheme constant" "expt") subject param))) (def: .public root/3 (-> Frac Frac) @@ -713,9 +713,9 @@ (def: .public (of_bits it) (-> I64 Frac) - (case [(: Nat (..exponent it)) - (: Nat (..mantissa it)) - (: Nat (..sign it))] + (case [(is Nat (..exponent it)) + (is Nat (..mantissa it)) + (is Nat (..sign it))] (pattern [(static ..special_exponent_bits) 0 0]) ..positive_infinity diff --git a/stdlib/source/library/lux/math/number/i16.lux b/stdlib/source/library/lux/math/number/i16.lux index 467fa363f..06a52afa5 100644 --- a/stdlib/source/library/lux/math/number/i16.lux +++ b/stdlib/source/library/lux/math/number/i16.lux @@ -1,24 +1,32 @@ (.using - [library - [lux {"-" i64} - [abstract - [equivalence {"+" Equivalence}]] - [control - ["[0]" maybe]] - [type {"+" :by_example}]]] - [// - ["[0]" i64 {"+" Sub}]]) + [library + [lux {"-" i64} + [abstract + [equivalence {"+" Equivalence}]] + [control + ["[0]" maybe]] + [type {"+" by_example}]]] + [// + ["[0]" i64 {"+" Sub}]]) (def: sub (maybe.trusted (i64.sub 16))) (def: .public I16 Type - (:by_example [size] - (Sub size) - ..sub - - (I64 size))) + ... TODO: Switch to the cleaner approach ASAP. + (case (type_of ..sub) + {.#Apply :size: :sub:} + (type (I64 :size:)) + + _ + (undefined)) + ... (by_example [size] + ... (Sub size) + ... ..sub + + ... (I64 size)) + ) (def: .public equivalence (Equivalence I16) (# ..sub &equivalence)) (def: .public width Nat (# ..sub bits)) diff --git a/stdlib/source/library/lux/math/number/i32.lux b/stdlib/source/library/lux/math/number/i32.lux index e8967c412..6ddbcf015 100644 --- a/stdlib/source/library/lux/math/number/i32.lux +++ b/stdlib/source/library/lux/math/number/i32.lux @@ -1,7 +1,7 @@ (.using [library [lux {"-" i64} - [type {"+" :by_example}] + [type {"+" by_example}] [abstract [equivalence {"+" Equivalence}]] [control @@ -11,16 +11,24 @@ (def: sub ... TODO: Stop needing this coercion. - (:as (Sub (I64 (Primitive "#I32"))) - (maybe.trusted (i64.sub 32)))) + (as (Sub (I64 (Primitive "#I32"))) + (maybe.trusted (i64.sub 32)))) (def: .public I32 Type - (:by_example [size] - (Sub size) - ..sub - - (I64 size))) + ... TODO: Switch to the cleaner approach ASAP. + (case (type_of ..sub) + {.#Apply :size: :sub:} + (type (I64 :size:)) + + _ + (undefined)) + ... (by_example [size] + ... (Sub size) + ... ..sub + + ... (I64 size)) + ) (def: .public equivalence (Equivalence I32) (# ..sub &equivalence)) (def: .public width Nat (# ..sub bits)) diff --git a/stdlib/source/library/lux/math/number/i64.lux b/stdlib/source/library/lux/math/number/i64.lux index 281ea025e..3dcd42f8b 100644 --- a/stdlib/source/library/lux/math/number/i64.lux +++ b/stdlib/source/library/lux/math/number/i64.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" and or not false true} - [abstract - [equivalence {"+" Equivalence}] - [hash {"+" Hash}] - [monoid {"+" Monoid}]] - [control - ["[0]" try]]]] - [// - ["n" nat]]) + [library + [lux {"-" and or not false true} + [abstract + [equivalence {"+" Equivalence}] + [hash {"+" Hash}] + [monoid {"+" Monoid}]] + [control + ["[0]" try]]]] + [// + ["n" nat]]) (def: .public bits_per_byte 8) @@ -97,7 +97,7 @@ (def: .public (one? index input) (-> Nat (I64 Any) Bit) - (|> input (:as I64) (..and (..bit index)) (n.= 0) .not)) + (|> input .i64 (..and (..bit index)) (n.= 0) .not)) (def: .public (zero? index input) (-> Nat (I64 Any) Bit) @@ -143,27 +143,27 @@ (def: .public reversed (All (_ a) (-> (I64 a) (I64 a))) - (let [swapper (: (-> Nat (All (_ a) (-> (I64 a) (I64 a)))) - (function (_ power) - (let [size (..left_shifted power 1) - repetitions (: (-> Nat Text Text) - (function (_ times char) - (loop [iterations 1 - output char] - (if (n.< times iterations) - (again (++ iterations) - ("lux text concat" char output)) - output)))) - pattern (repetitions (n./ (n.+ size size) ..width) - ("lux text concat" - (repetitions size "1") - (repetitions size "0"))) - - high (try.trusted (# n.binary decoded pattern)) - low (..right_rotated size high)] - (function (_ value) - (..or (..right_shifted size (..and high value)) - (..left_shifted size (..and low value))))))) + (let [swapper (is (-> Nat (All (_ a) (-> (I64 a) (I64 a)))) + (function (_ power) + (let [size (..left_shifted power 1) + repetitions (is (-> Nat Text Text) + (function (_ times char) + (loop [iterations 1 + output char] + (if (n.< times iterations) + (again (++ iterations) + ("lux text concat" char output)) + output)))) + pattern (repetitions (n./ (n.+ size size) ..width) + ("lux text concat" + (repetitions size "1") + (repetitions size "0"))) + + high (try.trusted (# n.binary decoded pattern)) + low (..right_rotated size high)] + (function (_ value) + (..or (..right_shifted size (..and high value)) + (..left_shifted size (..and low value))))))) swap/01 (swapper 0) swap/02 (swapper 1) @@ -180,14 +180,14 @@ (type: .public (Sub size) (Interface - (: (Equivalence (I64 size)) - &equivalence) - (: Nat - bits) - (: (-> I64 (I64 size)) - narrow) - (: (-> (I64 size) I64) - wide))) + (is (Equivalence (I64 size)) + &equivalence) + (is Nat + bits) + (is (-> I64 (I64 size)) + narrow) + (is (-> (I64 size) I64) + wide))) (def: .public (sub width) (Ex (_ size) (-> Nat (Maybe (Sub size)))) @@ -197,15 +197,15 @@ sign (..bit (-- width)) mantissa (..mask (-- width)) co_mantissa (..xor (.i64 -1) mantissa)] - {.#Some (: Sub - (implementation - (def: &equivalence ..equivalence) - (def: bits width) - (def: (narrow value) - (..or (|> value (..and ..sign) (..right_shifted sign_shift)) - (|> value (..and mantissa)))) - (def: (wide value) - (.i64 (case (.nat (..and sign value)) - 0 value - _ (..or co_mantissa value))))))}) + {.#Some (is Sub + (implementation + (def: &equivalence ..equivalence) + (def: bits width) + (def: (narrow value) + (..or (|> value (..and ..sign) (..right_shifted sign_shift)) + (|> value (..and mantissa)))) + (def: (wide value) + (.i64 (case (.nat (..and sign value)) + 0 value + _ (..or co_mantissa value))))))}) {.#None})) diff --git a/stdlib/source/library/lux/math/number/i8.lux b/stdlib/source/library/lux/math/number/i8.lux index 469796261..15dc8c13a 100644 --- a/stdlib/source/library/lux/math/number/i8.lux +++ b/stdlib/source/library/lux/math/number/i8.lux @@ -1,24 +1,32 @@ (.using - [library - [lux {"-" i64} - [abstract - [equivalence {"+" Equivalence}]] - [control - ["[0]" maybe]] - [type {"+" :by_example}]]] - [// - ["[0]" i64 {"+" Sub}]]) + [library + [lux {"-" i64} + [type {"+" by_example}] + [abstract + [equivalence {"+" Equivalence}]] + [control + ["[0]" maybe]]]] + [// + ["[0]" i64 {"+" Sub}]]) (def: sub (maybe.trusted (i64.sub 8))) (def: .public I8 Type - (:by_example [size] - (Sub size) - ..sub - - (I64 size))) + ... TODO: Switch to the cleaner approach ASAP. + (case (type_of ..sub) + {.#Apply :size: :sub:} + (type (I64 :size:)) + + _ + (undefined)) + ... (by_example [size] + ... (Sub size) + ... ..sub + + ... (I64 size)) + ) (def: .public equivalence (Equivalence I8) (# ..sub &equivalence)) (def: .public width Nat (# ..sub bits)) diff --git a/stdlib/source/library/lux/math/number/nat.lux b/stdlib/source/library/lux/math/number/nat.lux index 9ead2ee82..31537c887 100644 --- a/stdlib/source/library/lux/math/number/nat.lux +++ b/stdlib/source/library/lux/math/number/nat.lux @@ -74,24 +74,23 @@ (def: .public (* parameter subject) (-> Nat Nat Nat) - (:as Nat - ("lux i64 *" - (:as Int parameter) - (:as Int subject)))) + (.nat ("lux i64 *" + (.int parameter) + (.int subject)))) (def: .public (/ parameter subject) (-> Nat Nat Nat) - (if ("lux i64 <" +0 (:as Int parameter)) + (if ("lux i64 <" +0 (.int parameter)) (if (..< parameter subject) 0 1) (let [quotient (|> subject ("lux i64 right-shift" 1) - ("lux i64 /" (:as Int parameter)) + ("lux i64 /" (.int parameter)) ("lux i64 left-shift" 1)) flat ("lux i64 *" - (:as Int parameter) - (:as Int quotient)) + (.int parameter) + (.int quotient)) remainder ("lux i64 -" flat subject)] (if (..< parameter remainder) quotient @@ -101,15 +100,15 @@ (-> Nat Nat [Nat Nat]) (let [quotient (../ parameter subject) flat ("lux i64 *" - (:as Int parameter) - (:as Int quotient))] + (.int parameter) + (.int quotient))] [quotient ("lux i64 -" flat subject)])) (def: .public (% parameter subject) (-> Nat Nat Nat) (let [flat ("lux i64 *" - (:as Int parameter) - (:as Int (../ parameter subject)))] + (.int parameter) + (.int (../ parameter subject)))] ("lux i64 -" flat subject))) (def: .public (gcd a b) @@ -298,7 +297,7 @@ (let [output' ("lux text concat" ( ("lux i64 and" mask input)) output)] - (case (: Nat ("lux i64 right-shift" input)) + (case (is Nat ("lux i64 right-shift" input)) 0 output' diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux index f00cc8dd7..9a6e9c826 100644 --- a/stdlib/source/library/lux/math/number/rev.lux +++ b/stdlib/source/library/lux/math/number/rev.lux @@ -127,7 +127,7 @@ (with_expansions [ 1] (def: .public (reciprocal numerator) (-> Nat Rev) - (.rev (case (: Nat ("lux i64 and" numerator)) + (.rev (case (is Nat ("lux i64 and" numerator)) 0 (..even_reciprocal numerator) _ (..odd_reciprocal numerator)))) @@ -135,7 +135,7 @@ (-> Rev Rev Rev) (if ("lux i64 =" +0 param) (panic! "Cannot divide Rev by zero!") - (let [reciprocal (case (: Nat ("lux i64 and" param)) + (let [reciprocal (case (is Nat ("lux i64 and" param)) 0 (..even_reciprocal (.nat param)) _ (..odd_reciprocal (.nat param)))] (.rev (//nat.* reciprocal (.nat subject))))))) @@ -234,13 +234,13 @@ 0 0 _ 1)) raw_size ("lux text size" raw_output) - zero_padding (: Text - (loop [zeroes_left (: Nat (//nat.- raw_size max_num_chars)) - output (: Text "")] - (if (//nat.= 0 zeroes_left) - output - (again (-- zeroes_left) - ("lux text concat" "0" output)))))] + zero_padding (is Text + (loop [zeroes_left (is Nat (//nat.- raw_size max_num_chars)) + output (is Text "")] + (if (//nat.= 0 zeroes_left) + output + (again (-- zeroes_left) + ("lux text concat" "0" output)))))] (|> raw_output ("lux text concat" zero_padding) ("lux text concat" ".")))) diff --git a/stdlib/source/library/lux/math/random.lux b/stdlib/source/library/lux/math/random.lux index 2d21ae951..c172e5c98 100644 --- a/stdlib/source/library/lux/math/random.lux +++ b/stdlib/source/library/lux/math/random.lux @@ -152,8 +152,8 @@ (let [start (unicode.start set) end (unicode.end set) size (n.- start end) - in_range (: (-> Char Char) - (|>> (n.% size) (n.+ start)))] + in_range (is (-> Char Char) + (|>> (n.% size) (n.+ start)))] (|> ..nat (# ..functor each in_range) (..only (unicode.member? set))))) @@ -375,10 +375,10 @@ ... http://xorshift.di.unimi.it/splitmix64.c (def: .public split_mix_64 (-> Nat PRNG) - (let [twist (: (-> Nat Nat Nat) - (function (_ shift value) - (i64.xor (i64.right_shifted shift value) - value))) + (let [twist (is (-> Nat Nat Nat) + (function (_ shift value) + (i64.xor (i64.right_shifted shift value) + value))) mix n.*] (..prng (n.+ (hex "9E,37,79,B9,7F,4A,7C,15")) (|>> (twist 30) diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index 6b78550a3..e349785f3 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -166,41 +166,41 @@ (-> Symbol (Meta (Maybe Macro))) (do ..monad [[module name] (..normal full_name)] - (: (Meta (Maybe Macro)) - (function (_ lux) - {try.#Success [lux - (case (..current_module_name lux) - {try.#Failure error} - {.#None} - - {try.#Success [_ this_module]} - (let [modules (the .#modules lux)] - (loop [module module - name name] - (do maybe.monad - [$module (plist.value module modules) - definition (: (Maybe Global) - (|> $module - (: Module) - (the .#definitions) - (plist.value name)))] - (case definition - {.#Alias [r_module r_name]} - (again r_module r_name) - - {.#Definition [exported? def_type def_value]} - (if (macro_type? def_type) - {.#Some (:as Macro def_value)} - {.#None}) - - {.#Type [exported? type labels]} - {.#None} - - {.#Tag _} - {.#None} - - {.#Slot _} - {.#None})))))]})))) + (is (Meta (Maybe Macro)) + (function (_ lux) + {try.#Success [lux + (case (..current_module_name lux) + {try.#Failure error} + {.#None} + + {try.#Success [_ this_module]} + (let [modules (the .#modules lux)] + (loop [module module + name name] + (do maybe.monad + [$module (plist.value module modules) + definition (is (Maybe Global) + (|> $module + (is Module) + (the .#definitions) + (plist.value name)))] + (case definition + {.#Alias [r_module r_name]} + (again r_module r_name) + + {.#Definition [exported? def_type def_value]} + (if (macro_type? def_type) + {.#Some (as Macro def_value)} + {.#None}) + + {.#Type [exported? type labels]} + {.#None} + + {.#Tag _} + {.#None} + + {.#Slot _} + {.#None})))))]})))) (def: .public seed (Meta Nat) @@ -256,20 +256,20 @@ (def: .public (var_type name) (-> Text (Meta Type)) (function (_ lux) - (let [test (: (-> [Text [Type Any]] Bit) - (|>> product.left (text#= name)))] + (let [test (is (-> [Text [Type Any]] Bit) + (|>> product.left (text#= name)))] (case (do maybe.monad [scope (list.example (function (_ env) - (or (list.any? test (: (List [Text [Type Any]]) - (the [.#locals .#mappings] env))) - (list.any? test (: (List [Text [Type Any]]) - (the [.#captured .#mappings] env))))) + (or (list.any? test (is (List [Text [Type Any]]) + (the [.#locals .#mappings] env))) + (list.any? test (is (List [Text [Type Any]]) + (the [.#captured .#mappings] env))))) (the .#scopes lux)) [_ [type _]] (on_either (list.example test) - (: (List [Text [Type Any]]) - (the [.#locals .#mappings] scope)) - (: (List [Text [Type Any]]) - (the [.#captured .#mappings] scope)))] + (is (List [Text [Type Any]]) + (the [.#locals .#mappings] scope)) + (is (List [Text [Type Any]]) + (the [.#captured .#mappings] scope)))] (in type)) {.#Some var_type} ((clean_type var_type) lux) @@ -299,12 +299,12 @@ [name (..normal name) .let [[normal_module normal_short] name]] (function (_ lux) - (case (: (Maybe Global) - (do maybe.monad - [(open "[0]") (|> lux - (the .#modules) - (plist.value normal_module))] - (plist.value normal_short #definitions))) + (case (is (Maybe Global) + (do maybe.monad + [(open "[0]") (|> lux + (the .#modules) + (plist.value normal_module))] + (plist.value normal_short #definitions))) {.#Some definition} {try.#Success [lux definition]} @@ -440,7 +440,7 @@ (# code.equivalence = (type_code .Type) (type_code def_type))) - (in (:as Type def_value)) + (in (as Type def_value)) (..failure ($_ text#composite "Definition is not a type: " (symbol#encoded name))))) {.#Type [exported? type labels]} diff --git a/stdlib/source/library/lux/meta/configuration.lux b/stdlib/source/library/lux/meta/configuration.lux index 372189c39..54bb66630 100644 --- a/stdlib/source/library/lux/meta/configuration.lux +++ b/stdlib/source/library/lux/meta/configuration.lux @@ -61,10 +61,10 @@ (def: .public parser (Parser Configuration) - (let [parser' (: (Parser Text) - (<| (<>.after (.this ..start)) - (<>.before (.this ..end)) - (.slice (.some! (.none_of! ..end)))))] + (let [parser' (is (Parser Text) + (<| (<>.after (.this ..start)) + (<>.before (.this ..end)) + (.slice (.some! (.none_of! ..end)))))] (<>.some (<>.and parser' parser')))) (exception: .public invalid) diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux index 1080669a2..b1448bf9e 100644 --- a/stdlib/source/library/lux/meta/location.lux +++ b/stdlib/source/library/lux/meta/location.lux @@ -23,10 +23,10 @@ {.#End} (let [location (the .#location compiler)] {.#Right [compiler - (list (` (.: .Location - [.#module (~ [..dummy {.#Text (the .#module location)}]) - .#line (~ [..dummy {.#Nat (the .#line location)}]) - .#column (~ [..dummy {.#Nat (the .#column location)}])])))]}) + (list (` (.is .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_module)) wrong_syntax_error) (symbol ..here)))})) diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux index 253bf9b54..4b25a55b2 100644 --- a/stdlib/source/library/lux/program.lux +++ b/stdlib/source/library/lux/program.lux @@ -44,11 +44,11 @@ {#Parsed args} (` (.function ((~ g!program) (~ g!args)) - (case ((~! .result) (: (~! (.Parser (io.IO .Any))) - ((~! do) (~! <>.monad) - [(~+ args) - (~ g!_) (~! .end)] - ((~' in) (~ initialization+event_loop)))) + (case ((~! .result) (.is (~! (.Parser (io.IO .Any))) + ((~! do) (~! <>.monad) + [(~+ args) + (~ g!_) (~! .end)] + ((~' in) (~ initialization+event_loop)))) (~ g!args)) {.#Right (~ g!output)} (~ g!output) diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux index e4ccd2c3c..3f1e535ad 100644 --- a/stdlib/source/library/lux/static.lux +++ b/stdlib/source/library/lux/static.lux @@ -20,7 +20,7 @@ (template [ ] [(syntax: .public ( [expression .any]) (# meta.monad each - (|>> (:as ) list) + (|>> (as ) list) (meta.eval expression)))] [bit .Bit code.bit] @@ -43,7 +43,7 @@ (do meta.monad [pair (meta.eval (.type ) (` [(~ format) (~ expression)])) - .let [[format expression] (:as pair)]] + .let [[format expression] (as pair)]] (in (list (format expression)))))) (with_expansions [ (Ex (_ a) @@ -54,7 +54,7 @@ (do meta.monad [pair (meta.eval (.type ) (` [(~ format) (~ expression)])) - .let [[format expression] (:as pair)]] + .let [[format expression] (as pair)]] (in (list#each format expression))))) (syntax: .public (seed []) @@ -83,7 +83,7 @@ (do meta.monad [pair (meta.eval (type ) (` [(~ format) (~ random)])) - .let [[format random] (:as pair)] + .let [[format random] (as pair)] seed meta.seed .let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) random)]] @@ -97,7 +97,7 @@ (do meta.monad [pair (meta.eval (type ) (` [(~ format) (~ random)])) - .let [[format random] (:as pair)] + .let [[format random] (as pair)] seed meta.seed .let [[_ result] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) random)]] @@ -108,7 +108,7 @@ else .any]) (do meta.monad [test (meta.eval .Bit test)] - (in (list (.if (:as .Bit test) + (in (list (.if (as .Bit test) then else))))) @@ -125,6 +125,6 @@ then .any]) (do meta.monad [test (meta.eval .Bit test)] - (in (.if (:as .Bit test) + (in (.if (as .Bit test) (list then) (list))))) diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux index 6c98c57e0..15d35df29 100644 --- a/stdlib/source/library/lux/target/common_lisp.lux +++ b/stdlib/source/library/lux/target/common_lisp.lux @@ -14,7 +14,7 @@ [number ["f" frac]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (def: as_form (-> Text Text) @@ -25,11 +25,11 @@ (def: .public manual (-> Text Code) - (|>> :abstraction)) + (|>> abstraction)) (def: .public code (-> (Code Any) Text) - (|>> :representation)) + (|>> representation)) (template [ ] [(with_expansions [ (template.symbol [ "'"])] @@ -64,12 +64,12 @@ (def: .public nil Literal - (:abstraction "()")) + (abstraction "()")) (template [ ] [(def: .public (-> Text Literal) - (|>> (format ) :abstraction))] + (|>> (format ) abstraction))] ["'" symbol] [":" keyword]) @@ -82,7 +82,7 @@ (def: .public int (-> Int Literal) - (|>> %.int :abstraction)) + (|>> %.int abstraction)) (def: .public float (-> Frac Literal) @@ -97,11 +97,11 @@ ... else [%.frac]) - :abstraction)) + abstraction)) (def: .public (double value) (-> Frac Literal) - (:abstraction + (abstraction (.cond (f.= f.positive_infinity value) "(/ 1.0d0 0.0d0)" @@ -138,18 +138,18 @@ (-> Text Literal) (|>> ..safe (text.enclosed' text.double_quote) - :abstraction)) + abstraction)) (def: .public var (-> Text Var/1) - (|>> :abstraction)) + (|>> abstraction)) (def: .public args (-> (List Var/1) Var/*) (|>> (list#each ..code) (text.interposed " ") ..as_form - :abstraction)) + abstraction)) (def: .public (args& singles rest) (-> (List Var/1) Var/1 Var/*) @@ -162,16 +162,16 @@ (list#each ..code) (text.interposed " ") (text.suffix " "))) - (format "&rest " (:representation rest)) + (format "&rest " (representation rest)) ..as_form - :abstraction)) + abstraction)) (def: form (-> (List (Expression Any)) Expression) (|>> (list#each ..code) (text.interposed " ") ..as_form - :abstraction)) + abstraction)) (def: .public (call/* func) (-> (Expression Any) (-> (List (Expression Any)) (Computation Any))) @@ -190,14 +190,14 @@ (-> (List [Var/1 Lambda]) (Expression Any) (Computation Any)) (..form (list (..var "labels") (..form (list#each (function (_ [def_name [def_args def_body]]) - (..form (list def_name (:transmutation def_args) def_body))) + (..form (list def_name (transmutation def_args) def_body))) definitions)) body))) (def: .public (destructuring_bind [bindings expression] body) (-> [Var/* (Expression Any)] (List (Expression Any)) (Computation Any)) (..form (list& (..var "destructuring-bind") - (:transmutation bindings) expression + (transmutation bindings) expression body))) (template [ + + +] @@ -266,7 +266,7 @@ [(`` (template [ ] [(def: .public ( args) (-> [(~~ (template.spliced +))] (Access Any)) - (:transmutation ( args (..var ))))] + (transmutation ( args (..var ))))] (~~ (template.spliced +))))] @@ -342,7 +342,7 @@ (def: .public (lambda input body) (-> Var/* (Expression Any) Literal) - (..form (list (..var "lambda") (:transmutation input) body))) + (..form (list (..var "lambda") (transmutation input) body))) (template [ ] [(def: .public ( bindings body) @@ -364,7 +364,7 @@ (def: .public (defun name inputs body) (-> Var/1 Var/* (Expression Any) (Expression Any)) - (..form (list (..var "defun") name (:transmutation inputs) body))) + (..form (list (..var "defun") name (transmutation inputs) body))) (template [ ] [(def: .public @@ -396,7 +396,7 @@ body (list#each (function (_ [type condition handler]) (..form (list type - (:transmutation (..args (list condition))) + (transmutation (..args (list condition))) handler))) handlers)))) @@ -408,30 +408,30 @@ expression {.#Item single {.#End}} - (:abstraction - (format single " " (:representation expression))) + (abstraction + (format single " " (representation expression))) _ - (:abstraction + (abstraction (format (|> conditions (list#each ..symbol) (list& (..symbol "or")) ..form - :representation) - " " (:representation expression)))))] + representation) + " " (representation expression)))))] [conditional+ "#+"] [conditional- "#-"]) (def: .public label (-> Text Label) - (|>> :abstraction)) + (|>> abstraction)) (def: .public (block name body) (-> Label (List (Expression Any)) (Computation Any)) - (..form (list& (..var "block") (:transmutation name) body))) + (..form (list& (..var "block") (transmutation name) body))) (def: .public (return_from target value) (-> Label (Expression Any) (Computation Any)) - (..form (list (..var "return-from") (:transmutation target) value))) + (..form (list (..var "return-from") (transmutation target) value))) (def: .public (return value) (-> (Expression Any) (Computation Any)) @@ -447,7 +447,7 @@ (def: .public tag (-> Text Tag) - (|>> :abstraction)) + (|>> abstraction)) (def: .public go (-> Tag (Expression Any)) @@ -462,7 +462,7 @@ (def: .public (multiple_value_setq bindings values) (-> Var/* (Expression Any) (Expression Any)) (..form (list (..var "multiple-value-setq") - (:transmutation bindings) + (transmutation bindings) values))) ) diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux index e227d6806..6243e3f11 100644 --- a/stdlib/source/library/lux/target/js.lux +++ b/stdlib/source/library/lux/target/js.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" Location Code Label or and function if undefined for comment not int try ++ -- the} + [lux {"-" Location Code Label or and function if undefined for comment not int try ++ -- the type_of} [control ["[0]" pipe]] [data @@ -15,7 +15,7 @@ ["i" int] ["f" frac]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (def: expression (text.enclosed ["(" ")"])) @@ -38,7 +38,7 @@ (def: .public code (-> (Code Any) Text) - (|>> :representation)) + (|>> representation)) (template [ +] [(with_expansions [ (template.symbol [ "'"])] @@ -64,7 +64,7 @@ ) (template [ ] - [(def: .public Literal (:abstraction ))] + [(def: .public Literal (abstraction ))] [null "null"] [undefined "undefined"] @@ -75,11 +75,11 @@ (|>> (pipe.case #0 "false" #1 "true") - :abstraction)) + abstraction)) (def: .public (number value) (-> Frac Literal) - (:abstraction + (abstraction (cond (f.not_a_number? value) "NaN" @@ -114,7 +114,7 @@ (-> Text Literal) (|>> ..safe (text.enclosed [text.double_quote text.double_quote]) - :abstraction)) + abstraction)) (def: argument_separator ", ") (def: field_separator ": ") @@ -125,19 +125,19 @@ (|>> (list#each ..code) (text.interposed ..argument_separator) ..element - :abstraction)) + abstraction)) (def: .public var (-> Text Var) - (|>> :abstraction)) + (|>> abstraction)) (def: .public (at index array_or_object) (-> Expression Expression Access) - (:abstraction (format (:representation array_or_object) (..element (:representation index))))) + (abstraction (format (representation array_or_object) (..element (representation index))))) (def: .public (the field object) (-> Text Expression Access) - (:abstraction (format (:representation object) "." field))) + (abstraction (format (representation object) "." field))) (def: .public (apply/* function inputs) (-> Expression (List Expression) Computation) @@ -145,8 +145,8 @@ (list#each ..code) (text.interposed ..argument_separator) ..expression - (format (:representation function)) - :abstraction)) + (format (representation function)) + abstraction)) (def: .public (do method inputs object) (-> Text (List Expression) Expression Computation) @@ -155,28 +155,28 @@ (def: .public object (-> (List [Text Expression]) Computation) (|>> (list#each (.function (_ [key val]) - (format (:representation (..string key)) ..field_separator (:representation val)))) + (format (representation (..string key)) ..field_separator (representation val)))) (text.interposed ..argument_separator) (text.enclosed ["{" "}"]) ..expression - :abstraction)) + abstraction)) (def: .public (, pre post) (-> Expression Expression Computation) - (|> (format (:representation pre) ..argument_separator (:representation post)) + (|> (format (representation pre) ..argument_separator (representation post)) ..expression - :abstraction)) + abstraction)) (def: .public (then pre post) (-> Statement Statement Statement) - (:abstraction (format (:representation pre) - \n+ - (:representation post)))) + (abstraction (format (representation pre) + \n+ + (representation post)))) (def: block (-> Statement Text) (let [close (format \n+ "}")] - (|>> :representation + (|>> representation ..nested (text.enclosed ["{" close])))) @@ -185,20 +185,20 @@ (-> Var (List Var) Statement Statement) (|> body ..block - (format "function " (:representation name) + (format "function " (representation name) (|> inputs (list#each ..code) (text.interposed ..argument_separator) ..expression) " ") - :abstraction)) + abstraction)) (def: .public (function name inputs body) (-> Var (List Var) Statement Computation) (|> (..function! name inputs body) - :representation + representation ..expression - :abstraction)) + abstraction)) (def: .public (closure inputs body) (-> (List Var) Statement Computation) @@ -211,14 +211,14 @@ ..expression) " ") ..expression - :abstraction)) + abstraction)) (template [ ] [(def: .public ( param subject) (-> Expression Expression Computation) - (|> (format (:representation subject) " " " " (:representation param)) + (|> (format (representation subject) " " " " (representation param)) ..expression - :abstraction))] + abstraction))] [= "==="] [< "<"] @@ -246,7 +246,7 @@ (template [ ] [(def: .public (-> Expression Computation) - (|>> :representation (text.prefix ) ..expression :abstraction))] + (|>> representation (text.prefix ) ..expression abstraction))] ["!" not] ["~" bit_not] @@ -257,131 +257,131 @@ [... A 32-bit integer expression. (def: .public ( value) (-> Computation) - (:abstraction (..expression (format ( value) "|0"))))] + (abstraction (..expression (format ( value) "|0"))))] - [to_i32 Expression :representation] + [to_i32 Expression representation] [i32 Int %.int] ) (def: .public (int value) (-> Int Literal) - (:abstraction (.if (i.< +0 value) - (%.int value) - (%.nat (.nat value))))) + (abstraction (.if (i.< +0 value) + (%.int value) + (%.nat (.nat value))))) (def: .public (? test then else) (-> Expression Expression Expression Computation) - (|> (format (:representation test) - " ? " (:representation then) - " : " (:representation else)) + (|> (format (representation test) + " ? " (representation then) + " : " (representation else)) ..expression - :abstraction)) + abstraction)) (def: .public type_of (-> Expression Computation) - (|>> :representation + (|>> representation (format "typeof ") ..expression - :abstraction)) + abstraction)) (def: .public (new constructor inputs) (-> Expression (List Expression) Computation) - (|> (format "new " (:representation constructor) + (|> (format "new " (representation constructor) (|> inputs (list#each ..code) (text.interposed ..argument_separator) ..expression)) ..expression - :abstraction)) + abstraction)) (def: .public statement (-> Expression Statement) - (|>> :representation (text.suffix ..statement_suffix) :abstraction)) + (|>> representation (text.suffix ..statement_suffix) abstraction)) (def: .public use_strict Statement - (:abstraction (format text.double_quote "use strict" text.double_quote ..statement_suffix))) + (abstraction (format text.double_quote "use strict" text.double_quote ..statement_suffix))) (def: .public (declare name) (-> Var Statement) - (:abstraction (format "var " (:representation name) ..statement_suffix))) + (abstraction (format "var " (representation name) ..statement_suffix))) (def: .public (define name value) (-> Var Expression Statement) - (:abstraction (format "var " (:representation name) " = " (:representation value) ..statement_suffix))) + (abstraction (format "var " (representation name) " = " (representation value) ..statement_suffix))) (def: .public (set name value) (-> Location Expression Statement) - (:abstraction (format (:representation name) " = " (:representation value) ..statement_suffix))) + (abstraction (format (representation name) " = " (representation value) ..statement_suffix))) (def: .public (throw message) (-> Expression Statement) - (:abstraction (format "throw " (:representation message) ..statement_suffix))) + (abstraction (format "throw " (representation message) ..statement_suffix))) (def: .public (return value) (-> Expression Statement) - (:abstraction (format "return " (:representation value) ..statement_suffix))) + (abstraction (format "return " (representation value) ..statement_suffix))) (def: .public delete (-> Location Expression) - (|>> :representation + (|>> representation (format "delete ") ..expression - :abstraction)) + abstraction)) (def: .public (if test then! else!) (-> Expression Statement Statement Statement) - (:abstraction (format "if(" (:representation test) ") " - (..block then!) - " else " - (..block else!)))) + (abstraction (format "if(" (representation test) ") " + (..block then!) + " else " + (..block else!)))) (def: .public (when test then!) (-> Expression Statement Statement) - (:abstraction (format "if(" (:representation test) ") " - (..block then!)))) + (abstraction (format "if(" (representation test) ") " + (..block then!)))) (def: .public (while test body) (-> Expression Statement Loop) - (:abstraction (format "while(" (:representation test) ") " - (..block body)))) + (abstraction (format "while(" (representation test) ") " + (..block body)))) (def: .public (do_while test body) (-> Expression Statement Loop) - (:abstraction (format "do " (..block body) - " while(" (:representation test) ")" ..statement_suffix))) + (abstraction (format "do " (..block body) + " while(" (representation test) ")" ..statement_suffix))) (def: .public (try body [exception catch]) (-> Statement [Var Statement] Statement) - (:abstraction (format "try " - (..block body) - " catch(" (:representation exception) ") " - (..block catch)))) + (abstraction (format "try " + (..block body) + " catch(" (representation exception) ") " + (..block catch)))) (def: .public (for var init condition update iteration) (-> Var Expression Expression Expression Statement Loop) - (:abstraction (format "for(" (:representation (..define var init)) - " " (:representation condition) - ..statement_suffix " " (:representation update) - ")" - (..block iteration)))) + (abstraction (format "for(" (representation (..define var init)) + " " (representation condition) + ..statement_suffix " " (representation update) + ")" + (..block iteration)))) (def: .public label (-> Text Label) - (|>> :abstraction)) + (|>> abstraction)) (def: .public (with_label label loop) (-> Label Loop Statement) - (:abstraction (format (:representation label) ": " (:representation loop)))) + (abstraction (format (representation label) ": " (representation loop)))) (template [ <0> <1>] [(def: .public <0> Statement - (:abstraction (format ..statement_suffix))) + (abstraction (format ..statement_suffix))) (def: .public (<1> label) (-> Label Statement) - (:abstraction (format " " (:representation label) ..statement_suffix)))] + (abstraction (format " " (representation label) ..statement_suffix)))] ["break" break break_at] ["continue" continue continue_at] @@ -390,9 +390,9 @@ (template [ ] [(def: .public (-> Location Expression) - (|>> :representation + (|>> representation (text.suffix ) - :abstraction))] + abstraction))] [++ "++"] [-- "--"] @@ -400,28 +400,28 @@ (def: .public (comment commentary on) (All (_ kind) (-> Text (Code kind) (Code kind))) - (:abstraction (format "/* " commentary " */" " " (:representation on)))) + (abstraction (format "/* " commentary " */" " " (representation on)))) (def: .public (switch input cases default) (-> Expression (List [(List Literal) Statement]) (Maybe Statement) Statement) - (:abstraction (format "switch (" (:representation input) ") " - (|> (format (|> cases - (list#each (.function (_ [when then]) - (format (|> when - (list#each (|>> :representation (text.enclosed ["case " ":"]))) - (text.interposed \n+)) - (..nested (:representation then))))) - (text.interposed \n+)) - \n+ - (case default - {.#Some default} - (format "default:" - (..nested (:representation default))) - - {.#None} - "")) - :abstraction - ..block)))) + (abstraction (format "switch (" (representation input) ") " + (|> (format (|> cases + (list#each (.function (_ [when then]) + (format (|> when + (list#each (|>> representation (text.enclosed ["case " ":"]))) + (text.interposed \n+)) + (..nested (representation then))))) + (text.interposed \n+)) + \n+ + (case default + {.#Some default} + (format "default:" + (..nested (representation default))) + + {.#None} + "")) + abstraction + ..block)))) ) (template [ + + +] diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 895d84f7a..a58bce01c 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -88,7 +88,7 @@ failure - (:expected failure))]) + (as_expected failure))]) (template: (try|in ) [{try.#Success }]) @@ -213,7 +213,7 @@ ... {try.#Failure error} failure - (:expected failure))))) + (as_expected failure))))) (implementation: .public monad (Monad Bytecode) @@ -234,11 +234,11 @@ ... {try.#Failure error} failure - (:expected failure)) + (as_expected failure)) ... {try.#Failure error} failure - (:expected failure))))) + (as_expected failure))))) (def: .public (when_continuous it) (-> (Bytecode Any) (Bytecode Any)) @@ -611,17 +611,17 @@ (-> java/lang/Float Int) (|>> java/lang/Float::floatToRawIntBits ffi.int_to_long - (:as Int))) + (as Int))) (def: negative_zero_float_bits - (|> -0.0 (:as java/lang/Double) ffi.double_to_float ..float_bits)) + (|> -0.0 (as java/lang/Double) ffi.double_to_float ..float_bits)) (def: .public (float value) (-> java/lang/Float (Bytecode Any)) (if (i.= ..negative_zero_float_bits (..float_bits value)) (..arbitrary_float value) - (case (|> value ffi.float_to_double (:as Frac)) + (case (|> value ffi.float_to_double (as Frac)) (^.template [ ] [ (..bytecode $0 $1 @_ [])]) ([+0.0 _.fconst_0] @@ -651,23 +651,23 @@ (def: (arbitrary_double value) (-> java/lang/Double (Bytecode Any)) (do ..monad - [index (..lifted (//constant/pool.double (//constant.double (:as Frac value))))] + [index (..lifted (//constant/pool.double (//constant.double (as Frac value))))] (..bytecode $0 $2 @_ _.ldc2_w/double [index]))) (def: double_bits (-> java/lang/Double Int) (|>> java/lang/Double::doubleToRawLongBits - (:as Int))) + (as Int))) (def: negative_zero_double_bits - (..double_bits (:as java/lang/Double -0.0))) + (..double_bits (as java/lang/Double -0.0))) (def: .public (double value) (-> java/lang/Double (Bytecode Any)) (if (i.= ..negative_zero_double_bits (..double_bits value)) (..arbitrary_double value) - (case (:as Frac value) + (case (as Frac value) (^.template [ ] [ (..bytecode $0 $2 @_ [])]) ([+0.0 _.dconst_0] @@ -950,9 +950,9 @@ (|> (list#mix (..acknowledge_label actual) tracker (list& default at_minimum afterwards)) (has #program_counter program_counter'))] [(function (_ resolver) - (let [get (: (-> Label (Maybe [Stack (Maybe Address)])) - (function (_ label) - (dictionary.value label resolver)))] + (let [get (is (-> Label (Maybe [Stack (Maybe Address)])) + (function (_ label) + (dictionary.value label resolver)))] (case (do [! maybe.monad] [@default (|> default get (monad.then ! product.right)) @at_minimum (|> at_minimum get (monad.then ! product.right))] @@ -992,9 +992,9 @@ (|> (list#mix (..acknowledge_label actual) tracker (list& default (list#each product.right cases))) (has #program_counter program_counter'))] [(function (_ resolver) - (let [get (: (-> Label (Maybe [Stack (Maybe Address)])) - (function (_ label) - (dictionary.value label resolver)))] + (let [get (is (-> Label (Maybe [Stack (Maybe Address)])) + (function (_ label) + (dictionary.value label resolver)))] (case (do [! maybe.monad] [@default (|> default get (monad.then ! product.right))] (|> cases @@ -1045,10 +1045,10 @@ (def: .public (multianewarray class dimensions) (-> (Type Object) U1 (Bytecode Any)) (do ..monad - [_ (: (Bytecode Any) - (case (|> dimensions //unsigned.value) - 0 (..except ..multiarray_cannot_be_zero_dimensional [class]) - _ (in []))) + [_ (is (Bytecode Any) + (case (|> dimensions //unsigned.value) + 0 (..except ..multiarray_cannot_be_zero_dimensional [class]) + _ (in []))) index (..lifted (//constant/pool.class (//name.internal (..reflection class))))] (..bytecode (//unsigned.lifted/2 dimensions) $1 @_ _.multianewarray [index dimensions]))) @@ -1170,4 +1170,4 @@ ... {try.#Failure error} failure - (:expected failure)))) + (as_expected failure)))) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/target/jvm/bytecode/address.lux index f91c4025f..f0df22eb4 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/address.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/address.lux @@ -1,48 +1,48 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}] - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}]] - [data - [format - [binary {"+" Writer}]] - [text - ["%" format {"+" Format}]]] - [math - [number - ["n" nat]]] - [type - abstract]]] - ["[0]" // "_" - [jump {"+" Big_Jump}] - ["/[1]" // "_" - [encoding - ["[1][0]" unsigned {"+" U2}] - ["[1][0]" signed {"+" S4}]]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}] + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}]] + [data + [format + [binary {"+" Writer}]] + [text + ["%" format {"+" Format}]]] + [math + [number + ["n" nat]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" // "_" + [jump {"+" Big_Jump}] + ["/[1]" // "_" + [encoding + ["[1][0]" unsigned {"+" U2}] + ["[1][0]" signed {"+" S4}]]]]) (abstract: .public Address U2 (def: .public value (-> Address U2) - (|>> :representation)) + (|>> representation)) (def: .public start Address - (|> 0 ///unsigned.u2 try.trusted :abstraction)) + (|> 0 ///unsigned.u2 try.trusted abstraction)) (def: .public (move distance) (-> U2 (-> Address (Try Address))) - (|>> :representation + (|>> representation (///unsigned.+/2 distance) - (# try.functor each (|>> :abstraction)))) + (# try.functor each (|>> abstraction)))) (def: with_sign (-> Address (Try S4)) - (|>> :representation ///unsigned.value .int ///signed.s4)) + (|>> representation ///unsigned.value .int ///signed.s4)) (def: .public (jump from to) (-> Address Address (Try Big_Jump)) @@ -53,22 +53,22 @@ (def: .public (after? reference subject) (-> Address Address Bit) - (n.> (|> reference :representation ///unsigned.value) - (|> subject :representation ///unsigned.value))) + (n.> (|> reference representation ///unsigned.value) + (|> subject representation ///unsigned.value))) (implementation: .public equivalence (Equivalence Address) (def: (= reference subject) (# ///unsigned.equivalence = - (:representation reference) - (:representation subject)))) + (representation reference) + (representation subject)))) (def: .public writer (Writer Address) - (|>> :representation ///unsigned.writer/2)) + (|>> representation ///unsigned.writer/2)) (def: .public format (Format Address) - (|>> :representation ///unsigned.value %.nat)) + (|>> representation ///unsigned.value %.nat)) ) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux index 4f42ccffc..b7952504e 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux @@ -14,7 +14,7 @@ [number ["n" nat]]] [type - abstract]]] + [abstract {"-" pattern}]]]] ["[0]" ///// "_" [encoding ["[1][0]" unsigned {"+" U1 U2}]] @@ -33,7 +33,7 @@ (def: .public registry (-> U2 Registry) - (|>> :abstraction)) + (|>> abstraction)) (def: (minimal type) (-> (Type Method) Nat) @@ -61,18 +61,18 @@ (def: .public equivalence (Equivalence Registry) (# equivalence.functor each - (|>> :representation) + (|>> representation) /////unsigned.equivalence)) (def: .public writer (Writer Registry) - (|>> :representation /////unsigned.writer/2)) + (|>> representation /////unsigned.writer/2)) (def: .public (has needed) (-> Registry Registry Registry) - (|>> :representation - (/////unsigned.max/2 (:representation needed)) - :abstraction)) + (|>> representation + (/////unsigned.max/2 (representation needed)) + abstraction)) (template [ ] [(def: .public @@ -81,7 +81,7 @@ (|>> /////unsigned.lifted/2 (/////unsigned.+/2 extra) try.trusted - :abstraction)))] + abstraction)))] [for ..normal] [for_wide ..wide] diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux index e67bb157b..4b7b29804 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux @@ -1,21 +1,21 @@ (.using - [library - [lux "*" - [abstract - ["[0]" equivalence {"+" Equivalence}]] - [control - ["[0]" maybe] - ["[0]" try {"+" Try}]] - [data - [text - ["%" format {"+" Format}]] - [format - [binary {"+" Writer}]]] - [type - abstract]]] - ["[0]" ///// "_" - [encoding - ["[1][0]" unsigned {"+" U2}]]]) + [library + [lux "*" + [abstract + ["[0]" equivalence {"+" Equivalence}]] + [control + ["[0]" maybe] + ["[0]" try {"+" Try}]] + [data + [text + ["%" format {"+" Format}]] + [format + [binary {"+" Writer}]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" ///// "_" + [encoding + ["[1][0]" unsigned {"+" U2}]]]) (abstract: .public Stack U2 @@ -23,7 +23,7 @@ (template [ ] [(def: .public Stack - (|> /////unsigned.u2 maybe.trusted :abstraction))] + (|> /////unsigned.u2 maybe.trusted abstraction))] [0 empty] [1 catch] @@ -32,21 +32,21 @@ (def: .public equivalence (Equivalence Stack) (# equivalence.functor each - (|>> :representation) + (|>> representation) /////unsigned.equivalence)) (def: .public writer (Writer Stack) - (|>> :representation /////unsigned.writer/2)) + (|>> representation /////unsigned.writer/2)) (def: stack (-> U2 Stack) - (|>> :abstraction)) + (|>> abstraction)) (template [ ] [(def: .public ( amount) (-> U2 (-> Stack (Try Stack))) - (|>> :representation + (|>> representation ( amount) (# try.functor each ..stack)))] @@ -56,13 +56,13 @@ (def: .public (max left right) (-> Stack Stack Stack) - (:abstraction - (/////unsigned.max/2 (:representation left) - (:representation right)))) + (abstraction + (/////unsigned.max/2 (representation left) + (representation right)))) (def: .public format (Format Stack) - (|>> :representation /////unsigned.value %.nat)) + (|>> representation /////unsigned.value %.nat)) ) (def: .public length diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux index 4f371461a..237901cf1 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux @@ -23,7 +23,7 @@ [number {"+" hex} ["n" nat]]] [type - abstract]]] + [abstract {"-" pattern}]]]] ["[0]" // "_" ["[1][0]" address {"+" Address}] ["[1][0]" jump {"+" Jump Big_Jump}] @@ -227,11 +227,11 @@ (def: code (-> Primitive_Array_Type U1) - (|>> :representation)) + (|>> representation)) (template [ ] [(def: .public - (|> ///unsigned.u1 try.trusted :abstraction))] + (|> ///unsigned.u1 try.trusted abstraction))] [04 t_boolean] [05 t_char] @@ -576,18 +576,18 @@ (def: .public tableswitch [(-> Nat Estimator) (-> S4 Big_Jump [Big_Jump (List Big_Jump)] Instruction)] - (let [estimator (: (-> Nat Estimator) - (function (_ amount_of_afterwards offset) - (|> ($_ n.+ - (///unsigned.value ..opcode_size) - (switch_padding (///unsigned.value (//address.value offset))) - (///unsigned.value ..big_jump_size) - (///unsigned.value ..integer_size) - (///unsigned.value ..integer_size) - (n.* (///unsigned.value ..big_jump_size) - (++ amount_of_afterwards))) - ///unsigned.u2 - try.trusted)))] + (let [estimator (is (-> Nat Estimator) + (function (_ amount_of_afterwards offset) + (|> ($_ n.+ + (///unsigned.value ..opcode_size) + (switch_padding (///unsigned.value (//address.value offset))) + (///unsigned.value ..big_jump_size) + (///unsigned.value ..integer_size) + (///unsigned.value ..integer_size) + (n.* (///unsigned.value ..big_jump_size) + (++ amount_of_afterwards))) + ///unsigned.u2 + try.trusted)))] [estimator (function (_ minimum default [at_minimum afterwards]) (let [amount_of_afterwards (list.size afterwards) @@ -599,40 +599,40 @@ [size (///unsigned.u2 size)] (# ! each (|>> estimator ///unsigned.value) (//address.move size //address.start)))) - tableswitch_mutation (: Mutation - (function (_ [offset binary]) - [(n.+ tableswitch_size offset) - (try.trusted - (do [! try.monad] - [amount_of_afterwards (|> amount_of_afterwards .int ///signed.s4) - maximum (///signed.+/4 minimum amount_of_afterwards)] - (in (let [_ (binary.with/1! offset (hex "AA") binary) - offset (n.+ (///unsigned.value ..opcode_size) offset) - _ (case padding - 3 (|> binary - (binary.with/1! offset 0) - (binary.with/2! (++ offset) 0)) - 2 (binary.with/2! offset 0 binary) - 1 (binary.with/1! offset 0 binary) - _ binary) - offset (n.+ padding offset) - _ (binary.with/4! offset (///signed.value default) binary) - offset (n.+ (///unsigned.value ..big_jump_size) offset) - _ (binary.with/4! offset (///signed.value minimum) binary) - offset (n.+ (///unsigned.value ..integer_size) offset) - _ (binary.with/4! offset (///signed.value maximum) binary)] - (loop [offset (n.+ (///unsigned.value ..integer_size) offset) - afterwards (: (List Big_Jump) - {.#Item at_minimum afterwards})] - (case afterwards - {.#End} - binary - - {.#Item head tail} - (exec - (binary.with/4! offset (///signed.value head) binary) - (again (n.+ (///unsigned.value ..big_jump_size) offset) - tail))))))))]))] + tableswitch_mutation (is Mutation + (function (_ [offset binary]) + [(n.+ tableswitch_size offset) + (try.trusted + (do [! try.monad] + [amount_of_afterwards (|> amount_of_afterwards .int ///signed.s4) + maximum (///signed.+/4 minimum amount_of_afterwards)] + (in (let [_ (binary.with/1! offset (hex "AA") binary) + offset (n.+ (///unsigned.value ..opcode_size) offset) + _ (case padding + 3 (|> binary + (binary.with/1! offset 0) + (binary.with/2! (++ offset) 0)) + 2 (binary.with/2! offset 0 binary) + 1 (binary.with/1! offset 0 binary) + _ binary) + offset (n.+ padding offset) + _ (binary.with/4! offset (///signed.value default) binary) + offset (n.+ (///unsigned.value ..big_jump_size) offset) + _ (binary.with/4! offset (///signed.value minimum) binary) + offset (n.+ (///unsigned.value ..integer_size) offset) + _ (binary.with/4! offset (///signed.value maximum) binary)] + (loop [offset (n.+ (///unsigned.value ..integer_size) offset) + afterwards (is (List Big_Jump) + {.#Item at_minimum afterwards})] + (case afterwards + {.#End} + binary + + {.#Item head tail} + (exec + (binary.with/4! offset (///signed.value head) binary) + (again (n.+ (///unsigned.value ..big_jump_size) offset) + tail))))))))]))] [(n.+ tableswitch_size size) (|>> mutation tableswitch_mutation)]))))])) @@ -642,16 +642,16 @@ (-> Big_Jump (List [S4 Big_Jump]) Instruction)] (let [case_size (n.+ (///unsigned.value ..integer_size) (///unsigned.value ..big_jump_size)) - estimator (: (-> Nat Estimator) - (function (_ amount_of_cases offset) - (|> ($_ n.+ - (///unsigned.value ..opcode_size) - (switch_padding (///unsigned.value (//address.value offset))) - (///unsigned.value ..big_jump_size) - (///unsigned.value ..integer_size) - (n.* amount_of_cases case_size)) - ///unsigned.u2 - try.trusted)))] + estimator (is (-> Nat Estimator) + (function (_ amount_of_cases offset) + (|> ($_ n.+ + (///unsigned.value ..opcode_size) + (switch_padding (///unsigned.value (//address.value offset))) + (///unsigned.value ..big_jump_size) + (///unsigned.value ..integer_size) + (n.* amount_of_cases case_size)) + ///unsigned.u2 + try.trusted)))] [estimator (function (_ default cases) (let [amount_of_cases (list.size cases) @@ -663,34 +663,34 @@ [size (///unsigned.u2 size)] (# ! each (|>> estimator ///unsigned.value) (//address.move size //address.start)))) - lookupswitch_mutation (: Mutation - (function (_ [offset binary]) - [(n.+ lookupswitch_size offset) - (let [_ (binary.with/1! offset (hex "AB") binary) - offset (n.+ (///unsigned.value ..opcode_size) offset) - _ (case padding - 3 (|> binary - (binary.with/1! offset 0) - (binary.with/2! (++ offset) 0)) - 2 (binary.with/2! offset 0 binary) - 1 (binary.with/1! offset 0 binary) - _ binary) - offset (n.+ padding offset) - _ (binary.with/4! offset (///signed.value default) binary) - offset (n.+ (///unsigned.value ..big_jump_size) offset) - _ (binary.with/4! offset amount_of_cases binary)] - (loop [offset (n.+ (///unsigned.value ..integer_size) offset) - cases cases] - (case cases - {.#End} - binary - - {.#Item [value jump] tail} - (exec - (binary.with/4! offset (///signed.value value) binary) - (binary.with/4! (n.+ (///unsigned.value ..integer_size) offset) (///signed.value jump) binary) - (again (n.+ case_size offset) - tail)))))]))] + lookupswitch_mutation (is Mutation + (function (_ [offset binary]) + [(n.+ lookupswitch_size offset) + (let [_ (binary.with/1! offset (hex "AB") binary) + offset (n.+ (///unsigned.value ..opcode_size) offset) + _ (case padding + 3 (|> binary + (binary.with/1! offset 0) + (binary.with/2! (++ offset) 0)) + 2 (binary.with/2! offset 0 binary) + 1 (binary.with/1! offset 0 binary) + _ binary) + offset (n.+ padding offset) + _ (binary.with/4! offset (///signed.value default) binary) + offset (n.+ (///unsigned.value ..big_jump_size) offset) + _ (binary.with/4! offset amount_of_cases binary)] + (loop [offset (n.+ (///unsigned.value ..integer_size) offset) + cases cases] + (case cases + {.#End} + binary + + {.#Item [value jump] tail} + (exec + (binary.with/4! offset (///signed.value value) binary) + (binary.with/4! (n.+ (///unsigned.value ..integer_size) offset) (///signed.value jump) binary) + (again (n.+ case_size offset) + tail)))))]))] [(n.+ lookupswitch_size size) (|>> mutation lookupswitch_mutation)]))))])) diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux index 73966259f..4d2cf203c 100644 --- a/stdlib/source/library/lux/target/jvm/class.lux +++ b/stdlib/source/library/lux/target/jvm/class.lux @@ -77,13 +77,13 @@ (do [! //pool.monad] [@this (//pool.class this) @super (//pool.class super) - @interfaces (: (Resource (Sequence (Index //constant.Class))) - (monad.mix ! (function (_ interface @interfaces) - (do ! - [@interface (//pool.class interface)] - (in (sequence.suffix @interface @interfaces)))) - sequence.empty - interfaces))] + @interfaces (is (Resource (Sequence (Index //constant.Class))) + (monad.mix ! (function (_ interface @interfaces) + (do ! + [@interface (//pool.class interface)] + (in (sequence.suffix @interface @interfaces)))) + sequence.empty + interfaces))] (in [@this @super @interfaces]))) (def: .public (class version modifier diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index 71aab1ed3..1afa70f79 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -22,7 +22,7 @@ ["[0]" int] ["[0]" frac]]] [type - abstract]]] + [abstract {"-" pattern}]]]] ["[0]" / "_" ["[1][0]" tag] ["/[1]" // "_" @@ -45,11 +45,11 @@ (def: .public index (-> Class (Index UTF8)) - (|>> :representation)) + (|>> representation)) (def: .public class (-> (Index UTF8) Class) - (|>> :abstraction)) + (|>> abstraction)) (def: .public class_equivalence (Equivalence Class) @@ -59,7 +59,7 @@ (def: class_writer (Writer Class) - (|>> :representation //index.writer)) + (|>> representation //index.writer)) ) (import: java/lang/Float @@ -87,14 +87,14 @@ (def: .public value (All (_ kind) (-> (Value kind) kind)) - (|>> :representation)) + (|>> representation)) (def: .public (value_equivalence Equivalence) (All (_ kind) (-> (Equivalence kind) (Equivalence (Value kind)))) (# equivalence.functor each - (|>> :representation) + (|>> representation) Equivalence)) (template [ ] @@ -103,7 +103,7 @@ (def: .public (-> ) - (|>> :abstraction))] + (|>> abstraction))] [integer Integer I32] [float Float java/lang/Float] @@ -115,7 +115,7 @@ (template [ ] [(def: (Writer ) - (`` (|>> :representation + (`` (|>> representation (~~ (template.spliced )) (~~ (template.spliced )))))] diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux index 666531963..e2fcfd655 100644 --- a/stdlib/source/library/lux/target/jvm/constant/pool.lux +++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux @@ -55,7 +55,7 @@ ... {try.#Failure error} failure - (:expected failure))))) + (as_expected failure))))) (implementation: .public monad (Monad Resource) @@ -74,7 +74,7 @@ ... {try.#Failure error} failure - (:expected failure))))) + (as_expected failure))))) (template: (try|each ) [(case @@ -83,7 +83,7 @@ ... {try.#Failure error} failure - (:expected failure))]) + (as_expected failure))]) (template: (try|in ) [{try.#Success }]) @@ -108,11 +108,11 @@ {try.#Failure _} (<| (let [new { '}]) (try|each @new (//unsigned.u2 (//.size new))) - (try|each next (: (Try Index) - (|> current - //index.value - (//unsigned.+/2 @new) - (# try.monad each //index.index)))) + (try|each next (is (Try Index) + (|> current + //index.value + (//unsigned.+/2 @new) + (# try.monad each //index.index)))) (try|in [[next (sequence.suffix [current new] pool)] current]))))))]) @@ -128,7 +128,7 @@ ... {try.#Failure error} failure - (:expected failure))]) + (as_expected failure))]) (type: (Adder of) (-> of (Resource (Index of)))) diff --git a/stdlib/source/library/lux/target/jvm/constant/tag.lux b/stdlib/source/library/lux/target/jvm/constant/tag.lux index 8d8d162aa..36acb163f 100644 --- a/stdlib/source/library/lux/target/jvm/constant/tag.lux +++ b/stdlib/source/library/lux/target/jvm/constant/tag.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}]] - [control - ["[0]" try]] - [data - [format - [binary {"+" Writer}]]] - [type - abstract]]] - ["[0]" /// "_" - [encoding - ["[1][0]" unsigned {"+" U1} ("u1//[0]" equivalence)]]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}]] + [control + ["[0]" try]] + [data + [format + [binary {"+" Writer}]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" /// "_" + [encoding + ["[1][0]" unsigned {"+" U1} ("u1//[0]" equivalence)]]]) (abstract: .public Tag U1 @@ -20,13 +20,13 @@ (implementation: .public equivalence (Equivalence Tag) (def: (= reference sample) - (u1//= (:representation reference) - (:representation sample)))) + (u1//= (representation reference) + (representation sample)))) (template [ ] [(def: .public Tag - (|> ///unsigned.u1 try.trusted :abstraction))] + (|> ///unsigned.u1 try.trusted abstraction))] [01 utf8] [03 integer] @@ -46,5 +46,5 @@ (def: .public writer (Writer Tag) - (|>> :representation ///unsigned.writer/1)) + (|>> representation ///unsigned.writer/1)) ) diff --git a/stdlib/source/library/lux/target/jvm/encoding/name.lux b/stdlib/source/library/lux/target/jvm/encoding/name.lux index c935d07b0..247300884 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/name.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/name.lux @@ -1,11 +1,11 @@ (.using - [library - [lux "*" - [data - ["[0]" text - ["%" format {"+" format}]]] - [type - abstract]]]) + [library + [lux "*" + [data + ["[0]" text + ["%" format {"+" format}]]] + [type + [abstract {"-" pattern}]]]]) (def: .public internal_separator "/") (def: .public external_separator ".") @@ -20,15 +20,15 @@ (-> External Internal) (|>> (text.replaced ..external_separator ..internal_separator) - :abstraction)) + abstraction)) (def: .public read (-> Internal Text) - (|>> :representation)) + (|>> representation)) (def: .public external (-> Internal External) - (|>> :representation + (|>> representation (text.replaced ..internal_separator ..external_separator)))) diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux index dba35fc11..981d8c3f7 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux @@ -20,26 +20,26 @@ ["n" nat] ["i" int]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (abstract: .public (Signed brand) Int (def: .public value (-> (Signed Any) Int) - (|>> :representation)) + (|>> representation)) (implementation: .public equivalence (All (_ brand) (Equivalence (Signed brand))) (def: (= reference sample) - (i.= (:representation reference) (:representation sample)))) + (i.= (representation reference) (representation sample)))) (implementation: .public order (All (_ brand) (Order (Signed brand))) (def: &equivalence ..equivalence) (def: (< reference sample) - (i.< (:representation reference) (:representation sample)))) + (i.< (representation reference) (representation sample)))) (exception: .public (value_exceeds_the_scope [value Int scope Nat]) @@ -56,31 +56,31 @@ (def: .public - (|> (n.* i64.bits_per_byte) -- i64.mask :abstraction)) + (|> (n.* i64.bits_per_byte) -- i64.mask abstraction)) (def: .public - (let [it (:representation )] - (:abstraction (-- (i.- it +0))))) + (let [it (representation )] + (abstraction (-- (i.- it +0))))) (def: .public (-> Int (Try )) - (let [positive (:representation ) + (let [positive (representation ) negative (i64.not positive)] (function (_ value) (if (i.= (if (i.< +0 value) (i64.or negative value) (i64.and positive value)) value) - {try.#Success (:abstraction value)} + {try.#Success (abstraction value)} (exception.except ..value_exceeds_the_scope [value ]))))) (template [ ] [(def: .public ( parameter subject) (-> (Try )) ( - ( (:representation parameter) - (:representation subject))))] + ( (representation parameter) + (representation subject))))] [<+> i.+] [<-> i.-] @@ -94,7 +94,7 @@ (template [ ] [(def: .public (-> ) - (|>> :transmutation))] + (|>> transmutation))] [lifted/2 S1 S2] [lifted/4 S2 S4] @@ -103,7 +103,7 @@ (template [ ] [(def: .public (Writer ) - (|>> :representation ))] + (|>> representation ))] [writer/1 S1 format.bits/8] [writer/2 S2 format.bits/16] diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux index 795f30716..d733b0480 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux @@ -19,28 +19,28 @@ ["n" nat] ["[0]" i64]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) (abstract: .public (Unsigned brand) Nat (def: .public value (-> (Unsigned Any) Nat) - (|>> :representation)) + (|>> representation)) (implementation: .public equivalence (All (_ brand) (Equivalence (Unsigned brand))) (def: (= reference sample) - (n.= (:representation reference) - (:representation sample)))) + (n.= (representation reference) + (representation sample)))) (implementation: .public order (All (_ brand) (Order (Unsigned brand))) (def: &equivalence ..equivalence) (def: (< reference sample) - (n.< (:representation reference) - (:representation sample)))) + (n.< (representation reference) + (representation sample)))) (exception: .public (value_exceeds_the_maximum [type Symbol value Nat @@ -48,7 +48,7 @@ (exception.report "Type" (%.symbol type) "Value" (%.nat value) - "Maximum" (%.nat (:representation maximum)))) + "Maximum" (%.nat (representation maximum)))) (exception: .public [brand] (subtraction_cannot_yield_negative_value [type Symbol @@ -56,8 +56,8 @@ subject (Unsigned brand)]) (exception.report "Type" (%.symbol type) - "Parameter" (%.nat (:representation parameter)) - "Subject" (%.nat (:representation subject)))) + "Parameter" (%.nat (representation parameter)) + "Subject" (%.nat (representation subject)))) (template [ <+> <-> ] [(with_expansions [ (template.symbol [ "'"])] @@ -68,32 +68,32 @@ (def: .public - (|> (n.* i64.bits_per_byte) i64.mask :abstraction)) + (|> (n.* i64.bits_per_byte) i64.mask abstraction)) (def: .public ( value) (-> Nat (Try )) - (if (n.> (:representation ) value) + (if (n.> (representation ) value) (exception.except ..value_exceeds_the_maximum [(symbol ) value ]) - {try.#Success (:abstraction value)})) + {try.#Success (abstraction value)})) (def: .public (<+> parameter subject) (-> (Try )) ( - (n.+ (:representation parameter) - (:representation subject)))) + (n.+ (representation parameter) + (representation subject)))) (def: .public (<-> parameter subject) (-> (Try )) - (let [parameter' (:representation parameter) - subject' (:representation subject)] + (let [parameter' (representation parameter) + subject' (representation subject)] (if (n.> subject' parameter') (exception.except ..subtraction_cannot_yield_negative_value [(symbol ) parameter subject]) - {try.#Success (:abstraction (n.- parameter' subject'))}))) + {try.#Success (abstraction (n.- parameter' subject'))}))) (def: .public ( left right) (-> ) - (:abstraction (n.max (:representation left) - (:representation right))))] + (abstraction (n.max (representation left) + (representation right))))] [1 U1 bytes/1 u1 maximum/1 +/1 -/1 max/1] [2 U2 bytes/2 u2 maximum/2 +/2 -/2 max/2] @@ -103,7 +103,7 @@ (template [ ] [(def: .public (-> ) - (|>> :transmutation))] + (|>> transmutation))] [lifted/2 U1 U2] [lifted/4 U2 U4] @@ -112,7 +112,7 @@ (template [ ] [(def: .public (Writer ) - (|>> :representation ))] + (|>> representation ))] [writer/1 U1 format.bits/8] [writer/2 U2 format.bits/16] diff --git a/stdlib/source/library/lux/target/jvm/index.lux b/stdlib/source/library/lux/target/jvm/index.lux index 8b339bc89..b6a0eb318 100644 --- a/stdlib/source/library/lux/target/jvm/index.lux +++ b/stdlib/source/library/lux/target/jvm/index.lux @@ -1,16 +1,16 @@ (.using - [library - [lux "*" - [abstract - ["[0]" equivalence {"+" Equivalence}]] - [data - [format - [binary {"+" Writer}]]] - [type - abstract]]] - ["[0]" // "_" - [encoding - ["[1][0]" unsigned {"+" U2}]]]) + [library + [lux "*" + [abstract + ["[0]" equivalence {"+" Equivalence}]] + [data + [format + [binary {"+" Writer}]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" // "_" + [encoding + ["[1][0]" unsigned {"+" U2}]]]) (def: .public length //unsigned.bytes/2) @@ -20,11 +20,11 @@ (def: .public index (All (_ kind) (-> U2 (Index kind))) - (|>> :abstraction)) + (|>> abstraction)) (def: .public value (-> (Index Any) U2) - (|>> :representation)) + (|>> representation)) (def: .public equivalence (All (_ kind) (Equivalence (Index kind))) @@ -34,5 +34,5 @@ (def: .public writer (All (_ kind) (Writer (Index kind))) - (|>> :representation //unsigned.writer/2)) + (|>> representation //unsigned.writer/2)) ) diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index 71d6dc712..bff3cb325 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -68,13 +68,13 @@ (def: java/lang/ClassLoader::defineClass java/lang/reflect/Method (let [signature (|> (ffi.array 4) - (ffi.write! 0 (:as - (ffi.class_for java/lang/String))) + (ffi.write! 0 (as + (ffi.class_for java/lang/String))) (ffi.write! 1 (java/lang/Object::getClass (ffi.array byte 0))) - (ffi.write! 2 (:as - (java/lang/Integer::TYPE))) - (ffi.write! 3 (:as - (java/lang/Integer::TYPE))))] + (ffi.write! 2 (as + (java/lang/Integer::TYPE))) + (ffi.write! 3 (as + (java/lang/Integer::TYPE))))] (do_to (java/lang/Class::getDeclaredMethod (ffi.as_string "defineClass") signature (ffi.class_for java/lang/ClassLoader)) @@ -82,19 +82,19 @@ (def: .public (define class_name bytecode loader) (-> Text Binary java/lang/ClassLoader (Try java/lang/Object)) - (let [signature (array.of_list (list (:as java/lang/Object - class_name) - (:as java/lang/Object - bytecode) - (:as java/lang/Object - (|> 0 - (:as (Primitive "java.lang.Long")) - ffi.long_to_int)) - (:as java/lang/Object - (|> bytecode - binary.size - (:as (Primitive "java.lang.Long")) - ffi.long_to_int))))] + (let [signature (array.of_list (list (as java/lang/Object + class_name) + (as java/lang/Object + bytecode) + (as java/lang/Object + (|> 0 + (as (Primitive "java.lang.Long")) + ffi.long_to_int)) + (as java/lang/Object + (|> bytecode + binary.size + (as (Primitive "java.lang.Long")) + ffi.long_to_int))))] (java/lang/reflect/Method::invoke loader signature java/lang/ClassLoader::defineClass))) (def: .public (new_library _) @@ -114,13 +114,13 @@ (java/lang/ClassLoader (findClass self [class_name java/lang/String]) (java/lang/Class [? < java/lang/Object]) "throws" [java/lang/ClassNotFoundException] - (let [class_name (:as Text class_name) + (let [class_name (as Text class_name) classes (|> library atom.read! io.run!)] (case (dictionary.value class_name classes) {.#Some bytecode} (case (..define class_name bytecode (<| self)) {try.#Success class} - (:expected class) + (as_expected class) {try.#Failure error} (panic! (exception.error ..cannot_define [class_name error]))) diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux index bf5d79aa2..24e442a21 100644 --- a/stdlib/source/library/lux/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/target/jvm/modifier.lux @@ -1,52 +1,52 @@ (.using - [library - [lux "*" - [abstract - ["[0]" equivalence {"+" Equivalence}] - ["[0]" monoid {"+" Monoid}]] - [control - ["[0]" try] - ["<>" parser - ["<[0]>" code]]] - [data - [format - ["[0]F" binary {"+" Writer}]]] - [macro {"+" with_symbols} - [syntax {"+" syntax:}] - ["[0]" code]] - [math - ["[0]" number {"+" hex} - ["[0]" i64]]] - [type - abstract]]] - ["[0]" // "_" - [encoding - ["[1][0]" unsigned]]]) + [library + [lux "*" + [abstract + ["[0]" equivalence {"+" Equivalence}] + ["[0]" monoid {"+" Monoid}]] + [control + ["[0]" try] + ["<>" parser + ["<[0]>" code]]] + [data + [format + ["[0]F" binary {"+" Writer}]]] + [macro {"+" with_symbols} + [syntax {"+" syntax:}] + ["[0]" code]] + [math + ["[0]" number {"+" hex} + ["[0]" i64]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" // "_" + [encoding + ["[1][0]" unsigned]]]) (abstract: .public (Modifier of) //unsigned.U2 (def: .public code (-> (Modifier Any) //unsigned.U2) - (|>> :representation)) + (|>> representation)) (implementation: .public equivalence (All (_ of) (Equivalence (Modifier of))) (def: (= reference sample) (# //unsigned.equivalence = - (:representation reference) - (:representation sample)))) + (representation reference) + (representation sample)))) (template: (!wrap value) [(|> value //unsigned.u2 try.trusted - :abstraction)]) + abstraction)]) (template: (!unwrap value) [(|> value - :representation + representation //unsigned.value)]) (def: .public (has? sub super) @@ -71,7 +71,7 @@ (def: .public writer (All (_ of) (Writer (Modifier of))) - (|>> :representation //unsigned.writer/2)) + (|>> representation //unsigned.writer/2)) (def: modifier (-> Nat Modifier) diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index c8daea629..29776163c 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -133,7 +133,7 @@ (<| (case (ffi.check java/lang/Class reflection) {.#Some class} (let [class_name (|> class - (:as (java/lang/Class java/lang/Object)) + (as (java/lang/Class java/lang/Object)) java/lang/Class::getName)] (`` (if (or (~~ (template [] [(text#= (/reflection.reflection ) @@ -162,7 +162,7 @@ (array.list {.#None}) (monad.each ! parameter) (# ! each (/.class (|> raw' - (:as (java/lang/Class java/lang/Object)) + (as (java/lang/Class java/lang/Object)) java/lang/Class::getName))) (exception.with ..cannot_convert_to_a_lux_type [reflection]))) @@ -224,7 +224,7 @@ (<| (case (ffi.check java/lang/Class reflection) {.#Some reflection} (let [class_name (|> reflection - (:as (java/lang/Class java/lang/Object)) + (as (java/lang/Class java/lang/Object)) java/lang/Class::getName)] (`` (cond (~~ (template [ ] [(text#= (/reflection.reflection ) @@ -257,7 +257,7 @@ (case (ffi.check java/lang/Class reflection) {.#Some class} (let [class_name (|> reflection - (:as (java/lang/Class java/lang/Object)) + (as (java/lang/Class java/lang/Object)) java/lang/Class::getName)] (if (text#= (/reflection.reflection /reflection.void) class_name) diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux index c4de519c3..4343e6ff0 100644 --- a/stdlib/source/library/lux/target/jvm/type.lux +++ b/stdlib/source/library/lux/target/jvm/type.lux @@ -1,29 +1,29 @@ (.using - [library - [lux {"-" Primitive Type int char} - [abstract - [equivalence {"+" Equivalence}] - [hash {"+" Hash}]] - [control - ["[0]" maybe]] - [data - ["[0]" text - ["%" format {"+" Format}]] - [collection - ["[0]" list ("[1]#[0]" functor)]]] - [math - [number - ["n" nat]]] - [type - abstract]]] - ["[0]" // "_" - [encoding - ["[1][0]" name {"+" External}]]] - ["[0]" / "_" - [category {"+" Void Value' Value Return' Return Method Primitive Object Class Array Var Parameter Declaration}] - ["[1][0]" signature {"+" Signature}] - ["[1][0]" descriptor {"+" Descriptor}] - ["[1][0]" reflection {"+" Reflection}]]) + [library + [lux {"-" Primitive Type int char} + [abstract + [equivalence {"+" Equivalence}] + [hash {"+" Hash}]] + [control + ["[0]" maybe]] + [data + ["[0]" text + ["%" format {"+" Format}]] + [collection + ["[0]" list ("[1]#[0]" functor)]]] + [math + [number + ["n" nat]]] + [type + [abstract {"-" pattern}]]]] + ["[0]" // "_" + [encoding + ["[1][0]" name {"+" External}]]] + ["[0]" / "_" + [category {"+" Void Value' Value Return' Return Method Primitive Object Class Array Var Parameter Declaration}] + ["[1][0]" signature {"+" Signature}] + ["[1][0]" descriptor {"+" Descriptor}] + ["[1][0]" reflection {"+" Reflection}]]) (abstract: .public (Type category) [(Signature category) @@ -45,7 +45,7 @@ (template [