From b71b861008381626633bf28b033cd866d7e4e0b7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 20 Jun 2019 22:32:59 -0400 Subject: Improved the convention for using text formatters. --- stdlib/source/lux/control/concatenative.lux | 2 +- stdlib/source/lux/control/concurrency/actor.lux | 8 +-- stdlib/source/lux/control/contract.lux | 6 +-- stdlib/source/lux/control/parser/cli.lux | 2 +- stdlib/source/lux/control/parser/synthesis.lux | 6 +-- stdlib/source/lux/control/parser/type.lux | 12 ++--- stdlib/source/lux/control/region.lux | 2 +- stdlib/source/lux/control/remember.lux | 4 +- stdlib/source/lux/control/security/capability.lux | 6 +-- stdlib/source/lux/data/collection/bits.lux | 2 - stdlib/source/lux/data/collection/tree/finger.lux | 5 +- stdlib/source/lux/data/format/binary.lux | 10 ++-- stdlib/source/lux/data/format/context.lux | 4 +- stdlib/source/lux/data/format/css.lux | 6 +-- stdlib/source/lux/data/format/css/query.lux | 2 +- stdlib/source/lux/data/format/css/selector.lux | 10 ++-- stdlib/source/lux/data/format/css/style.lux | 2 +- stdlib/source/lux/data/format/css/value.lux | 58 +++++++++++----------- stdlib/source/lux/data/format/html.lux | 6 +-- stdlib/source/lux/data/format/markdown.lux | 4 +- stdlib/source/lux/data/text/buffer.lux | 2 +- stdlib/source/lux/data/text/format.lux | 50 +++++++++---------- stdlib/source/lux/data/text/regex.lux | 2 +- stdlib/source/lux/debug.lux | 52 +++++++++---------- stdlib/source/lux/host.js.lux | 4 +- stdlib/source/lux/host.jvm.lux | 2 +- stdlib/source/lux/host.old.lux | 2 +- stdlib/source/lux/locale.lux | 2 +- stdlib/source/lux/macro/poly/equivalence.lux | 4 +- stdlib/source/lux/macro/poly/functor.lux | 10 ++-- stdlib/source/lux/macro/poly/json.lux | 2 +- stdlib/source/lux/target/common-lisp.lux | 8 +-- stdlib/source/lux/target/js.lux | 10 ++-- stdlib/source/lux/target/jvm/constant/pool.lux | 12 ++--- stdlib/source/lux/target/jvm/descriptor.lux | 2 +- stdlib/source/lux/target/jvm/loader.lux | 2 +- stdlib/source/lux/target/jvm/reflection.lux | 16 +++--- stdlib/source/lux/target/jvm/type.lux | 2 +- stdlib/source/lux/target/jvm/type/lux.lux | 4 +- stdlib/source/lux/target/lua.lux | 8 +-- stdlib/source/lux/target/php.lux | 6 +-- stdlib/source/lux/target/python.lux | 10 ++-- stdlib/source/lux/target/ruby.lux | 8 +-- stdlib/source/lux/target/scheme.lux | 8 +-- stdlib/source/lux/test.lux | 12 ++--- stdlib/source/lux/tool/compiler/analysis.lux | 22 ++++---- .../lux/tool/compiler/default/evaluation.lux | 4 +- stdlib/source/lux/tool/compiler/default/init.lux | 3 +- .../source/lux/tool/compiler/default/platform.lux | 4 +- stdlib/source/lux/tool/compiler/default/syntax.lux | 14 +++--- stdlib/source/lux/tool/compiler/meta/archive.lux | 3 +- .../lux/tool/compiler/meta/archive/signature.lux | 4 +- .../source/lux/tool/compiler/meta/io/archive.lux | 2 +- .../source/lux/tool/compiler/meta/io/context.lux | 2 +- .../lux/tool/compiler/meta/packager/script.lux | 1 - stdlib/source/lux/tool/compiler/name.lux | 2 +- stdlib/source/lux/tool/compiler/phase.lux | 6 +-- stdlib/source/lux/tool/compiler/phase/analysis.lux | 4 +- .../lux/tool/compiler/phase/analysis/case.lux | 18 +++---- .../tool/compiler/phase/analysis/case/coverage.lux | 12 ++--- .../lux/tool/compiler/phase/analysis/function.lux | 12 ++--- .../lux/tool/compiler/phase/analysis/inference.lux | 24 ++++----- .../lux/tool/compiler/phase/analysis/module.lux | 10 ++-- .../lux/tool/compiler/phase/analysis/reference.lux | 4 +- .../lux/tool/compiler/phase/analysis/scope.lux | 3 +- .../lux/tool/compiler/phase/analysis/structure.lux | 50 +++++++++---------- .../source/lux/tool/compiler/phase/extension.lux | 16 +++--- .../tool/compiler/phase/extension/analysis/jvm.lux | 34 ++++++------- .../tool/compiler/phase/extension/analysis/lux.lux | 8 +-- .../lux/tool/compiler/phase/extension/bundle.lux | 2 +- .../compiler/phase/extension/statement/lux.lux | 22 ++++---- .../source/lux/tool/compiler/phase/generation.lux | 14 +++--- .../compiler/phase/generation/common-lisp/case.lux | 3 +- .../phase/generation/common-lisp/function.lux | 2 - .../compiler/phase/generation/common-lisp/loop.lux | 4 +- .../phase/generation/common-lisp/runtime.lux | 2 +- .../lux/tool/compiler/phase/generation/js/case.lux | 3 +- .../tool/compiler/phase/generation/js/function.lux | 2 - .../lux/tool/compiler/phase/generation/js/loop.lux | 3 +- .../tool/compiler/phase/generation/js/runtime.lux | 2 +- .../tool/compiler/phase/generation/lua/case.lux | 3 +- .../compiler/phase/generation/lua/function.lux | 2 - .../tool/compiler/phase/generation/lua/loop.lux | 4 +- .../tool/compiler/phase/generation/lua/runtime.lux | 2 +- .../tool/compiler/phase/generation/php/case.lux | 4 +- .../compiler/phase/generation/php/function.lux | 3 +- .../tool/compiler/phase/generation/php/loop.lux | 4 +- .../tool/compiler/phase/generation/php/runtime.lux | 2 +- .../tool/compiler/phase/generation/python/case.lux | 4 +- .../compiler/phase/generation/python/function.lux | 2 - .../tool/compiler/phase/generation/python/loop.lux | 4 +- .../compiler/phase/generation/python/runtime.lux | 2 +- .../tool/compiler/phase/generation/reference.lux | 4 +- .../tool/compiler/phase/generation/ruby/case.lux | 3 +- .../compiler/phase/generation/ruby/function.lux | 2 - .../tool/compiler/phase/generation/ruby/loop.lux | 4 +- .../compiler/phase/generation/ruby/runtime.lux | 2 +- .../tool/compiler/phase/generation/scheme/case.lux | 3 +- .../phase/generation/scheme/extension/common.lux | 3 +- .../compiler/phase/generation/scheme/function.lux | 2 +- .../tool/compiler/phase/generation/scheme/loop.lux | 3 +- .../compiler/phase/generation/scheme/runtime.lux | 2 +- stdlib/source/lux/tool/compiler/phase/macro.lux | 12 ++--- .../source/lux/tool/compiler/phase/statement.lux | 8 +-- .../lux/tool/compiler/phase/synthesis/case.lux | 3 +- .../lux/tool/compiler/phase/synthesis/function.lux | 4 +- stdlib/source/lux/tool/compiler/reference.lux | 8 +-- stdlib/source/lux/tool/compiler/statement.lux | 2 - stdlib/source/lux/tool/compiler/synthesis.lux | 42 ++++++++-------- stdlib/source/lux/tool/interpreter.lux | 4 +- stdlib/source/lux/tool/mediator/parallelism.lux | 3 +- stdlib/source/lux/type/dynamic.lux | 6 +-- stdlib/source/lux/type/implicit.lux | 30 +++++------ stdlib/source/lux/type/resource.lux | 11 ++-- stdlib/source/lux/type/unit.lux | 6 +-- stdlib/source/lux/world/binary.lux | 16 +++--- stdlib/source/lux/world/console.lux | 2 +- stdlib/source/lux/world/db/jdbc.lux | 2 +- stdlib/source/lux/world/db/sql.lux | 8 +-- stdlib/source/lux/world/file.lux | 4 +- stdlib/source/lux/world/net/http/cookie.lux | 6 +-- stdlib/source/lux/world/net/http/header.lux | 4 +- stdlib/source/lux/world/net/http/mime.lux | 2 +- stdlib/source/lux/world/net/http/query.lux | 2 +- stdlib/source/lux/world/net/http/response.lux | 1 - stdlib/source/lux/world/shell.lux | 2 +- stdlib/source/program/compositor.lux | 2 +- stdlib/source/program/licentia.lux | 2 +- stdlib/source/program/licentia/document.lux | 2 +- stdlib/source/program/licentia/input.lux | 10 ++-- .../source/program/licentia/license/assurance.lux | 2 +- .../source/program/licentia/license/black-list.lux | 4 +- .../source/program/licentia/license/commercial.lux | 2 +- .../source/program/licentia/license/definition.lux | 2 +- .../program/licentia/license/distribution.lux | 2 +- .../source/program/licentia/license/extension.lux | 8 +-- stdlib/source/program/licentia/license/grant.lux | 6 +-- .../source/program/licentia/license/liability.lux | 2 +- .../source/program/licentia/license/limitation.lux | 2 +- .../program/licentia/license/miscellaneous.lux | 2 +- stdlib/source/program/licentia/license/notice.lux | 6 +-- .../source/program/licentia/license/submission.lux | 2 +- stdlib/source/program/licentia/license/term.lux | 57 ++++++++++----------- stdlib/source/program/licentia/output.lux | 2 +- stdlib/source/program/scriptum.lux | 20 ++++---- stdlib/source/spec/compositor/generation/case.lux | 8 +-- .../source/spec/compositor/generation/common.lux | 2 +- .../source/spec/compositor/generation/function.lux | 2 - .../spec/compositor/generation/primitive.lux | 4 +- .../spec/compositor/generation/structure.lux | 6 +-- stdlib/source/test/lux.lux | 6 +-- stdlib/source/test/lux/abstract/apply.lux | 4 +- stdlib/source/test/lux/abstract/codec.lux | 4 +- stdlib/source/test/lux/abstract/enum.lux | 4 +- stdlib/source/test/lux/abstract/equivalence.lux | 4 +- stdlib/source/test/lux/abstract/fold.lux | 4 +- stdlib/source/test/lux/abstract/functor.lux | 4 +- stdlib/source/test/lux/abstract/interval.lux | 6 +-- stdlib/source/test/lux/abstract/monad.lux | 4 +- stdlib/source/test/lux/abstract/monoid.lux | 4 +- stdlib/source/test/lux/abstract/number.lux | 4 +- stdlib/source/test/lux/abstract/order.lux | 4 +- .../source/test/lux/control/concurrency/actor.lux | 6 +-- .../source/test/lux/control/concurrency/atom.lux | 4 +- .../test/lux/control/concurrency/promise.lux | 4 +- .../test/lux/control/concurrency/semaphore.lux | 6 +-- stdlib/source/test/lux/control/concurrency/stm.lux | 4 +- stdlib/source/test/lux/control/continuation.lux | 4 +- stdlib/source/test/lux/control/exception.lux | 4 +- stdlib/source/test/lux/control/io.lux | 4 +- stdlib/source/test/lux/control/parser.lux | 4 +- stdlib/source/test/lux/control/parser/cli.lux | 1 - stdlib/source/test/lux/control/parser/text.lux | 1 - stdlib/source/test/lux/control/pipe.lux | 8 +-- stdlib/source/test/lux/control/reader.lux | 4 +- stdlib/source/test/lux/control/region.lux | 4 +- stdlib/source/test/lux/control/security/policy.lux | 3 +- stdlib/source/test/lux/control/state.lux | 4 +- stdlib/source/test/lux/control/thread.lux | 4 +- stdlib/source/test/lux/control/writer.lux | 4 +- stdlib/source/test/lux/data/bit.lux | 4 +- stdlib/source/test/lux/data/collection/array.lux | 4 +- stdlib/source/test/lux/data/collection/bits.lux | 4 +- .../source/test/lux/data/collection/dictionary.lux | 4 +- .../lux/data/collection/dictionary/ordered.lux | 4 +- stdlib/source/test/lux/data/collection/list.lux | 4 +- stdlib/source/test/lux/data/collection/queue.lux | 4 +- .../test/lux/data/collection/queue/priority.lux | 4 +- stdlib/source/test/lux/data/collection/row.lux | 26 +++++----- .../source/test/lux/data/collection/sequence.lux | 4 +- stdlib/source/test/lux/data/collection/set.lux | 4 +- .../test/lux/data/collection/set/ordered.lux | 4 +- stdlib/source/test/lux/data/collection/stack.lux | 12 ++--- stdlib/source/test/lux/data/collection/tree.lux | 4 +- .../test/lux/data/collection/tree/zipper.lux | 4 +- stdlib/source/test/lux/data/color.lux | 4 +- stdlib/source/test/lux/data/error.lux | 4 +- stdlib/source/test/lux/data/format/json.lux | 4 +- stdlib/source/test/lux/data/format/xml.lux | 4 +- stdlib/source/test/lux/data/identity.lux | 4 +- stdlib/source/test/lux/data/lazy.lux | 4 +- stdlib/source/test/lux/data/maybe.lux | 4 +- stdlib/source/test/lux/data/name.lux | 4 +- stdlib/source/test/lux/data/number/complex.lux | 4 +- stdlib/source/test/lux/data/number/frac.lux | 10 ++-- stdlib/source/test/lux/data/number/i64.lux | 4 +- stdlib/source/test/lux/data/number/int.lux | 8 +-- stdlib/source/test/lux/data/number/nat.lux | 8 +-- stdlib/source/test/lux/data/number/ratio.lux | 6 +-- stdlib/source/test/lux/data/number/rev.lux | 8 +-- stdlib/source/test/lux/data/product.lux | 4 +- stdlib/source/test/lux/data/sum.lux | 4 +- stdlib/source/test/lux/data/text.lux | 4 +- stdlib/source/test/lux/data/text/regex.lux | 4 +- stdlib/source/test/lux/macro.lux | 4 +- stdlib/source/test/lux/macro/code.lux | 26 +++++----- stdlib/source/test/lux/macro/poly/equivalence.lux | 4 +- stdlib/source/test/lux/macro/poly/functor.lux | 4 +- stdlib/source/test/lux/macro/poly/json.lux | 4 +- stdlib/source/test/lux/macro/syntax.lux | 2 +- stdlib/source/test/lux/math.lux | 4 +- stdlib/source/test/lux/math/infix.lux | 4 +- stdlib/source/test/lux/math/logic/continuous.lux | 4 +- stdlib/source/test/lux/math/logic/fuzzy.lux | 22 ++++---- stdlib/source/test/lux/math/modular.lux | 4 +- stdlib/source/test/lux/target/jvm.lux | 4 +- stdlib/source/test/lux/time/date.lux | 4 +- stdlib/source/test/lux/time/day.lux | 4 +- stdlib/source/test/lux/time/duration.lux | 4 +- stdlib/source/test/lux/time/instant.lux | 4 +- stdlib/source/test/lux/time/month.lux | 4 +- .../test/lux/tool/compiler/default/syntax.lux | 8 +-- .../test/lux/tool/compiler/phase/analysis/case.lux | 2 +- .../lux/tool/compiler/phase/analysis/function.lux | 6 +-- .../lux/tool/compiler/phase/analysis/primitive.lux | 10 ++-- .../lux/tool/compiler/phase/analysis/reference.lux | 1 - .../lux/tool/compiler/phase/analysis/structure.lux | 10 ++-- .../tool/compiler/phase/extension/analysis/lux.lux | 4 +- .../lux/tool/compiler/phase/synthesis/case.lux | 1 - .../lux/tool/compiler/phase/synthesis/function.lux | 1 - .../tool/compiler/phase/synthesis/primitive.lux | 6 +-- .../tool/compiler/phase/synthesis/structure.lux | 4 +- stdlib/source/test/lux/type.lux | 6 +-- stdlib/source/test/lux/type/check.lux | 4 +- stdlib/source/test/lux/type/dynamic.lux | 4 +- stdlib/source/test/lux/type/implicit.lux | 4 +- stdlib/source/test/lux/type/resource.lux | 4 +- stdlib/source/test/lux/world/binary.lux | 4 +- stdlib/source/test/lux/world/file.lux | 8 +-- 249 files changed, 794 insertions(+), 837 deletions(-) diff --git a/stdlib/source/lux/control/concatenative.lux b/stdlib/source/lux/control/concatenative.lux index d922e5264..a821561b4 100644 --- a/stdlib/source/lux/control/concatenative.lux +++ b/stdlib/source/lux/control/concatenative.lux @@ -8,7 +8,7 @@ ["." monad]] [data ["." text - format] + ["%" format (#+ format)]] ["." maybe ("#;." monad)] [collection ["." list ("#;." fold functor)]]] diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux index a0e44b1bf..37117d260 100644 --- a/stdlib/source/lux/control/concurrency/actor.lux +++ b/stdlib/source/lux/control/concurrency/actor.lux @@ -12,7 +12,7 @@ ["." product] ["." error (#+ Error)] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid monad fold)]]] ["." macro (#+ with-gensyms monad) @@ -232,7 +232,7 @@ ((stop cause state) (:: promise.monad wrap (log! (if (ex.match? ..poisoned cause) - (format "Counter was poisoned: " (%n state)) + (format "Counter was poisoned: " (%.nat state)) cause))))) (actor: #export (Stack a) @@ -396,6 +396,6 @@ (if (~ g!sent?) ((~' wrap) (~ g!task)) ((~' wrap) ((~! promise.resolved) - ((~! ex.throw) ..dead [(~ (code.text (%name actor-name))) - (~ (code.text (%name message-name)))]))))))))) + ((~! ex.throw) ..dead [(~ (code.text (%.name actor-name))) + (~ (code.text (%.name message-name)))]))))))))) ))))) diff --git a/stdlib/source/lux/control/contract.lux b/stdlib/source/lux/control/contract.lux index 4e5e70317..4c402de24 100644 --- a/stdlib/source/lux/control/contract.lux +++ b/stdlib/source/lux/control/contract.lux @@ -7,7 +7,7 @@ ["s" code]]] [data [text - format]] + ["%" format (#+ format)]]] [macro (#+ with-gensyms) ["." code] [syntax (#+ syntax:)]]]) @@ -24,7 +24,7 @@ "Otherwise, an error is raised." (pre (i/= +4 (i/+ +2 +2)) (foo +123 +456 +789)))} - (wrap (list (` (exec (assert! (~ (code.text (format "Pre-condition failed: " (%code test)))) + (wrap (list (` (exec (assert! (~ (code.text (format "Pre-condition failed: " (%.code test)))) (~ test)) (~ expr)))))) @@ -37,6 +37,6 @@ (i/+ +2 +2)))} (with-gensyms [g!output] (wrap (list (` (let [(~ g!output) (~ expr)] - (exec (assert! (~ (code.text (format "Post-condition failed: " (%code test)))) + (exec (assert! (~ (code.text (format "Post-condition failed: " (%.code test)))) ((~ test) (~ g!output))) (~ g!output)))))))) diff --git a/stdlib/source/lux/control/parser/cli.lux b/stdlib/source/lux/control/parser/cli.lux index 3ea26f7e8..fddea13d7 100644 --- a/stdlib/source/lux/control/parser/cli.lux +++ b/stdlib/source/lux/control/parser/cli.lux @@ -7,7 +7,7 @@ [collection ["." list ("#@." monoid monad)]] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] ["." error (#+ Error)]] [macro (#+ with-gensyms) ["." code] diff --git a/stdlib/source/lux/control/parser/synthesis.lux b/stdlib/source/lux/control/parser/synthesis.lux index c36c61601..a239b6931 100644 --- a/stdlib/source/lux/control/parser/synthesis.lux +++ b/stdlib/source/lux/control/parser/synthesis.lux @@ -13,7 +13,7 @@ ["." frac] ["." nat]] ["." text - format]] + ["%" format (#+ format)]]] [tool [compiler [analysis (#+ Variant Tuple Environment Arity)] @@ -32,8 +32,8 @@ (exception: #export (wrong-arity {expected Arity} {actual Arity}) (exception.report - ["Expected" (%n expected)] - ["Actual" (%n actual)])) + ["Expected" (%.nat expected)] + ["Actual" (%.nat actual)])) (exception: #export empty-input) diff --git a/stdlib/source/lux/control/parser/type.lux b/stdlib/source/lux/control/parser/type.lux index 5c26114be..3fe852739 100644 --- a/stdlib/source/lux/control/parser/type.lux +++ b/stdlib/source/lux/control/parser/type.lux @@ -11,7 +11,7 @@ [number ["." nat ("#@." decimal)]] ["." text ("#@." monoid) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)] ["." dictionary (#+ Dictionary)]]] @@ -24,7 +24,7 @@ (template [] [(exception: #export ( {type Type}) (exception.report - ["Type" (%type type)]))] + ["Type" (%.type type)]))] [not-existential] [not-recursive] @@ -41,8 +41,8 @@ (template [] [(exception: #export ( {expected Type} {actual Type}) (exception.report - ["Expected" (%type expected)] - ["Actual" (%type actual)]))] + ["Expected" (%.type expected)] + ["Actual" (%.type actual)]))] [types-do-not-match] [wrong-parameter] @@ -51,7 +51,7 @@ (exception: #export (unconsumed {remaining (List Type)}) (exception.report ["Types" (|> remaining - (list@map (|>> %type (format text.new-line "* "))) + (list@map (|>> %.type (format text.new-line "* "))) (text.join-with ""))])) (type: #export Env @@ -344,5 +344,5 @@ [current any #let [_ (.log! ($_ text@compose "{" (name@encode (name-of ..log)) "} " - (%type current)))]] + (%.type current)))]] (//.fail "LOGGING"))) diff --git a/stdlib/source/lux/control/region.lux b/stdlib/source/lux/control/region.lux index 56e64f1ed..de90f4cea 100644 --- a/stdlib/source/lux/control/region.lux +++ b/stdlib/source/lux/control/region.lux @@ -7,7 +7,7 @@ [data ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." fold)]]]] [// diff --git a/stdlib/source/lux/control/remember.lux b/stdlib/source/lux/control/remember.lux index 58b576672..6dd930b88 100644 --- a/stdlib/source/lux/control/remember.lux +++ b/stdlib/source/lux/control/remember.lux @@ -9,7 +9,7 @@ [data ["." error] ["." text - format]] + ["%" format (#+ format)]]] [time ["." instant] ["." date (#+ Date) ("#@." order codec)]] @@ -22,7 +22,7 @@ (format message text.new-line (case focus (#.Some focus) - (%code focus) + (%.code focus) #.None ""))) diff --git a/stdlib/source/lux/control/security/capability.lux b/stdlib/source/lux/control/security/capability.lux index fdf51d1b7..d33f0f0e6 100644 --- a/stdlib/source/lux/control/security/capability.lux +++ b/stdlib/source/lux/control/security/capability.lux @@ -11,7 +11,7 @@ ["s" code]]] [data [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [type @@ -49,8 +49,8 @@ (do @ [this-module macro.current-module-name #let [[name vars] declaration] - g!brand (:: @ map (|>> %code code.text) - (macro.gensym (format (%name [this-module name])))) + g!brand (:: @ map (|>> %.code code.text) + (macro.gensym (format (%.name [this-module name])))) #let [capability (` (..Capability (.primitive (~ g!brand)) (~ input) (~ output)))]] (wrap (list (` (type: (~+ (writer.export export)) (~ (writer.declaration declaration)) diff --git a/stdlib/source/lux/data/collection/bits.lux b/stdlib/source/lux/data/collection/bits.lux index 0e5f7a16e..4ffbe2bc8 100644 --- a/stdlib/source/lux/data/collection/bits.lux +++ b/stdlib/source/lux/data/collection/bits.lux @@ -8,8 +8,6 @@ ["." maybe] [number ["." i64]] - [text - format] [collection ["." array (#+ Array) ("#@." fold)]]]]) diff --git a/stdlib/source/lux/data/collection/tree/finger.lux b/stdlib/source/lux/data/collection/tree/finger.lux index f35129dff..03c23702c 100644 --- a/stdlib/source/lux/data/collection/tree/finger.lux +++ b/stdlib/source/lux/data/collection/tree/finger.lux @@ -2,10 +2,7 @@ [lux #* [abstract ["m" monoid] - [predicate (#+ Predicate)]] - [data - [text - format]]]) + [predicate (#+ Predicate)]]]) (type: #export (Node m a) (#Leaf m a) diff --git a/stdlib/source/lux/data/format/binary.lux b/stdlib/source/lux/data/format/binary.lux index 4a2909272..ff43f4384 100644 --- a/stdlib/source/lux/data/format/binary.lux +++ b/stdlib/source/lux/data/format/binary.lux @@ -17,7 +17,7 @@ ["." frac]] [text ["." encoding] - [format (#+ %n)]] + ["%" format]] [collection ["." list] ["." row (#+ Row) ("#;." functor)]]] @@ -26,12 +26,12 @@ ["." binary (#+ Binary)]]]) (exception: #export (binary-was-not-fully-read {length Nat} {read Nat}) - (ex.report ["Binary length" (%n length)] - ["Read bytes" (%n read)])) + (ex.report ["Binary length" (%.nat length)] + ["Read bytes" (%.nat read)])) (exception: #export (invalid-tag {range Nat} {byte Nat}) - (ex.report ["Range" (%n range)] - ["Byte" (%n byte)])) + (ex.report ["Range" (%.nat range)] + ["Byte" (%.nat byte)])) (type: #export Offset Nat) diff --git a/stdlib/source/lux/data/format/context.lux b/stdlib/source/lux/data/format/context.lux index 6ef06085f..6c3cc6903 100644 --- a/stdlib/source/lux/data/format/context.lux +++ b/stdlib/source/lux/data/format/context.lux @@ -8,12 +8,12 @@ [data ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [collection ["." dictionary (#+ Dictionary)]]]]) (exception: #export (unknown-property {property Text}) - (ex.report ["Property" (%t property)])) + (ex.report ["Property" (%.text property)])) (type: #export Context (Dictionary Text Text)) diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux index 2bee92189..2b09140f6 100644 --- a/stdlib/source/lux/data/format/css.lux +++ b/stdlib/source/lux/data/format/css.lux @@ -5,7 +5,7 @@ [number ["." nat]] ["." text - format + ["%" format (#+ format)] ["." encoding (#+ Encoding)]] [collection ["." list ("#;." functor)]]] @@ -39,7 +39,7 @@ (def: #export char-set (-> Encoding (CSS Special)) (|>> encoding.name - %t + %.text (text.enclose ["@charset " ";"]) :abstraction)) @@ -68,7 +68,7 @@ (def: #export (import url query) (-> URL (Maybe Query) (CSS Special)) - (:abstraction (format (format "@import url(" (%t url) ")") + (:abstraction (format (format "@import url(" (%.text url) ")") (case query (#.Some query) (format " " (/query.query query)) diff --git a/stdlib/source/lux/data/format/css/query.lux b/stdlib/source/lux/data/format/css/query.lux index 6e0400ad4..31f5bee21 100644 --- a/stdlib/source/lux/data/format/css/query.lux +++ b/stdlib/source/lux/data/format/css/query.lux @@ -5,7 +5,7 @@ ["s" code]]] [data [text - format]] + ["%" format (#+ format)]]] [macro ["." template] ["." code] diff --git a/stdlib/source/lux/data/format/css/selector.lux b/stdlib/source/lux/data/format/css/selector.lux index 3c01a76a3..3961a9442 100644 --- a/stdlib/source/lux/data/format/css/selector.lux +++ b/stdlib/source/lux/data/format/css/selector.lux @@ -2,7 +2,7 @@ [lux (#- or and for is? not) [data ["." text - format]] + ["%" format (#+ format)]]] [type abstract] [macro @@ -168,7 +168,7 @@ (def: #export index (-> Nat Index) - (|>> %n :abstraction)) + (|>> %.nat :abstraction)) (template [ ] [(def: #export Index (:abstraction ))] @@ -185,9 +185,9 @@ (-> Formula Index) (let [(^slots [#constant #variable]) input] (:abstraction (format (if (i/< +0 variable) - (%i variable) - (%n (.nat variable))) - (%i constant))))) + (%.int variable) + (%.nat (.nat variable))) + (%.int constant))))) (template [ ] [(def: #export ( index) diff --git a/stdlib/source/lux/data/format/css/style.lux b/stdlib/source/lux/data/format/css/style.lux index 0e618156b..5264fb0f9 100644 --- a/stdlib/source/lux/data/format/css/style.lux +++ b/stdlib/source/lux/data/format/css/style.lux @@ -2,7 +2,7 @@ [lux #* [data [text - format]] + ["%" format (#+ format)]]] [type abstract]] ["." // #_ diff --git a/stdlib/source/lux/data/format/css/value.lux b/stdlib/source/lux/data/format/css/value.lux index 9d34d02f6..08889f2e4 100644 --- a/stdlib/source/lux/data/format/css/value.lux +++ b/stdlib/source/lux/data/format/css/value.lux @@ -10,7 +10,7 @@ [number ["." rev]] ["." text - format] + ["%" format (#+ Format format)]] [collection ["." list ("#;." functor)]]] [type @@ -54,7 +54,7 @@ (def: (%number value) (Format Frac) - (let [raw (%f value)] + (let [raw (%.frac value)] (if (f/< +0.0 value) raw (|> raw (text.split 1) maybe.assume product.right)))) @@ -795,7 +795,7 @@ (def: #export (steps intervals step) (-> Nat Step (Value Timing)) - (..apply "steps" (list (%n intervals) (..step step)))) + (..apply "steps" (list (%.nat intervals) (..step step)))) (def: #export (cubic-bezier p0 p1 p2 p3) (-> Frac Frac Frac Frac (Value Timing)) @@ -806,7 +806,7 @@ (template [ ] [(def: #export (-> Nat (Value )) - (|>> %n :abstraction))] + (|>> %.nat :abstraction))] [iteration Iteration] [count Count] @@ -821,20 +821,20 @@ (def: #export (rgb color) (-> color.Color (Value Color)) (let [[red green blue] (color.to-rgb color)] - (..apply "rgb" (list (%n red) - (%n green) - (%n blue))))) + (..apply "rgb" (list (%.nat red) + (%.nat green) + (%.nat blue))))) (def: #export (rgba pigment) (-> color.Pigment (Value Color)) (let [(^slots [#color.color #color.alpha]) pigment [red green blue] (color.to-rgb color)] - (..apply "rgba" (list (%n red) - (%n green) - (%n blue) + (..apply "rgba" (list (%.nat red) + (%.nat green) + (%.nat blue) (if (r/= (:: rev.interval top) alpha) "1.0" - (format "0" (%r alpha))))))) + (format "0" (%.rev alpha))))))) (template [ ] [(def: #export ( value) @@ -862,15 +862,15 @@ (def: (%int value) (Format Int) (if (i/< +0 value) - (%i value) - (%n (.nat value)))) + (%.int value) + (%.nat (.nat value)))) (template [ ] [(def: #export ( value) (-> Int (Value Time)) (:abstraction (format (if (i/< +0 value) - (%i value) - (%n (.nat value))) + (%.int value) + (%.nat (.nat value))) )))] @@ -886,8 +886,8 @@ (def: #export (slice-number/2 horizontal vertical) (-> Nat Nat (Value Slice)) - (:abstraction (format (%n horizontal) ..slice-separator - (%n vertical)))) + (:abstraction (format (%.nat horizontal) ..slice-separator + (%.nat vertical)))) (abstract: #export Stop {} @@ -943,13 +943,13 @@ (def: #export (turn value) (-> Rev Angle) - (:abstraction (format (%r value) "turn"))) + (:abstraction (format (%.rev value) "turn"))) (def: degree-limit Nat 360) (def: #export (degree value) (-> Nat Angle) - (:abstraction (format (%n (n/% ..degree-limit value)) "deg"))) + (:abstraction (format (%.nat (n/% ..degree-limit value)) "deg"))) (template [ ] [(def: #export Angle (..degree ))] @@ -986,7 +986,7 @@ (def: #export (%% value) (-> Nat Percentage) - (:abstraction (format (%n (n/% percentage-limit value)) "%"))) + (:abstraction (format (%.nat (n/% percentage-limit value)) "%"))) (def: #export slice-percent/1 (-> Percentage (Value Slice)) @@ -1059,7 +1059,7 @@ (def: #export image (-> URL (Value Image)) - (|>> %t + (|>> %.text (list) (..apply "url"))) @@ -1139,7 +1139,7 @@ (def: #export text (-> Text (Value Content)) - (|>> %t :abstraction)) + (|>> %.text :abstraction)) (def: #export attribute (-> Label (Value Content)) @@ -1158,7 +1158,7 @@ [monospace "monospace"]] [(def: #export font (-> Text Font) - (|>> %t :abstraction)) + (|>> %.text :abstraction)) (def: #export (font-family options) (-> (List Font) (Value Font)) @@ -1195,7 +1195,7 @@ (def: #export grid-span (-> Nat (Value Grid-Span)) - (|>> %n (format "span ") :abstraction)) + (|>> %.nat (format "span ") :abstraction)) (def: grid-column-separator " ") (def: grid-row-separator " ") @@ -1213,11 +1213,11 @@ (def: #export (resolution dpi) (-> Nat (Value Resolution)) - (:abstraction (format (%n dpi) "dpi"))) + (:abstraction (format (%.nat dpi) "dpi"))) (def: #export (ratio numerator denominator) (-> Nat Nat (Value Ratio)) - (:abstraction (format (%n numerator) "/" (%n denominator)))) + (:abstraction (format (%.nat numerator) "/" (%.nat denominator)))) (enumeration: Quote Text quote-text @@ -1241,7 +1241,7 @@ (def: #export (quotes [left0 right0] [left1 right1]) (-> [Quote Quote] [Quote Quote] (Value Quotes)) (|> (list left0 right0 left1 right1) - (list;map (|>> ..quote-text %t)) + (list;map (|>> ..quote-text %.text)) (text.join-with ..quote-separator) :abstraction)) @@ -1328,8 +1328,8 @@ (def: #export (z-index index) (-> Int (Value Z-Index)) (:abstraction (if (i/< +0 index) - (%i index) - (%n (.nat index))))) + (%.int index) + (%.nat (.nat index))))) (multi: multi-image Image ",") (multi: multi-shadow Shadow ",") diff --git a/stdlib/source/lux/data/format/html.lux b/stdlib/source/lux/data/format/html.lux index 01b7d9df1..92d1b22e4 100644 --- a/stdlib/source/lux/data/format/html.lux +++ b/stdlib/source/lux/data/format/html.lux @@ -5,7 +5,7 @@ ["." product] ["." maybe ("#@." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [type @@ -229,7 +229,7 @@ (def: (%coord [horizontal vertical]) (Format Coord) - (format (%n horizontal) ..metric-separator (%n vertical))) + (format (%.nat horizontal) ..metric-separator (%.nat vertical))) (type: #export Rectangle {#start Coord @@ -251,7 +251,7 @@ (def: (%circle [center radius]) (Format Circle) - (format (%coord center) ..metric-separator (%n radius))) + (format (%coord center) ..metric-separator (%.nat radius))) (def: (%polygon [first second third extra]) (Format Polygon) diff --git a/stdlib/source/lux/data/format/markdown.lux b/stdlib/source/lux/data/format/markdown.lux index b5dcbc46f..fe20f30b2 100644 --- a/stdlib/source/lux/data/format/markdown.lux +++ b/stdlib/source/lux/data/format/markdown.lux @@ -2,7 +2,7 @@ [lux (#- and) [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [type @@ -108,7 +108,7 @@ (Markdown Block)) (|>> list.enumerate (list;map (function (_ [idx [summary detail]]) - (format (%n (inc idx)) ". " (:representation summary) text.new-line + (format (%.nat (inc idx)) ". " (:representation summary) text.new-line (case detail (#.Some detail) (|> detail :representation ..indent (text.enclose [text.new-line text.new-line])) diff --git a/stdlib/source/lux/data/text/buffer.lux b/stdlib/source/lux/data/text/buffer.lux index 7549b1be1..89aaebece 100644 --- a/stdlib/source/lux/data/text/buffer.lux +++ b/stdlib/source/lux/data/text/buffer.lux @@ -3,7 +3,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." row (#+ Row) ("#;." fold)]]] [compiler diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux index 3da3fa548..a6dd67617 100644 --- a/stdlib/source/lux/data/text/format.lux +++ b/stdlib/source/lux/data/text/format.lux @@ -1,5 +1,5 @@ (.module: - [lux #* + [lux (#- list nat int rev type) [abstract [monad (#+ do)]] [control @@ -33,8 +33,8 @@ (syntax: #export (format {fragments (p.many s.any)}) {#.doc (doc "Text interpolation." - (format "Static part " (%t static) " does not match URI: " uri))} - (wrap (list (` ($_ "lux text concat" (~+ fragments)))))) + (format "Static part " (text static) " does not match URI: " uri))} + (wrap (.list (` ($_ "lux text concat" (~+ fragments)))))) (type: #export (Format a) {#.doc "A way to produce readable text from values."} @@ -45,41 +45,41 @@ (Format ) )] - [%b Bit (:: bit.codec encode)] - [%n Nat (:: nat.decimal encode)] - [%i Int (:: int.decimal encode)] - [%r Rev (:: rev.decimal encode)] - [%f Frac (:: frac.decimal encode)] - [%ratio ratio.Ratio (:: ratio.codec encode)] - [%t Text text.encode] - [%name Name (:: name.codec encode)] - [%code Code code.to-text] - [%type Type type.to-text] - [%bin Nat (:: nat.binary encode)] - [%oct Nat (:: nat.octal encode)] - [%hex Nat (:: nat.hex encode)] - [%xml xml.XML (:: xml.codec encode)] - [%json json.JSON (:: json.codec encode)] - [%instant instant.Instant instant.to-text] - [%date date.Date (:: date.codec encode)] + [bit Bit (:: bit.codec encode)] + [nat Nat (:: nat.decimal encode)] + [int Int (:: int.decimal encode)] + [rev Rev (:: rev.decimal encode)] + [frac Frac (:: frac.decimal encode)] + [ratio ratio.Ratio (:: ratio.codec encode)] + [text Text text.encode] + [name Name (:: name.codec encode)] + [code Code code.to-text] + [type Type type.to-text] + [bin Nat (:: nat.binary encode)] + [oct Nat (:: nat.octal encode)] + [hex Nat (:: nat.hex encode)] + [xml xml.XML (:: xml.codec encode)] + [json json.JSON (:: json.codec encode)] + [instant instant.Instant instant.to-text] + [date date.Date (:: date.codec encode)] ) -(def: #export %duration +(def: #export duration (Format duration.Duration) duration.encode) -(def: #export (%cursor [file line column]) +(def: #export (cursor [file line column]) (Format Cursor) - (|> (list (%t file) (%n line) (%n column)) + (|> (.list (..text file) (..nat line) (..nat column)) (text.join-with ", ") (text.enclose ["[" "]"]))) -(def: #export (%mod modular) +(def: #export (mod modular) (All [m] (Format (modular.Mod m))) (let [[_ modulus] (modular.un-mod modular)] (:: (modular.codec modulus) encode modular))) -(def: #export (%list formatter) +(def: #export (list formatter) (All [a] (-> (Format a) (Format (List a)))) (|>> (list@map (|>> formatter (format " "))) (text.join-with "") diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index 964c90613..ca5b98c89 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -18,7 +18,7 @@ ["." code] [syntax (#+ syntax:)]]] ["." // - format]) + ["%" format (#+ format)]]) (def: regex-char^ (Parser Text) diff --git a/stdlib/source/lux/debug.lux b/stdlib/source/lux/debug.lux index 316617d84..6a4c208fa 100644 --- a/stdlib/source/lux/debug.lux +++ b/stdlib/source/lux/debug.lux @@ -14,7 +14,7 @@ [data ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [format [xml (#+ XML)] ["." json]] @@ -79,10 +79,10 @@ (`` (|> value (~~ (template.splice )))) #.None)] - [java/lang/Boolean [(:coerce .Bit) %b]] - [java/lang/String [(:coerce .Text) %t]] - [java/lang/Long [(:coerce .Int) %i]] - [java/lang/Number [java/lang/Number::doubleValue %f]] + [java/lang/Boolean [(:coerce .Bit) %.bit]] + [java/lang/String [(:coerce .Text) %.text]] + [java/lang/Long [(:coerce .Int) %.int]] + [java/lang/Number [java/lang/Number::doubleValue %.frac]] )) (case (host.check [java/lang/Object] object) (#.Some value) @@ -98,8 +98,8 @@ (let [last? (case last? (#.Some _) #1 #.None #0)] - (|> (format (%n (.nat (java/lang/Integer::longValue tag))) - " " (%b last?) + (|> (format (%.nat (.nat (java/lang/Integer::longValue tag))) + " " (%.bit last?) " " (inspect choice)) (text.enclose ["(" ")"]))) @@ -118,7 +118,7 @@ (^template [ ] (`` (|> value (~~ (template.splice ))))) - (["boolean" [(:coerce .Bit) %b]] + (["boolean" [(:coerce .Bit) %.bit]] ["string" [(:coerce .Text) %t]] ["number" [(:coerce .Frac) %f]] ["undefined" [JSON::stringify]]) @@ -131,13 +131,13 @@ ("js object undefined?" variant-flag) ("js object undefined?" variant-value))) (|> (format (JSON::stringify variant-tag) - " " (%b (not ("js object null?" variant-flag))) + " " (%.bit (not ("js object null?" variant-flag))) " " (inspect variant-value)) (text.enclose ["(" ")"])) (not (or ("js object undefined?" ("js object get" "_lux_low" value)) ("js object undefined?" ("js object get" "_lux_high" value)))) - (|> value (:coerce .Int) %i) + (|> value (:coerce .Int) %.int) (Array::isArray value) (inspect-tuple inspect value) @@ -151,7 +151,7 @@ (exception: #export (cannot-represent-value {type Type}) (exception.report - ["Type" (%type type)])) + ["Type" (%.type type)])) (type: Representation (-> Any Text)) @@ -167,12 +167,12 @@ [_ (.sub )] (wrap (|>> (:coerce ) )))] - [Bit %b] - [Nat %n] - [Int %i] - [Rev %r] - [Frac %f] - [Text %t]))))) + [Bit %.bit] + [Nat %.nat] + [Int %.int] + [Rev %.rev] + [Frac %.frac] + [Text %.text]))))) (def: (special-representation representation) (-> (Parser Representation) (Parser Representation)) @@ -182,18 +182,18 @@ [_ (.sub )] (wrap (|>> (:coerce ) )))] - [Type %type] - [Code %code] - [Instant %instant] - [Duration %duration] - [Date %date] - [json.JSON %json] - [XML %xml])) + [Type %.type] + [Code %.code] + [Instant %.instant] + [Duration %.duration] + [Date %.date] + [json.JSON %.json] + [XML %.xml])) (do <>.monad [[_ elemT] (.apply (<>.and (.exactly List) .any)) elemR (.local (list elemT) representation)] - (wrap (|>> (:coerce (List Any)) (%list elemR)))) + (wrap (|>> (:coerce (List Any)) (%.list elemR)))) (do <>.monad [[_ elemT] (.apply (<>.and (.exactly Maybe) .any)) @@ -229,7 +229,7 @@ _ (undefined)))] - (format "(" (%n lefts) " " (%b right?) " " sub-repr ")")))))) + (format "(" (%.nat lefts) " " (%.bit right?) " " sub-repr ")")))))) (def: (tuple-representation representation) (-> (Parser Representation) (Parser Representation)) diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux index 7e0f64e4d..cf7902a8f 100644 --- a/stdlib/source/lux/host.js.lux +++ b/stdlib/source/lux/host.js.lux @@ -9,7 +9,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [type @@ -105,7 +105,7 @@ (-> (List Nullable) (List [Bit Code])) (|>> list.enumerate (list@map (function (_ [idx [nullable? type]]) - [nullable? (|> idx %n code.local-identifier)])))) + [nullable? (|> idx %.nat code.local-identifier)])))) (def: (nullable-type [nullable? type]) (-> Nullable Code) diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index d4eb214e7..eeefb361d 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -16,7 +16,7 @@ ["." bit ("#@." codec)] number ["." text ("#@." equivalence monoid) - format] + ["%" format (#+ format)]] [collection ["." array (#+ Array)] ["." list ("#@." monad fold monoid)] diff --git a/stdlib/source/lux/host.old.lux b/stdlib/source/lux/host.old.lux index 1f92a4a3b..abda3863a 100644 --- a/stdlib/source/lux/host.old.lux +++ b/stdlib/source/lux/host.old.lux @@ -15,7 +15,7 @@ ["." bit ("#@." codec)] number ["." text ("#@." equivalence monoid) - format] + ["%" format (#+ format)]] [collection ["." array (#+ Array)] ["." list ("#@." monad fold monoid)]]] diff --git a/stdlib/source/lux/locale.lux b/stdlib/source/lux/locale.lux index 1d6a4385f..d4bcb2c94 100644 --- a/stdlib/source/lux/locale.lux +++ b/stdlib/source/lux/locale.lux @@ -5,7 +5,7 @@ [hash (#+ Hash)]] [data ["." text - format + ["%" format (#+ format)] ["." encoding (#+ Encoding)]]] [type abstract] diff --git a/stdlib/source/lux/macro/poly/equivalence.lux b/stdlib/source/lux/macro/poly/equivalence.lux index fc1e579a2..159593800 100644 --- a/stdlib/source/lux/macro/poly/equivalence.lux +++ b/stdlib/source/lux/macro/poly/equivalence.lux @@ -17,7 +17,7 @@ ["." rev] ["." frac]] ["." text ("#@." monoid) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." monad)] ["." row] @@ -157,6 +157,6 @@ .recursive-call ## If all else fails... (|> .any - (:: @ map (|>> %type (format "Cannot create Equivalence for: ") p.fail)) + (:: @ map (|>> %.type (format "Cannot create Equivalence for: ") p.fail)) (:: @ join)) )))) diff --git a/stdlib/source/lux/macro/poly/functor.lux b/stdlib/source/lux/macro/poly/functor.lux index 0de5009fd..e7a7c8b4a 100644 --- a/stdlib/source/lux/macro/poly/functor.lux +++ b/stdlib/source/lux/macro/poly/functor.lux @@ -10,7 +10,7 @@ [data ["." product] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monad monoid)]]] ["." macro @@ -34,7 +34,7 @@ (function (_ unwrappedT) (if (n/= 1 num-vars) (` ((~! functor.Functor) (~ (poly.to-code *env* unwrappedT)))) - (let [paramsC (|> num-vars dec list.indices (list;map (|>> %n code.local-identifier)))] + (let [paramsC (|> num-vars dec list.indices (list;map (|>> %.nat code.local-identifier)))] (` (All [(~+ paramsC)] ((~! functor.Functor) ((~ (poly.to-code *env* unwrappedT)) (~+ paramsC))))))))) Arg (: (-> Code (.Parser Code)) @@ -60,7 +60,7 @@ (.tuple (loop [idx 0 pairsCC (: (List [Code Code]) (list))] - (p.either (let [slotC (|> idx %n (format "____________slot") code.local-identifier)] + (p.either (let [slotC (|> idx %.nat (format "____________slot") code.local-identifier)] (do @ [_ (wrap []) memberC (Arg slotC)] @@ -79,7 +79,7 @@ (Arg outL)) #let [inC+ (|> (list.size inT+) list.indices - (list;map (|>> %n (format "____________inC") code.local-identifier)))]] + (list;map (|>> %.nat (format "____________inC") code.local-identifier)))]] (wrap (` (function ((~ g!) (~+ inC+)) (let [(~ outL) ((~ valueC) (~+ inC+))] (~ outC)))))) @@ -95,7 +95,7 @@ [_ _ outputC] (: (.Parser [Code (List Code) Code]) (p.either (.polymorphic (Arg inputC)) - (p.fail (format "Cannot create Functor for: " (%type inputT)))))] + (p.fail (format "Cannot create Functor for: " (%.type inputT)))))] (wrap (` (: (~ (@Functor inputT)) (structure (def: ((~' map) (~ funcC) (~ inputC)) (~ outputC)))))))) diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index a967b4097..e9e11091a 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -21,7 +21,7 @@ ["." nat ("#@." decimal)] ["." frac ("#@." decimal)]] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] [format ["/" json (#+ JSON)]] [collection diff --git a/stdlib/source/lux/target/common-lisp.lux b/stdlib/source/lux/target/common-lisp.lux index dc8694dc9..57b22300b 100644 --- a/stdlib/source/lux/target/common-lisp.lux +++ b/stdlib/source/lux/target/common-lisp.lux @@ -6,7 +6,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." monad fold)]]] [macro @@ -79,7 +79,7 @@ (def: #export int (-> Int Literal) - (|>> %i :abstraction)) + (|>> %.int :abstraction)) (def: #export float (-> Frac Literal) @@ -93,7 +93,7 @@ [(new> "(/ 0.0 0.0)" [])] ## else - [%f]) + [%.frac]) :abstraction)) (def: #export (double value) @@ -109,7 +109,7 @@ "(/ 0.0d0 0.0d0)" ## else - (.let [raw (%f value)] + (.let [raw (%.frac value)] (.if (text.contains? "E" raw) (text.replace-once "E" "d" raw) (format raw "d0")))))) diff --git a/stdlib/source/lux/target/js.lux b/stdlib/source/lux/target/js.lux index e0912251c..d00a44b84 100644 --- a/stdlib/source/lux/target/js.lux +++ b/stdlib/source/lux/target/js.lux @@ -6,7 +6,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -74,7 +74,7 @@ "-Infinity" ## else - (|> value %f ..argument)))) + (|> value %.frac ..argument)))) (def: sanitize (-> Text Text) @@ -242,14 +242,14 @@ (:abstraction (..argument (format ( value) "|0"))))] [to-i32 Expression :representation] - [i32 Int %i] + [i32 Int %.int] ) (def: #export (int value) (-> Int Literal) (:abstraction (.if (i/< +0 value) - (%i value) - (%n (.nat value))))) + (%.int value) + (%.nat (.nat value))))) (def: #export (? test then else) (-> Expression Expression Expression Computation) diff --git a/stdlib/source/lux/target/jvm/constant/pool.lux b/stdlib/source/lux/target/jvm/constant/pool.lux index 8fbf5550e..c267eb7f4 100644 --- a/stdlib/source/lux/target/jvm/constant/pool.lux +++ b/stdlib/source/lux/target/jvm/constant/pool.lux @@ -58,14 +58,14 @@ (exception: #export (invalid-index {index (Index Any)} {maximum Nat}) (exception.report - ["Index" (|> index !raw-index %.%n)] - ["Maximum" (%.%n maximum)])) + ["Index" (|> index !raw-index %.nat)] + ["Maximum" (%.nat maximum)])) (exception: #export (invalid-constant {index (Index Any)} {tag Name}) (exception.report - ["Index" (|> index !raw-index %.%n)] - ["Expected tag" (%.%name tag)])) + ["Index" (|> index !raw-index %.nat)] + ["Expected tag" (%.name tag)])) (template: (!fetch ) (function (_ pool) @@ -84,7 +84,7 @@ (exception: #export (cannot-find {tag Name} {value Text}) (exception.report - ["Expected tag" (%.%name tag)] + ["Expected tag" (%.name tag)] ["Value" value])) (template: (!find <=> <%> ) @@ -127,7 +127,7 @@ (def: #export (find-utf8 reference) (Finder UTF8) - (!find #//.UTF8 text;= %.%t reference)) + (!find #//.UTF8 text;= %.text reference)) (def: (class' value) (Adder Class) diff --git a/stdlib/source/lux/target/jvm/descriptor.lux b/stdlib/source/lux/target/jvm/descriptor.lux index c98a4b853..992b6a0de 100644 --- a/stdlib/source/lux/target/jvm/descriptor.lux +++ b/stdlib/source/lux/target/jvm/descriptor.lux @@ -2,7 +2,7 @@ [lux (#- int char) [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [macro diff --git a/stdlib/source/lux/target/jvm/loader.lux b/stdlib/source/lux/target/jvm/loader.lux index 5aa4bc271..d8cb567e7 100644 --- a/stdlib/source/lux/target/jvm/loader.lux +++ b/stdlib/source/lux/target/jvm/loader.lux @@ -11,7 +11,7 @@ [data ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [collection ["." array] ["." list ("#;." functor)] diff --git a/stdlib/source/lux/target/jvm/reflection.lux b/stdlib/source/lux/target/jvm/reflection.lux index 090c5948f..25ecffdf9 100644 --- a/stdlib/source/lux/target/jvm/reflection.lux +++ b/stdlib/source/lux/target/jvm/reflection.lux @@ -11,7 +11,7 @@ [data ["." error (#+ Error)] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." fold functor)] ["." array] @@ -86,7 +86,7 @@ (exception: #export (unknown-class {class Text}) (exception.report - ["Class" (%t class)])) + ["Class" (%.text class)])) (template [] [(exception: #export ( {jvm-type java/lang/reflect/Type}) @@ -239,21 +239,21 @@ {type Type}) (exception.report ["Class" (java/lang/Object::toString class)] - ["Type" (%type type)])) + ["Type" (%.type type)])) (exception: #export (type-parameter-mismatch {expected Nat} {actual Nat} {class (java/lang/Class java/lang/Object)} {type Type}) (exception.report - ["Expected" (%n expected)] - ["Actual" (%n actual)] + ["Expected" (%.nat expected)] + ["Actual" (%.nat actual)] ["Class" (java/lang/Object::toString class)] - ["Type" (%type type)])) + ["Type" (%.type type)])) (exception: #export (non-jvm-type {type Type}) (exception.report - ["Type" (%type type)])) + ["Type" (%.type type)])) (def: #export (correspond class type) (-> (java/lang/Class java/lang/Object) Type (Error Mapping)) @@ -301,7 +301,7 @@ [(exception: #export ( {field Text} {class (java/lang/Class java/lang/Object)}) (exception.report - ["Field" (%t field)] + ["Field" (%.text field)] ["Class" (java/lang/Object::toString class)]))] [unknown-field] diff --git a/stdlib/source/lux/target/jvm/type.lux b/stdlib/source/lux/target/jvm/type.lux index 19289a5d0..09906deca 100644 --- a/stdlib/source/lux/target/jvm/type.lux +++ b/stdlib/source/lux/target/jvm/type.lux @@ -11,7 +11,7 @@ ["." product] ["." maybe ("#@." functor)] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]]]) diff --git a/stdlib/source/lux/target/jvm/type/lux.lux b/stdlib/source/lux/target/jvm/type/lux.lux index 547c388b7..cc207e1d6 100644 --- a/stdlib/source/lux/target/jvm/type/lux.lux +++ b/stdlib/source/lux/target/jvm/type/lux.lux @@ -6,7 +6,7 @@ ["." exception (#+ exception:)]] [data ["." text - format] + ["%" format (#+ format)]] [collection [array (#+ Array)] ["." dictionary (#+ Dictionary)]]] @@ -31,7 +31,7 @@ (exception: #export (unknown-var {var //.Var}) (exception.report - ["Var" (%t var)])) + ["Var" (%.text var)])) (def: (generic mapping input) (-> Mapping //.Generic (Check Type)) diff --git a/stdlib/source/lux/target/lua.lux b/stdlib/source/lux/target/lua.lux index 8dde357cc..d9907dbc4 100644 --- a/stdlib/source/lux/target/lua.lux +++ b/stdlib/source/lux/target/lua.lux @@ -8,7 +8,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -74,8 +74,8 @@ (def: #export (int value) (-> Int Literal) (:abstraction (.if (i/< +0 value) - (%i value) - (%n (.nat value))))) + (%.int value) + (%.nat (.nat value))))) (def: #export float (-> Frac Literal) @@ -89,7 +89,7 @@ [(new> "(0.0/0.0)" [])] ## else - [%f]) + [%.frac]) :abstraction)) (def: sanitize diff --git a/stdlib/source/lux/target/php.lux b/stdlib/source/lux/target/php.lux index 46689fd29..198a1de75 100644 --- a/stdlib/source/lux/target/php.lux +++ b/stdlib/source/lux/target/php.lux @@ -6,7 +6,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -97,7 +97,7 @@ (def: #export int (-> Int Literal) - (|>> %i :abstraction)) + (|>> %.int :abstraction)) (def: #export float (-> Frac Literal) @@ -111,7 +111,7 @@ [(new> "NAN" [])] ## else - [%f]) + [%.frac]) :abstraction)) (def: sanitize diff --git a/stdlib/source/lux/target/python.lux b/stdlib/source/lux/target/python.lux index 80f6b12de..31cdd851d 100644 --- a/stdlib/source/lux/target/python.lux +++ b/stdlib/source/lux/target/python.lux @@ -8,7 +8,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -97,11 +97,11 @@ (def: #export int (-> Int Literal) - (|>> %i :abstraction)) + (|>> %.int :abstraction)) (def: #export (long value) (-> Int Literal) - (:abstraction (format (%i value) "L"))) + (:abstraction (format (%.int value) "L"))) (def: #export float (-> Frac Literal) @@ -115,7 +115,7 @@ )) ## else - [%f]) + [%.frac]) :abstraction))) (def: sanitize @@ -397,7 +397,7 @@ 0 (.list) _ (|> (dec arity) (list.n/range 0) - (list@map (|>> %n code.local-identifier)))))) + (list@map (|>> %.nat code.local-identifier)))))) (syntax: (arity-types {arity s.nat}) (wrap (list.repeat arity (` (Expression Any))))) diff --git a/stdlib/source/lux/target/ruby.lux b/stdlib/source/lux/target/ruby.lux index f82b5c92a..01c97bf8a 100644 --- a/stdlib/source/lux/target/ruby.lux +++ b/stdlib/source/lux/target/ruby.lux @@ -6,7 +6,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -145,8 +145,8 @@ (-> Literal) (|>> :abstraction))] - [%i int Int (<|)] - [%t string Text ..sanitize] + [%.int int Int (<|)] + [%.text string Text ..sanitize] ) (def: #export float @@ -161,7 +161,7 @@ [(new> "(+0.0/-0.0)" [])] ## else - [%f]) + [%.frac]) :abstraction)) (def: #export (array-range from to array) diff --git a/stdlib/source/lux/target/scheme.lux b/stdlib/source/lux/target/scheme.lux index 652eb65ef..652771c1c 100644 --- a/stdlib/source/lux/target/scheme.lux +++ b/stdlib/source/lux/target/scheme.lux @@ -6,7 +6,7 @@ [number ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)]]] [macro @@ -78,7 +78,7 @@ (def: #export int (-> Int Computation) - (|>> %i :abstraction)) + (|>> %.int :abstraction)) (def: #export float (-> Frac Computation) @@ -92,7 +92,7 @@ [(new> "+nan.0" [])] ## else - [%f]) + [%.frac]) :abstraction)) (def: #export positive-infinity Computation (..float frac.positive-infinity)) @@ -117,7 +117,7 @@ (def: #export string (-> Text Computation) - (|>> ..sanitize %t :abstraction)) + (|>> ..sanitize %.text :abstraction)) (def: #export symbol (-> Text Computation) diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index 8bf74ff49..ccb79d61d 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -10,7 +10,7 @@ [data ["." product] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [time @@ -111,7 +111,7 @@ (def: (times-failure seed documentation) (-> Seed Text Text) (format documentation ..separator ..separator - "Failed with this seed: " (%n seed))) + "Failed with this seed: " (%.nat seed))) (exception: #export (must-try-test-at-least-once) "") @@ -138,9 +138,9 @@ (-> Counters Text) (let [successes (get@ #successes counters) failures (get@ #failures counters)] - (ex.report ["Tests" (%n (n/+ successes failures))] - ["Successes" (%n successes)] - ["Failures" (%n failures)]))) + (ex.report ["Tests" (%.nat (n/+ successes failures))] + ["Successes" (%.nat successes)] + ["Failures" (%.nat failures)]))) (def: failure-exit-code -1) (def: success-exit-code +0) @@ -155,7 +155,7 @@ post (promise.future instant.now) #let [duration (instant.span pre post) _ (log! (format documentation text.new-line text.new-line - "(" (%duration duration) ")" text.new-line + "(" (%.duration duration) ")" text.new-line (tally counters)))]] (promise.future (io.exit (case (get@ #failures counters) 0 ..success-exit-code diff --git a/stdlib/source/lux/tool/compiler/analysis.lux b/stdlib/source/lux/tool/compiler/analysis.lux index 998306d4a..05bb2be01 100644 --- a/stdlib/source/lux/tool/compiler/analysis.lux +++ b/stdlib/source/lux/tool/compiler/analysis.lux @@ -10,7 +10,7 @@ ["." error] ["." maybe] ["." text ("#@." equivalence) - format] + ["%" format (#+ Format format)]] [collection ["." list ("#@." functor fold)]]]] [// @@ -181,17 +181,17 @@ (^template [ ] ( value) ( value)) - ([#Bit %b] - [#Nat %n] - [#Int %i] - [#Rev %r] - [#Frac %f] - [#Text %t])) + ([#Bit %.bit] + [#Nat %.nat] + [#Int %.int] + [#Rev %.rev] + [#Frac %.frac] + [#Text %.text])) (#Structure structure) (case structure (#Variant [lefts right? value]) - (format "(" (%n lefts) " " (%b right?) " " (%analysis value) ")") + (format "(" (%.nat lefts) " " (%.bit right?) " " (%analysis value) ")") (#Tuple members) (|> members @@ -205,7 +205,7 @@ (reference.%variable variable) (#reference.Constant constant) - (%name constant)) + (%.name constant)) (#Case analysis match) "{?}" @@ -231,7 +231,7 @@ (|> parameters (list@map %analysis) (text.join-with " ") - (format (%t name) " ") + (format (%.text name) " ") (text.enclose ["(" ")"])))) (template [ ] @@ -307,7 +307,7 @@ (def: (locate-error cursor error) (-> Cursor Text Text) - (format "@ " (%cursor cursor) text.new-line + (format "@ " (%.cursor cursor) text.new-line error)) (def: #export (fail error) diff --git a/stdlib/source/lux/tool/compiler/default/evaluation.lux b/stdlib/source/lux/tool/compiler/default/evaluation.lux index 55b20805f..72065a3c8 100644 --- a/stdlib/source/lux/tool/compiler/default/evaluation.lux +++ b/stdlib/source/lux/tool/compiler/default/evaluation.lux @@ -5,7 +5,7 @@ [data ["." error] [text - format]]] + ["%" format (#+ format)]]]] [/// ["." phase [macro (#+ Expander)] @@ -37,4 +37,4 @@ (phase.run generation-state (do phase.monad [exprO (generate exprS)] - (generation.evaluate! (format "eval" (%n count)) exprO))))))))) + (generation.evaluate! (format "eval" (%.nat count)) exprO))))))))) diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux index 1a8d10474..f59a171dd 100644 --- a/stdlib/source/lux/tool/compiler/default/init.lux +++ b/stdlib/source/lux/tool/compiler/default/init.lux @@ -7,8 +7,7 @@ [data ["." product] ["." error (#+ Error)] - ["." text ("#@." hash) - format] + ["." text ("#@." hash)] [collection ["." list ("#@." functor)] ["." dictionary] diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux index 3e086e813..ab24a52a7 100644 --- a/stdlib/source/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/lux/tool/compiler/default/platform.lux @@ -8,7 +8,7 @@ ["." product] ["." error (#+ Error)] [text - format] + ["%" format (#+ format)]] [collection ["." list]]] [world @@ -49,7 +49,7 @@ ## (dictionary.entries outputs))] ## (&io.write target-dir ## (format module-name "/" cache.descriptor-name) -## (encoding.to-utf8 (%code (cache/description.write file-name module)))))) +## (encoding.to-utf8 (%.code (cache/description.write file-name module)))))) (with-expansions [ (as-is [! anchor expression statement]) (as-is (Platform ! anchor expression statement)) diff --git a/stdlib/source/lux/tool/compiler/default/syntax.lux b/stdlib/source/lux/tool/compiler/default/syntax.lux index e37ade4f9..d9a82695b 100644 --- a/stdlib/source/lux/tool/compiler/default/syntax.lux +++ b/stdlib/source/lux/tool/compiler/default/syntax.lux @@ -41,7 +41,7 @@ ["." rev] ["." frac]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list] ["." dictionary (#+ Dictionary)]]] @@ -129,7 +129,7 @@ (exception: #export (end-of-file {module Text}) (exception.report - ["Module" (%t module)])) + ["Module" (%.text module)])) (def: amount-of-input-shown 64) @@ -141,18 +141,18 @@ (exception: #export (unrecognized-input {[file line column] Cursor} {context Text} {input Text} {offset Offset}) (exception.report ["File" file] - ["Line" (%n line)] - ["Column" (%n column)] - ["Context" (%t context)] + ["Line" (%.nat line)] + ["Column" (%.nat column)] + ["Context" (%.text context)] ["Input" (input-at offset input)])) (exception: #export (text-cannot-contain-new-lines {text Text}) (exception.report - ["Text" (%t text)])) + ["Text" (%.text text)])) (template: (!failure parser where offset source-code) (#.Left [[where offset source-code] - (exception.construct unrecognized-input [where (%name (name-of parser)) source-code offset])])) + (exception.construct unrecognized-input [where (%.name (name-of parser)) source-code offset])])) (template: (!end-of-file where offset source-code current-module) (#.Left [[where offset source-code] diff --git a/stdlib/source/lux/tool/compiler/meta/archive.lux b/stdlib/source/lux/tool/compiler/meta/archive.lux index 46a6ce0a6..9953a7b2f 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive.lux @@ -8,8 +8,7 @@ [data ["." error (#+ Error)] ["." name] - ["." text - format] + ["." text] [collection ["." dictionary (#+ Dictionary)]]] [type diff --git a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux index 7c9f0cbe2..c9e1818fd 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/signature.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/signature.lux @@ -5,7 +5,7 @@ [data ["." name] ["." text - format]]] + ["%" format (#+ format)]]]] [//// [default (#+ Version)]]) @@ -19,4 +19,4 @@ (def: #export (description signature) (-> Signature Text) - (format (%name (get@ #name signature)) " " (get@ #version signature))) + (format (%.name (get@ #name signature)) " " (get@ #version signature))) diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux index f9b01a682..bad568cb6 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux @@ -6,7 +6,7 @@ [data ["." error] ["." text - format]] + ["%" format (#+ format)]]] [world ["." file (#+ File System)] [binary (#+ Binary)]]] diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux index 454487cce..7ee9c063d 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux @@ -10,7 +10,7 @@ [data ["." error (#+ Error)] ["." text ("#;." hash) - format + ["%" format (#+ format)] ["." encoding]]] [world ["." file (#+ Path File)] diff --git a/stdlib/source/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/lux/tool/compiler/meta/packager/script.lux index 2b93fc311..5693b59be 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager/script.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager/script.lux @@ -5,7 +5,6 @@ [data ["." product] ["." text - format ["." encoding]] [collection ["." row] diff --git a/stdlib/source/lux/tool/compiler/name.lux b/stdlib/source/lux/tool/compiler/name.lux index 093d934cb..16a8d4786 100644 --- a/stdlib/source/lux/tool/compiler/name.lux +++ b/stdlib/source/lux/tool/compiler/name.lux @@ -3,7 +3,7 @@ [data ["." maybe] ["." text - format]]]) + ["%" format (#+ format)]]]]) (`` (template: (!sanitize char) ("lux syntax char case!" char diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux index 6137e9fd6..7107ac9da 100644 --- a/stdlib/source/lux/tool/compiler/phase.lux +++ b/stdlib/source/lux/tool/compiler/phase.lux @@ -12,7 +12,7 @@ ["." product] ["." error (#+ Error) ("#@." functor)] ["." text - format]] + ["%" format (#+ format)]]] [time ["." instant] ["." duration]] @@ -108,6 +108,6 @@ io.run instant.relative (duration.difference (instant.relative pre)) - %duration - (format (%name definition) " [" description "]: ")))]] + %.duration + (format (%.name definition) " [" description "]: ")))]] (wrap output))) diff --git a/stdlib/source/lux/tool/compiler/phase/analysis.lux b/stdlib/source/lux/tool/compiler/phase/analysis.lux index dd21c8a1e..9281046c1 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis.lux @@ -7,7 +7,7 @@ [data ["." error] [text - format]] + ["%" format (#+ format)]]] ["." macro]] ["." / #_ ["#." type] @@ -24,7 +24,7 @@ ["/" analysis (#+ Analysis Operation Phase)]]]]) (exception: #export (unrecognized-syntax {code Code}) - (ex.report ["Code" (%code code)])) + (ex.report ["Code" (%.code code)])) ## TODO: Had to split the 'compile' function due to compilation issues ## with old-luxc. Must re-combine all the code ASAP diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux index 4846b8f54..85be37a90 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux @@ -9,7 +9,7 @@ ["." error] ["." maybe] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." fold monoid functor)]]] ["." type @@ -28,22 +28,22 @@ ["#." coverage (#+ Coverage)]]) (exception: #export (cannot-match-with-pattern {type Type} {pattern Code}) - (ex.report ["Type" (%type type)] - ["Pattern" (%code pattern)])) + (ex.report ["Type" (%.type type)] + ["Pattern" (%.code pattern)])) (exception: #export (sum-has-no-case {case Nat} {type Type}) - (ex.report ["Case" (%n case)] - ["Type" (%type type)])) + (ex.report ["Case" (%.nat case)] + ["Type" (%.type type)])) (exception: #export (not-a-pattern {code Code}) - (ex.report ["Code" (%code code)])) + (ex.report ["Code" (%.code code)])) (exception: #export (cannot-simplify-for-pattern-matching {type Type}) - (ex.report ["Type" (%type type)])) + (ex.report ["Type" (%.type type)])) (exception: #export (non-exhaustive-pattern-matching {input Code} {branches (List [Code Code])} {coverage Coverage}) - (ex.report ["Input" (%code input)] - ["Branches" (%code (code.record branches))] + (ex.report ["Input" (%.code input)] + ["Branches" (%.code (code.record branches))] ["Coverage" (/coverage.%coverage coverage)])) (exception: #export (cannot-have-empty-branches {message Text}) diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux b/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux index 3444a5355..067ce0972 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/case/coverage.lux @@ -12,7 +12,7 @@ [number ["." nat]] ["." text - format] + ["%" format (#+ Format format)]] [collection ["." list ("#@." functor fold)] ["." dictionary (#+ Dictionary)]]]] @@ -68,17 +68,17 @@ (#Bit value') (|> value' - %b + %.bit (text.enclose ["(#Bit " ")"])) (#Variant ?max-cases cases) (|> cases dictionary.entries (list@map (function (_ [idx coverage]) - (format (%n idx) " " (%coverage coverage)))) + (format (%.nat idx) " " (%coverage coverage)))) (text.join-with " ") (text.enclose ["{" "}"]) - (format (%n (..cases ?max-cases)) " ") + (format (%.nat (..cases ?max-cases)) " ") (text.enclose ["(#Variant " ")"])) (#Seq left right) @@ -206,8 +206,8 @@ (open: "coverage/." ..equivalence) (exception: #export (variants-do-not-match {addition-cases Nat} {so-far-cases Nat}) - (ex.report ["So-far Cases" (%n so-far-cases)] - ["Addition Cases" (%n addition-cases)])) + (ex.report ["So-far Cases" (%.nat so-far-cases)] + ["Addition Cases" (%.nat addition-cases)])) ## After determining the coverage of each individual pattern, it is ## necessary to merge them all to figure out if the entire diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux index 76effa0dc..5e5e26b85 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux @@ -7,7 +7,7 @@ [data ["." maybe] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." fold monoid monad)]]] ["." type @@ -23,18 +23,18 @@ ["/" analysis (#+ Analysis Operation Phase)]]]]) (exception: #export (cannot-analyse {expected Type} {function Text} {argument Text} {body Code}) - (ex.report ["Type" (%type expected)] + (ex.report ["Type" (%.type expected)] ["Function" function] ["Argument" argument] - ["Body" (%code body)])) + ["Body" (%.code body)])) (exception: #export (cannot-apply {functionT Type} {functionC Code} {arguments (List Code)}) - (ex.report ["Function type" (%type functionT)] - ["Function" (%code functionC)] + (ex.report ["Function type" (%.type functionT)] + ["Function" (%.code functionC)] ["Arguments" (|> arguments list.enumerate (list@map (.function (_ [idx argC]) - (format (%n idx) " " (%code argC)))) + (format (%.nat idx) " " (%.code argC)))) (text.join-with text.new-line))])) (def: #export (function analyse function-name arg-name body) diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux index 7ef29752e..701e01167 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux @@ -7,7 +7,7 @@ [data ["." maybe] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." type @@ -21,29 +21,29 @@ ["/" analysis (#+ Tag Analysis Operation Phase)]]]]) (exception: #export (variant-tag-out-of-bounds {size Nat} {tag Tag} {type Type}) - (ex.report ["Tag" (%n tag)] - ["Variant size" (%i (.int size))] - ["Variant type" (%type type)])) + (ex.report ["Tag" (%.nat tag)] + ["Variant size" (%.int (.int size))] + ["Variant type" (%.type type)])) (exception: #export (cannot-infer {type Type} {args (List Code)}) - (ex.report ["Type" (%type type)] + (ex.report ["Type" (%.type type)] ["Arguments" (|> args list.enumerate (list@map (function (_ [idx argC]) - (format text.new-line " " (%n idx) " " (%code argC)))) + (format text.new-line " " (%.nat idx) " " (%.code argC)))) (text.join-with ""))])) (exception: #export (cannot-infer-argument {inferred Type} {argument Code}) - (ex.report ["Inferred Type" (%type inferred)] - ["Argument" (%code argument)])) + (ex.report ["Inferred Type" (%.type inferred)] + ["Argument" (%.code argument)])) (exception: #export (smaller-variant-than-expected {expected Nat} {actual Nat}) - (ex.report ["Expected" (%i (.int expected))] - ["Actual" (%i (.int actual))])) + (ex.report ["Expected" (%.int (.int expected))] + ["Actual" (%.int (.int actual))])) (template [] [(exception: #export ( {type Type}) - (%type type))] + (%.type type))] [not-a-variant-type] [not-a-record-type] @@ -82,7 +82,7 @@ (def: (named-type cursor id) (-> Cursor Nat Type) - (let [name (format "{New Type @ " (.cursor-description cursor) " " (%n id) "}")] + (let [name (format "{New Type @ " (.cursor-description cursor) " " (%.nat id) "}")] (#.Primitive name (list)))) (def: new-named-type diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux index 6a33171f1..c6280e4b3 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux @@ -7,7 +7,7 @@ ["ex" exception (#+ exception:)]] [data ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] ["." error] [collection ["." list ("#@." fold functor)] @@ -31,14 +31,14 @@ (template [] [(exception: #export ( {tags (List Text)} {owner Type}) (ex.report ["Tags" (text.join-with " " tags)] - ["Type" (%type owner)]))] + ["Type" (%.type owner)]))] [cannot-declare-tags-for-unnamed-type] [cannot-declare-tags-for-foreign-type] ) (exception: #export (cannot-define-more-than-once {name Name}) - (ex.report ["Definition" (%name name)])) + (ex.report ["Definition" (%.name name)])) (exception: #export (can-only-change-state-of-active-module {module Text} {state Module-State}) (ex.report ["Module" module] @@ -49,8 +49,8 @@ (exception: #export (cannot-set-module-annotations-more-than-once {module Text} {old Code} {new Code}) (ex.report ["Module" module] - ["Old annotations" (%code old)] - ["New annotations" (%code new)])) + ["Old annotations" (%.code old)] + ["New annotations" (%.code new)])) (def: #export (new hash) (-> Nat Module) diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux index c09ea55ba..6a5c4f889 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux @@ -7,7 +7,7 @@ ["." macro] [data ["." text ("#@." equivalence) - format]]] + ["%" format (#+ format)]]]] ["." // #_ ["#." scope] ["#." type] @@ -24,7 +24,7 @@ (exception: #export (definition-has-not-been-exported {definition Name}) (exception.report - ["Definition" (%name definition)])) + ["Definition" (%.name definition)])) (def: (definition def-name) (-> Name (Operation Analysis)) diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux index abf8f2a04..104001da9 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux @@ -5,8 +5,7 @@ [control ["ex" exception (#+ exception:)]] [data - ["." text ("#;." equivalence) - format] + ["." text ("#;." equivalence)] ["." maybe ("#;." monad)] ["." product] ["e" error] diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux index aebbe75ba..a630a8fab 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux @@ -13,7 +13,7 @@ [number ["." nat]] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)] ["." dictionary (#+ Dictionary)]]] @@ -31,58 +31,58 @@ ["/" analysis (#+ Tag Analysis Operation Phase)]]]]) (exception: #export (invalid-variant-type {type Type} {tag Tag} {code Code}) - (ex.report ["Type" (%type type)] - ["Tag" (%n tag)] - ["Expression" (%code code)])) + (ex.report ["Type" (%.type type)] + ["Tag" (%.nat tag)] + ["Expression" (%.code code)])) (template [] [(exception: #export ( {type Type} {members (List Code)}) - (ex.report ["Type" (%type type)] - ["Expression" (%code (` [(~+ members)]))]))] + (ex.report ["Type" (%.type type)] + ["Expression" (%.code (` [(~+ members)]))]))] [invalid-tuple-type] [cannot-analyse-tuple] ) (exception: #export (not-a-quantified-type {type Type}) - (%type type)) + (%.type type)) (template [] [(exception: #export ( {type Type} {tag Tag} {code Code}) - (ex.report ["Type" (%type type)] - ["Tag" (%n tag)] - ["Expression" (%code code)]))] + (ex.report ["Type" (%.type type)] + ["Tag" (%.nat tag)] + ["Expression" (%.code code)]))] [cannot-analyse-variant] [cannot-infer-numeric-tag] ) (exception: #export (record-keys-must-be-tags {key Code} {record (List [Code Code])}) - (ex.report ["Key" (%code key)] - ["Record" (%code (code.record record))])) + (ex.report ["Key" (%.code key)] + ["Record" (%.code (code.record record))])) (template [] [(exception: #export ( {key Name} {record (List [Name Code])}) - (ex.report ["Tag" (%code (code.tag key))] - ["Record" (%code (code.record (list@map (function (_ [keyI valC]) - [(code.tag keyI) valC]) - record)))]))] + (ex.report ["Tag" (%.code (code.tag key))] + ["Record" (%.code (code.record (list@map (function (_ [keyI valC]) + [(code.tag keyI) valC]) + record)))]))] [cannot-repeat-tag] ) (exception: #export (tag-does-not-belong-to-record {key Name} {type Type}) - (ex.report ["Tag" (%code (code.tag key))] - ["Type" (%type type)])) + (ex.report ["Tag" (%.code (code.tag key))] + ["Type" (%.type type)])) (exception: #export (record-size-mismatch {expected Nat} {actual Nat} {type Type} {record (List [Name Code])}) - (ex.report ["Expected" (|> expected .int %i)] - ["Actual" (|> actual .int %i)] - ["Type" (%type type)] - ["Expression" (%code (|> record - (list@map (function (_ [keyI valueC]) - [(code.tag keyI) valueC])) - code.record))])) + (ex.report ["Expected" (%.nat expected)] + ["Actual" (%.nat actual)] + ["Type" (%.type type)] + ["Expression" (%.code (|> record + (list@map (function (_ [keyI valueC]) + [(code.tag keyI) valueC])) + code.record))])) (def: #export (sum analyse tag valueC) (-> Phase Nat Code (Operation Analysis)) diff --git a/stdlib/source/lux/tool/compiler/phase/extension.lux b/stdlib/source/lux/tool/compiler/phase/extension.lux index 9d9563eba..4b00c946f 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension.lux @@ -8,7 +8,7 @@ [data ["." error (#+ Error)] ["." text ("#@." order) - format] + ["%" format (#+ Format format)]] [collection ["." list ("#@." functor)] ["." dictionary (#+ Dictionary)]]]] @@ -40,26 +40,26 @@ (exception: #export (cannot-overwrite {name Name}) (exception.report - ["Extension" (%t name)])) + ["Extension" (%.text name)])) (exception: #export (incorrect-arity {name Name} {arity Nat} {args Nat}) (exception.report - ["Extension" (%t name)] - ["Expected" (%n arity)] - ["Actual" (%n args)])) + ["Extension" (%.text name)] + ["Expected" (%.nat arity)] + ["Actual" (%.nat args)])) (exception: #export [a] (invalid-syntax {name Name} {%format (Format a)} {inputs (List a)}) (exception.report - ["Extension" (%t name)] + ["Extension" (%.text name)] ["Inputs" (exception.enumerate %format inputs)])) (exception: #export [s i o] (unknown {name Name} {bundle (Bundle s i o)}) (exception.report - ["Extension" (%t name)] + ["Extension" (%.text name)] ["Available" (|> bundle dictionary.keys (list.sort text@<) - (exception.enumerate %t))])) + (exception.enumerate %.text))])) (def: #export (install name handler) (All [s i o] diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux index 94aec9628..fa31254c8 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -15,7 +15,7 @@ ["." maybe] ["." product] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." fold monad monoid)] ["." array (#+ Array)] @@ -92,7 +92,7 @@ (template [] [(exception: #export ( {type .Type}) (exception.report - ["Type" (%type type)]))] + ["Type" (%.type type)]))] [non-object] [non-array] @@ -101,7 +101,7 @@ (template [] [(exception: #export ( {class Text}) (exception.report - ["Class/type" (%t class)]))] + ["Class/type" (%.text class)]))] [non-interface] [non-throwable] @@ -110,8 +110,8 @@ (exception: #export (cannot-set-a-final-field {field Text} {class Text}) (exception.report - ["Field" (%t field)] - ["Class" (%t class)])) + ["Field" (%.text field)] + ["Class" (%.text class)])) (template [] [(exception: #export ( {class Text} @@ -121,8 +121,8 @@ (exception.report ["Class" class] ["Method" method] - ["Arguments" (exception.enumerate %t arg-classes)] - ["Hints" (exception.enumerate %type (list@map product.left hints))]))] + ["Arguments" (exception.enumerate %.text arg-classes)] + ["Hints" (exception.enumerate %.type (list@map product.left hints))]))] [no-candidates] [too-many-candidates] @@ -130,9 +130,9 @@ (exception: #export (cannot-cast {from .Type} {to .Type} {value Code}) (exception.report - ["From" (%type from)] - ["To" (%type to)] - ["Value" (%code value)])) + ["From" (%.type from)] + ["To" (%.type to)] + ["Value" (%.code value)])) (template [] [(exception: #export ( {message Text}) @@ -627,7 +627,7 @@ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class))))) _ - (/////analysis.throw ///.invalid-syntax [extension-name %code args])) + (/////analysis.throw ///.invalid-syntax [extension-name %.code args])) _ (/////analysis.throw ///.incorrect-arity [extension-name 1 (list.size args)])))) @@ -807,7 +807,7 @@ (/////analysis.throw cannot-cast [fromT toT fromC]))) _ - (/////analysis.throw ///.invalid-syntax [extension-name %code args])))) + (/////analysis.throw ///.invalid-syntax [extension-name %.code args])))) (def: bundle::object Bundle @@ -1443,7 +1443,7 @@ (exception.report ["Methods" (exception.enumerate (function (_ [name method]) - (format (%t name) " " (jvm.method-signature method))) + (format (%.text name) " " (jvm.method-signature method))) methods)]))] [missing-abstract-methods] @@ -1837,9 +1837,9 @@ (exception: #export (class-parameter-mismatch {expected (List Text)} {actual (List jvm.Generic)}) (exception.report - ["Expected (amount)" (%n (list.size expected))] - ["Expected (parameters)" (exception.enumerate %t expected)] - ["Actual (amount)" (%n (list.size actual))] + ["Expected (amount)" (%.nat (list.size expected))] + ["Expected (parameters)" (exception.enumerate %.text expected)] + ["Actual (amount)" (%.nat (list.size actual))] ["Actual (parameters)" (exception.enumerate (|>> #jvm.Generic jvm.signature) actual)])) (type: Renamer (Dictionary Text Text)) @@ -1934,7 +1934,7 @@ id macro.count] (wrap (format (text.replace-all .module-separator ..jvm-package-separator where) ..jvm-package-separator - "anonymous-class" (%n id))))) + "anonymous-class" (%.nat id))))) super-classT (typeA.with-env (luxT.class mapping super-class)) super-interfaceT+ (typeA.with-env diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux index 48401f0c6..2086a0fea 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux @@ -11,7 +11,7 @@ ["." maybe] ["." error] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)] ["." dictionary (#+ Dictionary)]]] @@ -41,7 +41,7 @@ (handler extension-name analyse inputs) (#error.Failure error) - (/////analysis.throw ///.invalid-syntax [extension-name %code args])))) + (/////analysis.throw ///.invalid-syntax [extension-name %.code args])))) (def: (simple inputsT+ outputT) (-> (List Type) Type Handler) @@ -79,7 +79,7 @@ (as-is (exception: #export (char-text-must-be-size-1 {text Text}) (exception.report - ["Text" (%t text)])) + ["Text" (%.text text)])) (def: text-char (Parser text.Char) @@ -152,7 +152,7 @@ (analyse exprC)) _ - (/////analysis.throw ///.invalid-syntax [extension-name %code argsC+])))) + (/////analysis.throw ///.invalid-syntax [extension-name %.code argsC+])))) (def: (lux::check eval) (-> Eval Handler) diff --git a/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux b/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux index 28015b956..4816993f3 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/bundle.lux @@ -4,7 +4,7 @@ [monad (#+ do)]] [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)] ["." dictionary (#+ Dictionary)]]]] diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux index af49f8ee1..e4cf0140e 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/statement/lux.lux @@ -12,7 +12,7 @@ ["." maybe] ["." error] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)] ["." dictionary]]] @@ -50,7 +50,7 @@ (handler extension-name phase inputs) (#error.Failure error) - (////.throw ///.invalid-syntax [extension-name %code inputs])))) + (////.throw ///.invalid-syntax [extension-name %.code inputs])))) ## TODO: Inline "evaluate!'" into "evaluate!" ASAP (def: (evaluate!' generate code//type codeS) @@ -63,7 +63,7 @@ (do ////.monad [codeT (generate codeS) count ////generation.next - codeV (////generation.evaluate! (format "evaluate" (%n count)) codeT)] + codeV (////generation.evaluate! (format "evaluate" (%.nat count)) codeT)] (wrap [code//type codeT codeV])))) (def: (evaluate! type codeC) @@ -157,14 +157,14 @@ [type valueT valueN value] (..definition full-name #.None valueC) _ (/////statement.lift-analysis (module.define short-name (#.Right [exported? type annotations value]))) - #let [_ (log! (format "Definition " (%name full-name)))] + #let [_ (log! (format "Definition " (%.name full-name)))] _ (/////statement.lift-generation (////generation.learn full-name valueN)) _ (..refresh expander host-analysis)] (wrap /////statement.no-requirements)) _ - (////.throw ///.invalid-syntax [extension-name %code inputsC+])))) + (////.throw ///.invalid-syntax [extension-name %.code inputsC+])))) (def: (def::type-tagged expander host-analysis) (-> Expander /////analysis.Bundle Handler) @@ -182,7 +182,7 @@ (do ////.monad [_ (module.define short-name (#.Right [exported? type annotations value]))] (module.declare-tags tags exported? (:coerce Type value)))) - #let [_ (log! (format "Definition " (%name full-name)))] + #let [_ (log! (format "Definition " (%.name full-name)))] _ (/////statement.lift-generation (////generation.learn full-name valueN)) _ (..refresh expander host-analysis)] @@ -217,9 +217,9 @@ (exception: #export (cannot-alias-an-alias {local Alias} {foreign Alias} {target Name}) (exception.report - ["Local alias" (%name local)] - ["Foreign alias" (%name foreign)] - ["Target definition" (%name target)])) + ["Local alias" (%.name local)] + ["Foreign alias" (%.name foreign)] + ["Target definition" (%.name target)])) (def: (define-alias alias original) (-> Text Name (/////analysis.Operation Any)) @@ -268,7 +268,7 @@ (wrap /////statement.no-requirements)) _ - (////.throw ///.invalid-syntax [extension-name %code inputsC+]))))] + (////.throw ///.invalid-syntax [extension-name %.code inputsC+]))))] [def::analysis /////analysis.Handler /////statement.lift-analysis] [def::synthesis /////synthesis.Handler /////statement.lift-synthesis] @@ -321,7 +321,7 @@ (wrap /////statement.no-requirements)) _ - (////.throw ///.invalid-syntax [extension-name %code inputsC+])))) + (////.throw ///.invalid-syntax [extension-name %.code inputsC+])))) (def: (bundle::def expander host-analysis program) (All [anchor expression statement] diff --git a/stdlib/source/lux/tool/compiler/phase/generation.lux b/stdlib/source/lux/tool/compiler/phase/generation.lux index 4482daa3b..93dc97518 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation.lux @@ -9,7 +9,7 @@ ["." error (#+ Error)] ["." name ("#@." equivalence)] ["." text - format] + ["%" format (#+ format)]] [collection ["." row (#+ Row)] ["." dictionary (#+ Dictionary)] @@ -31,25 +31,25 @@ (exception: #export (unknown-lux-name {name Name} {registry Registry}) (exception.report - ["Name" (%name name)] + ["Name" (%.name name)] ["Registry" (|> registry dictionary.keys (list.sort (:: name.order <)) - (list@map %name) + (list@map %.name) (text.join-with text.new-line))])) (exception: #export (cannot-overwrite-lux-name {lux-name Name} {old-host-name Text} {new-host-name Text}) (exception.report - ["Lux Name" (%name lux-name)] + ["Lux Name" (%.name lux-name)] ["Old Host Name" old-host-name] ["New Host Name" new-host-name])) (template [] [(exception: #export ( {name Name}) (exception.report - ["Output" (%name name)]))] + ["Output" (%.name name)]))] [cannot-overwrite-output] [no-buffer-for-saving-code] @@ -109,7 +109,7 @@ (Operation anchor expression statement [Text output]))) (function (_ [bundle state]) (let [[old-scope old-inner] (get@ #context state) - new-scope (format old-scope "c" (%n old-inner))] + new-scope (format old-scope "c" (%.nat old-inner))] (case (expr [bundle (set@ #context [new-scope 0] state)]) (#error.Success [[bundle' state'] output]) (#error.Success [[bundle' (set@ #context [old-scope (inc old-inner)] state')] @@ -192,7 +192,7 @@ (def: #export (gensym prefix) (All [anchor expression statement] (-> Text (Operation anchor expression statement Text))) - (:: //.monad map (|>> %n (format prefix)) ..next)) + (:: //.monad map (|>> %.nat (format prefix)) ..next)) (template [ ] [(def: #export ( label code) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux index 6f24f6c23..6b782a24d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/case.lux @@ -5,8 +5,7 @@ [control ["ex" exception (#+ exception:)]] [data - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)] ["." set]]] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux index d32f1b772..c8edd4e46 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/function.lux @@ -6,8 +6,6 @@ pipe] [data ["." product] - [text - format] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux index 29326e358..13e049e1d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/loop.lux @@ -5,7 +5,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [target @@ -21,7 +21,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do ////.monad - [@scope (:: @ map (|>> %n (format "scope") _.var) ///.next) + [@scope (:: @ map (|>> %.nat (format "scope") _.var) ///.next) initsG+ (monad.map @ generate initsS+) bodyG (///.with-anchor @scope (generate bodyS))] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux index 65c355ecf..19594bac9 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/common-lisp/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux index 3a5e8f2d3..f17b2b983 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux @@ -5,8 +5,7 @@ [control ["ex" exception (#+ exception:)]] [data - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux index e43e71fe4..a0418b839 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux @@ -6,8 +6,6 @@ pipe] [data ["." product] - [text - format] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux index fd2d3de58..65e691c51 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux @@ -4,8 +4,7 @@ ["." monad (#+ do)]] [data ["." product] - ["." text - format] + ["." text] [collection ["." list ("#@." functor)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux index 6bd6565dd..949e663c7 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux index d69668611..c74ceb8c7 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/case.lux @@ -5,8 +5,7 @@ [control ["ex" exception (#+ exception:)]] [data - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)] ["." set]]] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux index 325ac58a6..eb0a5e71b 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/function.lux @@ -6,8 +6,6 @@ pipe] [data ["." product] - [text - format] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux index 49180db8b..b575ec97b 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/loop.lux @@ -5,7 +5,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [target @@ -21,7 +21,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do ////.monad - [@loop (:: @ map (|>> %n (format "loop") _.var) ///.next) + [@loop (:: @ map (|>> %.nat (format "loop") _.var) ///.next) initsO+ (monad.map @ generate initsS+) bodyO (///.with-anchor @loop (generate bodyS)) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux index e5ce5a201..47e58fc57 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux index 4bd86c94e..abd31b7f2 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/php/case.lux @@ -7,7 +7,7 @@ [data ["." product] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)] ["." set]]] @@ -209,7 +209,7 @@ (def: (gensym prefix) (-> Text (Operation Text)) - (:: ////.monad map (|>> %n (format prefix)) ///.next)) + (:: ////.monad map (|>> %.nat (format prefix)) ///.next)) (def: #export (case generate [valueS pathP]) (-> Phase [Synthesis Path] (Operation (Expression Any))) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux index 5cbf855b6..8dfb9668e 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/php/function.lux @@ -6,8 +6,7 @@ pipe] [data ["." product] - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux index 94857fe4f..75cdedae3 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/php/loop.lux @@ -5,7 +5,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [target @@ -21,7 +21,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do ////.monad - [@loop (:: @ map (|>> %n (format "loop")) ///.next) + [@loop (:: @ map (|>> %.nat (format "loop")) ///.next) #let [@loopG (_.global @loop) @loopL (_.var @loop)] initsO+ (monad.map @ generate initsS+) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux index 4af1c01ac..3adf01716 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/php/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux index d0f887385..80a142b37 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/python/case.lux @@ -6,7 +6,7 @@ ["ex" exception (#+ exception:)]] [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor fold)] ["." set]]] @@ -206,7 +206,7 @@ (def: (gensym prefix) (-> Text (Operation SVar)) - (:: ////.monad map (|>> %n (format prefix) _.var) ///.next)) + (:: ////.monad map (|>> %.nat (format prefix) _.var) ///.next)) (def: #export (case generate [valueS pathP]) (-> Phase [Synthesis Path] (Operation (Expression Any))) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux index 0cbcdde37..c70ca9c37 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/python/function.lux @@ -6,8 +6,6 @@ pipe] [data ["." product] - [text - format] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux index a58f02141..f0d75ef29 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/python/loop.lux @@ -5,7 +5,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [target @@ -21,7 +21,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do ////.monad - [@loop (:: @ map (|>> %n (format "loop") _.var) ///.next) + [@loop (:: @ map (|>> %.nat (format "loop") _.var) ///.next) initsO+ (monad.map @ generate initsS+) bodyO (///.with-anchor @loop (generate bodyS)) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux index 3fd58ef1b..5524980f6 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux index 534d58cb1..110d78d0d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux @@ -4,7 +4,7 @@ pipe] [data [text - format]] + ["%" format (#+ format)]]] [type (#+ :share)]] ["." // ["#/" // ("#@." monad) @@ -31,7 +31,7 @@ (All [expression] (-> Text (-> Text expression) (-> Register expression))) - (|>> %n (format prefix) variable)) + (|>> %.nat (format prefix) variable)) (def: #export foreign (All [expression] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux index 25d6ff91a..41e55749e 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/case.lux @@ -5,8 +5,7 @@ [control ["ex" exception (#+ exception:)]] [data - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)] ["." set]]] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux index 52ef8fd1a..ef3920d23 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/function.lux @@ -6,8 +6,6 @@ pipe] [data ["." product] - [text - format] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux index b7774d396..6503d23f8 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/loop.lux @@ -5,7 +5,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] [target @@ -21,7 +21,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do ////.monad - [@loop (:: @ map (|>> %n (format "loop") _.local) ///.next) + [@loop (:: @ map (|>> %.nat (format "loop") _.local) ///.next) initsO+ (monad.map @ generate initsS+) bodyO (///.with-anchor @loop (generate bodyS))] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux index f0d88923e..a4062693c 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux @@ -10,7 +10,7 @@ [number (#+ hex) ["." i64]] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)]]] ["." macro diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux index bd478f921..861032fc7 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.lux @@ -6,8 +6,7 @@ ["ex" exception (#+ exception:)]] [data ["." number] - ["." text - format] + ["." text] [collection ["." list ("#@." functor fold)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux index 8140c769f..42c1d196d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux @@ -10,8 +10,7 @@ [data ["e" error] ["." product] - ["." text - format] + ["." text] [number (#+ hex)] [collection ["." list ("#;." functor)] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux index 36de9712e..41a2e6b17 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.lux @@ -7,7 +7,7 @@ [data ["." product] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux index 086d53fe3..a0a5d74eb 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.lux @@ -4,8 +4,7 @@ ["." monad (#+ do)]] [data ["." product] - ["." text - format] + ["." text] [collection ["." list ("#;." functor)]]] [target diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux index 4a617e29c..992701393 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux @@ -9,7 +9,7 @@ [data [number (#+ hex)] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monad)]]] [macro diff --git a/stdlib/source/lux/tool/compiler/phase/macro.lux b/stdlib/source/lux/tool/compiler/phase/macro.lux index 9a94f9a4b..10d3cd332 100644 --- a/stdlib/source/lux/tool/compiler/phase/macro.lux +++ b/stdlib/source/lux/tool/compiler/phase/macro.lux @@ -7,7 +7,7 @@ [data ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [collection [array (#+ Array)] ["." list ("#@." functor)]]] @@ -16,15 +16,15 @@ (exception: #export (expansion-failed {macro Name} {inputs (List Code)} {error Text}) (exception.report - ["Macro" (%name macro)] - ["Inputs" (exception.enumerate %code inputs)] + ["Macro" (%.name macro)] + ["Inputs" (exception.enumerate %.code inputs)] ["Error" error])) (exception: #export (must-have-single-expansion {macro Name} {inputs (List Code)} {outputs (List Code)}) (exception.report - ["Macro" (%name macro)] - ["Inputs" (exception.enumerate %code inputs)] - ["Outputs" (exception.enumerate %code outputs)])) + ["Macro" (%.name macro)] + ["Inputs" (exception.enumerate %.code inputs)] + ["Outputs" (exception.enumerate %.code outputs)])) (type: #export Expander (-> Macro (List Code) Lux (Error (Error [Lux (List Code)])))) diff --git a/stdlib/source/lux/tool/compiler/phase/statement.lux b/stdlib/source/lux/tool/compiler/phase/statement.lux index 2f3c68f7b..250d14721 100644 --- a/stdlib/source/lux/tool/compiler/phase/statement.lux +++ b/stdlib/source/lux/tool/compiler/phase/statement.lux @@ -6,7 +6,7 @@ ["." exception (#+ exception:)]] [data [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." fold monoid)]]] ["." macro]] @@ -22,15 +22,15 @@ (exception: #export (not-a-statement {code Code}) (exception.report - ["Statement" (%code code)])) + ["Statement" (%.code code)])) (exception: #export (invalid-macro-call {code Code}) (exception.report - ["Code" (%code code)])) + ["Code" (%.code code)])) (exception: #export (macro-was-not-found {name Name}) (exception.report - ["Name" (%name name)])) + ["Name" (%.name name)])) (with-expansions [ (as-is [|form-cursor| (#.Form (list& [|text-cursor| (#.Text "lux def module")] annotations))])] (def: #export (phase expander) diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux index ea8615949..8ee2ab8c2 100644 --- a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux @@ -8,8 +8,7 @@ [data ["." product] ["." bit ("#@." equivalence)] - ["." text ("#@." equivalence) - format] + ["." text ("#@." equivalence)] [number ["." frac ("#@." equivalence)]] [collection diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux index 8d1b71d90..dbcc56e38 100644 --- a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux @@ -7,7 +7,7 @@ [data ["." maybe] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor monoid fold)] ["dict" dictionary (#+ Dictionary)]]]] @@ -20,7 +20,7 @@ ["/" synthesis (#+ Path Synthesis Operation Phase)]]]]) (exception: #export (cannot-find-foreign-variable-in-environment {foreign Register} {environment Environment}) - (ex.report ["Foreign" (%n foreign)] + (ex.report ["Foreign" (%.nat foreign)] ["Environment" (|> environment (list;map ////reference.%variable) (text.join-with " "))])) diff --git a/stdlib/source/lux/tool/compiler/reference.lux b/stdlib/source/lux/tool/compiler/reference.lux index 20d819ef7..53aa769a8 100644 --- a/stdlib/source/lux/tool/compiler/reference.lux +++ b/stdlib/source/lux/tool/compiler/reference.lux @@ -7,7 +7,7 @@ pipe] [data [text - format]]]) + ["%" format (#+ Format format)]]]]) (type: #export Register Nat) @@ -74,10 +74,10 @@ (Format Variable) (case variable (#Local local) - (format "+" (%n local)) + (format "+" (%.nat local)) (#Foreign foreign) - (format "-" (%n foreign)))) + (format "-" (%.nat foreign)))) (def: #export (%reference reference) (Format Reference) @@ -86,4 +86,4 @@ (%variable variable) (#Constant constant) - (%name constant))) + (%.name constant))) diff --git a/stdlib/source/lux/tool/compiler/statement.lux b/stdlib/source/lux/tool/compiler/statement.lux index 441b47f83..5f816204c 100644 --- a/stdlib/source/lux/tool/compiler/statement.lux +++ b/stdlib/source/lux/tool/compiler/statement.lux @@ -1,8 +1,6 @@ (.module: [lux (#- Module) [data - [text - format] [collection ["." list ("#;." monoid)]]]] [// diff --git a/stdlib/source/lux/tool/compiler/synthesis.lux b/stdlib/source/lux/tool/compiler/synthesis.lux index a30d11b92..edb618dd4 100644 --- a/stdlib/source/lux/tool/compiler/synthesis.lux +++ b/stdlib/source/lux/tool/compiler/synthesis.lux @@ -8,7 +8,7 @@ [data ["." bit ("#;." equivalence)] ["." text ("#;." equivalence) - format] + ["%" format (#+ Format format)]] [collection ["." list ("#;." functor)] ["." dictionary (#+ Dictionary)]]]] @@ -265,16 +265,16 @@ (format "(? " (case primitive (#Bit value) - (%b value) + (%.bit value) (#I64 value) - (%i (.int value)) + (%.int (.int value)) (#F64 value) - (%f value) + (%.frac value) (#Text value) - (%t value)) + (%.text value)) ")") (#Access access) @@ -282,21 +282,21 @@ (#Side side) (case side (#.Left lefts) - (format "(" (%n lefts) " #0" ")") + (format "(" (%.nat lefts) " #0" ")") (#.Right lefts) - (format "(" (%n lefts) " #1" ")")) + (format "(" (%.nat lefts) " #1" ")")) (#Member member) (case member (#.Left lefts) - (format "[" (%n lefts) " #0" "]") + (format "[" (%.nat lefts) " #0" "]") (#.Right lefts) - (format "[" (%n lefts) " #1" "]"))) + (format "[" (%.nat lefts) " #1" "]"))) (#Bind register) - (format "(@ " (%n register) ")") + (format "(@ " (%.nat register) ")") (#Alt left right) (format "(| " (%path' %then left) " " (%path' %then right) ")") @@ -316,18 +316,18 @@ (^template [ ] ( value) ( value)) - ([#Bit %b] - [#F64 %f] - [#Text %t]) + ([#Bit %.bit] + [#F64 %.frac] + [#Text %.text]) (#I64 value) - (%i (.int value))) + (%.int (.int value))) (#Structure structure) (case structure (#//analysis.Variant [lefts right? content]) (|> (%synthesis content) - (format (%n lefts) " " (%b right?) " ") + (format (%.nat lefts) " " (%.bit right?) " ") (text.enclose ["(" ")"])) (#//analysis.Tuple members) @@ -345,7 +345,7 @@ (case function (#Abstraction [environment arity body]) (|> (%synthesis body) - (format (%n arity) " ") + (format (%.nat arity) " ") (format (|> environment (list;map //reference.%variable) (text.join-with " ") @@ -362,7 +362,7 @@ (#Branch branch) (case branch (#Let input register body) - (|> (format (%synthesis input) " " (%n register) " " (%synthesis body)) + (|> (format (%synthesis input) " " (%.nat register) " " (%synthesis body)) (text.enclose ["(#let " ")"])) (#If test then else) @@ -380,7 +380,7 @@ (#Extension [name args]) (|> (list;map %synthesis args) (text.join-with " ") - (format (%t name)) + (format (%.text name)) (text.enclose ["(" ")"])))) (def: #export %path @@ -393,9 +393,9 @@ (^template [ ] [( reference') ( sample')] ( reference' sample')) - ([#Bit bit;= %b] - [#F64 f/= %f] - [#Text text;= %t]) + ([#Bit bit;= %.bit] + [#F64 f/= %.frac] + [#Text text;= %.text]) [(#I64 reference') (#I64 sample')] (i/= (.int reference') (.int sample')) diff --git a/stdlib/source/lux/tool/interpreter.lux b/stdlib/source/lux/tool/interpreter.lux index a92543546..b836e4139 100644 --- a/stdlib/source/lux/tool/interpreter.lux +++ b/stdlib/source/lux/tool/interpreter.lux @@ -6,7 +6,7 @@ [data ["." error (#+ Error)] ["." text ("#;." equivalence) - format]] + ["%" format (#+ format)]]] [type (#+ :share) ["." check]] [compiler @@ -116,7 +116,7 @@ (do @ [codeH (generate codeS) count generation.next - codeV (generation.evaluate! (format "interpretation_" (%n count)) codeH)] + codeV (generation.evaluate! (format "interpretation_" (%.nat count)) codeH)] (wrap [codeT codeV])))))) (def: (interpret configuration code) diff --git a/stdlib/source/lux/tool/mediator/parallelism.lux b/stdlib/source/lux/tool/mediator/parallelism.lux index d26f93372..c45c1aeb5 100644 --- a/stdlib/source/lux/tool/mediator/parallelism.lux +++ b/stdlib/source/lux/tool/mediator/parallelism.lux @@ -9,8 +9,7 @@ ["." stm (#+ Var STM)]] [data ["." error (#+ Error) ("#;." monad)] - ["." text ("#;." equivalence) - format] + ["." text ("#;." equivalence)] [collection ["." list ("#;." functor)] ["." dictionary (#+ Dictionary)]]] diff --git a/stdlib/source/lux/type/dynamic.lux b/stdlib/source/lux/type/dynamic.lux index aaa5ae6e7..32b4c7f70 100644 --- a/stdlib/source/lux/type/dynamic.lux +++ b/stdlib/source/lux/type/dynamic.lux @@ -6,7 +6,7 @@ [data ["." error (#+ Error)] [text - format]] + ["%" format (#+ format)]]] [macro (#+ with-gensyms) ["." syntax (#+ syntax:)]] ["." type @@ -14,8 +14,8 @@ (exception: #export (wrong-type {expected Type} {actual Type}) (exception.report - ["Expected" (%type expected)] - ["Actual" (%type actual)])) + ["Expected" (%.type expected)] + ["Actual" (%.type actual)])) (abstract: #export Dynamic {#.doc "A value coupled with its type, so it can be checked later."} diff --git a/stdlib/source/lux/type/implicit.lux b/stdlib/source/lux/type/implicit.lux index 083a07e4d..9de0d7d10 100644 --- a/stdlib/source/lux/type/implicit.lux +++ b/stdlib/source/lux/type/implicit.lux @@ -11,7 +11,7 @@ ["." maybe] ["." number] ["." text ("#@." equivalence) - format] + ["%" format (#+ format)]] [collection ["." list ("#@." monad fold)] ["dict" dictionary (#+ Dictionary)]]] @@ -34,10 +34,10 @@ (:: macro.monad wrap type)) (#.Some [_ #.None]) - (macro.fail (format "Unbound type-var " (%n id))) + (macro.fail (format "Unbound type-var " (%.nat id))) #.None - (macro.fail (format "Unknown type-var " (%n id))) + (macro.fail (format "Unknown type-var " (%.nat id))) )) (def: (resolve-type var-name) @@ -61,7 +61,7 @@ (#.Apply arg func) (case (type.apply (list arg) func) #.None - (check.fail (format "Cannot apply type " (%type func) " to type " (%type arg))) + (check.fail (format "Cannot apply type " (%.type func) " to type " (%.type arg))) (#.Some sig-type') (find-member-type idx sig-type')) @@ -74,7 +74,7 @@ _ (if (n/= 0 idx) (:: check.monad wrap sig-type) - (check.fail (format "Cannot find member type " (%n idx) " for " (%type sig-type)))))) + (check.fail (format "Cannot find member type " (%.nat idx) " for " (%.type sig-type)))))) (def: (find-member-name member) (-> Name (Meta Name)) @@ -93,13 +93,13 @@ tag-lists)]] (case candidates #.Nil - (macro.fail (format "Unknown tag: " (%name member))) + (macro.fail (format "Unknown tag: " (%.name member))) (#.Cons winner #.Nil) (wrap winner) _ - (macro.fail (format "Too many candidate tags: " (%list %name candidates)))))) + (macro.fail (format "Too many candidate tags: " (%.list %.name candidates)))))) _ (:: macro.monad wrap member))) @@ -176,7 +176,7 @@ (wrap output)) _ - (check.fail (format "Invalid function type: " (%type func))))) + (check.fail (format "Invalid function type: " (%.type func))))) (def: (concrete-type type) (-> Type (Check [(List Nat) Type])) @@ -228,7 +228,7 @@ (list [alt-name =deps])))) list@join) #.Nil - (macro.fail (format "No candidates for provisioning: " (%type dep))) + (macro.fail (format "No candidates for provisioning: " (%.type dep))) found (wrap found)))) @@ -246,13 +246,13 @@ (#.Right candidates) (case candidates #.Nil - (check.fail (format "No candidates for provisioning: " (%type dep))) + (check.fail (format "No candidates for provisioning: " (%.type dep))) (#.Cons winner #.Nil) (:: check.monad wrap winner) _ - (check.fail (format "Too many candidates for provisioning: " (%type dep) " --- " (%list (|>> product.left %name) candidates)))) + (check.fail (format "Too many candidates for provisioning: " (%.type dep) " --- " (%.list (|>> product.left %.name) candidates)))) )) (def: (test-alternatives sig-type member-idx input-types output-type alts) @@ -279,7 +279,7 @@ (list [alt-name =deps])))) list@join) #.Nil - (macro.fail (format "No alternatives for " (%type (type.function input-types output-type)))) + (macro.fail (format "No alternatives for " (%.type (type.function input-types output-type)))) found (wrap found)))) @@ -350,7 +350,7 @@ chosen-ones (find-alternatives sig-type member-idx input-types output-type)] (case chosen-ones #.Nil - (macro.fail (format "No structure option could be found for member: " (%name member))) + (macro.fail (format "No structure option could be found for member: " (%.name member))) (#.Cons chosen #.Nil) (wrap (list (` (:: (~ (instance$ chosen)) @@ -360,9 +360,9 @@ _ (macro.fail (format "Too many options available: " (|> chosen-ones - (list@map (|>> product.left %name)) + (list@map (|>> product.left %.name)) (text.join-with ", ")) - " --- for type: " (%type sig-type))))) + " --- for type: " (%.type sig-type))))) (#.Right [args _]) (do @ diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux index 7c9201057..096598521 100644 --- a/stdlib/source/lux/type/resource.lux +++ b/stdlib/source/lux/type/resource.lux @@ -6,7 +6,7 @@ [control ["p" parser ["s" code (#+ Parser)]] - ["ex" exception (#+ exception:)] + ["." exception (#+ exception:)] ["." io (#+ IO)] [concurrency ["." promise (#+ Promise)]]] @@ -17,7 +17,7 @@ [number ["." nat]] [text - format] + ["%" format (#+ format)]] [collection ["." set] ["." row (#+ Row)] @@ -126,7 +126,8 @@ [read-async Promise promise.monad])) (exception: #export (index-cannot-be-repeated {index Nat}) - (%n index)) + (exception.report + ["Index" (%.nat index)])) (exception: #export amount-cannot-be-zero) @@ -139,7 +140,7 @@ (wrap (list)) (do @ [head s.nat - _ (p.assert (ex.construct index-cannot-be-repeated head) + _ (p.assert (exception.construct index-cannot-be-repeated head) (not (set.member? seen head))) tail (recur (set.add head seen))] (wrap (list& head tail)))))))) @@ -186,7 +187,7 @@ (Parser Nat) (do p.monad [raw s.nat - _ (p.assert (ex.construct amount-cannot-be-zero []) + _ (p.assert (exception.construct amount-cannot-be-zero []) (n/> 0 raw))] (wrap raw))) diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux index 15ff953d2..dd8b467bf 100644 --- a/stdlib/source/lux/type/unit.lux +++ b/stdlib/source/lux/type/unit.lux @@ -13,7 +13,7 @@ [number ["r" ratio (#+ Ratio)]] [text - format]] + ["%" format (#+ format)]]] ["." macro ["." code] [syntax (#+ syntax:) @@ -85,10 +85,10 @@ (Parser Ratio) (s.tuple (do p.monad [numerator s.int - _ (p.assert (format "Numerator must be positive: " (%i numerator)) + _ (p.assert (format "Numerator must be positive: " (%.int numerator)) (i/> +0 numerator)) denominator s.int - _ (p.assert (format "Denominator must be positive: " (%i denominator)) + _ (p.assert (format "Denominator must be positive: " (%.int denominator)) (i/> +0 denominator))] (wrap [(.nat numerator) (.nat denominator)])))) diff --git a/stdlib/source/lux/world/binary.lux b/stdlib/source/lux/world/binary.lux index 1b203df73..485aab536 100644 --- a/stdlib/source/lux/world/binary.lux +++ b/stdlib/source/lux/world/binary.lux @@ -13,21 +13,21 @@ [number ["." i64]] [text - format] + ["%" format (#+ format)]] [collection ["." array]]]]) (exception: #export (index-out-of-bounds {size Nat} {index Nat}) (exception.report - ["Size" (%n size)] - ["Index" (%n index)])) + ["Size" (%.nat size)] + ["Index" (%.nat index)])) (template [] [(exception: #export ( {size Nat} {from Nat} {to Nat}) (exception.report - ["Size" (%n size)] - ["From" (%n from)] - ["To" (%n to)]))] + ["Size" (%.nat size)] + ["From" (%.nat from)] + ["To" (%.nat to)]))] [slice-out-of-bounds] [inverted-slice] @@ -236,8 +236,8 @@ (exception: #export (cannot-copy-bytes {source-input Nat} {target-output Nat}) (exception.report - ["Source input space" (%n source-input)] - ["Target output space" (%n target-output)])))) + ["Source input space" (%.nat source-input)] + ["Target output space" (%.nat target-output)])))) (def: #export (copy bytes source-offset source target-offset target) (-> Nat Nat Binary Nat Binary (Error Binary)) diff --git a/stdlib/source/lux/world/console.lux b/stdlib/source/lux/world/console.lux index cc5258724..f880fc5f9 100644 --- a/stdlib/source/lux/world/console.lux +++ b/stdlib/source/lux/world/console.lux @@ -14,7 +14,7 @@ [data ["." error (#+ Error)] ["." text - format]]]) + ["%" format (#+ format)]]]]) (template [] [(exception: #export () diff --git a/stdlib/source/lux/world/db/jdbc.lux b/stdlib/source/lux/world/db/jdbc.lux index 8fd0ecf4c..624f8b510 100644 --- a/stdlib/source/lux/world/db/jdbc.lux +++ b/stdlib/source/lux/world/db/jdbc.lux @@ -13,7 +13,7 @@ ["." product] ["." error (#+ Error)] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." fold)]]] ["." io (#+ IO)] diff --git a/stdlib/source/lux/world/db/sql.lux b/stdlib/source/lux/world/db/sql.lux index c91c2f226..13d6c8b6f 100644 --- a/stdlib/source/lux/world/db/sql.lux +++ b/stdlib/source/lux/world/db/sql.lux @@ -4,7 +4,7 @@ [monad (#+ do)]] [data ["." text ("#;." equivalence) - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]] [type @@ -122,8 +122,8 @@ (def: #export (int value) (-> Int Literal) (..literal (if (i/< +0 value) - (%i value) - (%n (.nat value))))) + (%.int value) + (%.nat (.nat value))))) (def: #export function (-> Text Function) @@ -261,7 +261,7 @@ (:abstraction (format (:representation query) " " " " - (%n value))))] + (%.nat value))))] [limit "LIMIT" [where having order group offset] (Query where having order group No-Limit offset) diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux index 230b30f79..7fd5b9fb4 100644 --- a/stdlib/source/lux/world/file.lux +++ b/stdlib/source/lux/world/file.lux @@ -16,7 +16,7 @@ ["." maybe] ["." error (#+ Error) ("#;." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." array (#+ Array)] ["." list ("#@." functor)]]] @@ -183,7 +183,7 @@ (exception: #export (cannot-modify {instant Instant} {file Path}) (exception.report - ["Instant" (%instant instant)] + ["Instant" (%.instant instant)] ["Path" file])) (import: #long java/lang/String) diff --git a/stdlib/source/lux/world/net/http/cookie.lux b/stdlib/source/lux/world/net/http/cookie.lux index d2899d106..73f73ffff 100644 --- a/stdlib/source/lux/world/net/http/cookie.lux +++ b/stdlib/source/lux/world/net/http/cookie.lux @@ -7,7 +7,7 @@ [data ["." error (#+ Error)] [text - format] + ["%" format (#+ format)]] [format ["." context (#+ Context)]] [collection @@ -32,8 +32,8 @@ (-> Duration Directive) (let [seconds (duration.query duration.second duration)] (..directive (format "Max-Age=" (if (i/< +0 seconds) - (%i seconds) - (%n (.nat seconds))))))) + (%.int seconds) + (%.nat (.nat seconds))))))) (template [ ] [(def: #export ( value) diff --git a/stdlib/source/lux/world/net/http/header.lux b/stdlib/source/lux/world/net/http/header.lux index 3a96b37fa..4cd1daa67 100644 --- a/stdlib/source/lux/world/net/http/header.lux +++ b/stdlib/source/lux/world/net/http/header.lux @@ -4,7 +4,7 @@ [pipe (#+ case>)]] [data [text - format] + ["%" format (#+ format)]] [collection ["." dictionary (#+ Dictionary)]]]] [// (#+ Header) @@ -23,7 +23,7 @@ (def: #export content-length (-> Nat Header) - (|>> %n (..add "Content-Length"))) + (|>> %.nat (..add "Content-Length"))) (def: #export content-type (-> MIME Header) diff --git a/stdlib/source/lux/world/net/http/mime.lux b/stdlib/source/lux/world/net/http/mime.lux index 035ff0364..f3f795a13 100644 --- a/stdlib/source/lux/world/net/http/mime.lux +++ b/stdlib/source/lux/world/net/http/mime.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format + ["%" format (#+ format)] ["." encoding (#+ Encoding)]]] [type abstract]]) diff --git a/stdlib/source/lux/world/net/http/query.lux b/stdlib/source/lux/world/net/http/query.lux index 516c67ff8..a0854d1e9 100644 --- a/stdlib/source/lux/world/net/http/query.lux +++ b/stdlib/source/lux/world/net/http/query.lux @@ -10,7 +10,7 @@ [number ["." nat]] ["." text - format] + ["%" format (#+ format)]] [format ["." context (#+ Context)]] [collection diff --git a/stdlib/source/lux/world/net/http/response.lux b/stdlib/source/lux/world/net/http/response.lux index f1b0b1978..b262f3226 100644 --- a/stdlib/source/lux/world/net/http/response.lux +++ b/stdlib/source/lux/world/net/http/response.lux @@ -6,7 +6,6 @@ ["." frp ("#@." monad)]]] [data ["." text - format ["." encoding]] [format ["." html] diff --git a/stdlib/source/lux/world/shell.lux b/stdlib/source/lux/world/shell.lux index 3f0ae519e..7668efb0d 100644 --- a/stdlib/source/lux/world/shell.lux +++ b/stdlib/source/lux/world/shell.lux @@ -10,7 +10,7 @@ ["." maybe] ["." error (#+ Error)] ["." text - format + ["%" format (#+ format)] ["." encoding]] [format ["." context (#+ Context)]] diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 506702706..ef11ab060 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -13,7 +13,7 @@ ["." product] ["." error (#+ Error)] ["." text - format] + ["%" format (#+ format)]] [collection ["." dictionary] ["." row] diff --git a/stdlib/source/program/licentia.lux b/stdlib/source/program/licentia.lux index 482777503..7f19a829c 100644 --- a/stdlib/source/program/licentia.lux +++ b/stdlib/source/program/licentia.lux @@ -24,7 +24,7 @@ ["." maybe] ["." error (#+ Error)] ["." text - format + ["%" format (#+ format)] ["." encoding]] [format ["." json]]] diff --git a/stdlib/source/program/licentia/document.lux b/stdlib/source/program/licentia/document.lux index 1fd0189eb..b3787f2f2 100644 --- a/stdlib/source/program/licentia/document.lux +++ b/stdlib/source/program/licentia/document.lux @@ -2,7 +2,7 @@ [lux (#- or and) [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]]) diff --git a/stdlib/source/program/licentia/input.lux b/stdlib/source/program/licentia/input.lux index a10452f5b..7af7c33d4 100644 --- a/stdlib/source/program/licentia/input.lux +++ b/stdlib/source/program/licentia/input.lux @@ -6,7 +6,7 @@ ["." parser]] [data [text - format] + ["%" format (#+ format)]] [format ["." json (#+ Reader)]]]] [// @@ -30,10 +30,10 @@ (json.field "version" json.string)))) (exception: #export (cannot-use-fractional-amount {amount Frac}) - (ex.report ["Amount" (%f amount)])) + (ex.report ["Amount" (%.frac amount)])) (exception: #export (cannot-use-negative-amount {amount Int}) - (ex.report ["Amount" (%i amount)])) + (ex.report ["Amount" (%.int amount)])) (def: amount (Reader Nat) @@ -48,8 +48,8 @@ (wrap (.nat amountI)))) (exception: #export (invalid-period {period (Period Nat)}) - (ex.report ["Start" (%n (get@ #time.start period))] - ["End" (%n (get@ #time.end period))])) + (ex.report ["Start" (%.nat (get@ #time.start period))] + ["End" (%.nat (get@ #time.end period))])) (def: period (Reader (Period Nat)) diff --git a/stdlib/source/program/licentia/license/assurance.lux b/stdlib/source/program/licentia/license/assurance.lux index c75598962..155472cd1 100644 --- a/stdlib/source/program/licentia/license/assurance.lux +++ b/stdlib/source/program/licentia/license/assurance.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/black-list.lux b/stdlib/source/program/licentia/license/black-list.lux index ac5ab8a2c..a71ceda9c 100644 --- a/stdlib/source/program/licentia/license/black-list.lux +++ b/stdlib/source/program/licentia/license/black-list.lux @@ -3,7 +3,7 @@ [data ["." maybe ("#;." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]] ["." // (#+ Entity Black-List) @@ -13,7 +13,7 @@ (def: #export entity (-> Entity Text) - %t) + %.text) (def: #export (black-list black-list) (-> Black-List Text) diff --git a/stdlib/source/program/licentia/license/commercial.lux b/stdlib/source/program/licentia/license/commercial.lux index 787d92034..f05bcf470 100644 --- a/stdlib/source/program/licentia/license/commercial.lux +++ b/stdlib/source/program/licentia/license/commercial.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Commercial) diff --git a/stdlib/source/program/licentia/license/definition.lux b/stdlib/source/program/licentia/license/definition.lux index fea7b91f4..6739039dc 100644 --- a/stdlib/source/program/licentia/license/definition.lux +++ b/stdlib/source/program/licentia/license/definition.lux @@ -2,7 +2,7 @@ [lux (#- Definition) [data ["." text - format]]] + ["%" format (#+ format)]]]] [/// ["$" document]]) diff --git a/stdlib/source/program/licentia/license/distribution.lux b/stdlib/source/program/licentia/license/distribution.lux index 077735b2c..58eaab22d 100644 --- a/stdlib/source/program/licentia/license/distribution.lux +++ b/stdlib/source/program/licentia/license/distribution.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Distribution) diff --git a/stdlib/source/program/licentia/license/extension.lux b/stdlib/source/program/licentia/license/extension.lux index 83da58873..68b5f6669 100644 --- a/stdlib/source/program/licentia/license/extension.lux +++ b/stdlib/source/program/licentia/license/extension.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." monoid)]]]] ["." // (#+ Extension) @@ -93,7 +93,7 @@ " must notify the software community of the availability of the " _.source-code-form " to any " _.extension " created by " _.recipient - " within " (%n start) + " within " (%.nat start) " month(s) of the date " _.recipient " initially does " _.deploy ", and include in such notification a description of the " _.extension @@ -101,7 +101,7 @@ " via an " _.electronic-distribution-mechanism) on-duration (format "The " _.source-code-form " must remain available via an " _.electronic-distribution-mechanism - " for no less than " (%n end) + " for no less than " (%.nat end) " month(s) after the date " _.recipient " ceases to " _.deploy) on-responsibility (format _.recipient @@ -116,7 +116,7 @@ " in excess of the actual cost of duplication and distribution of said copy that " _.recipient " incurs") on-changes (format "Should such instructions change, " _.recipient - " must notify the software community of revised instructions within " (%n start) + " must notify the software community of revised instructions within " (%.nat start) " month(s) of the date of change") on-accesibility (format _.recipient " must provide notification by posting to appropriate " ($.or news-sources) diff --git a/stdlib/source/program/licentia/license/grant.lux b/stdlib/source/program/licentia/license/grant.lux index 1725755b7..0f45f3592 100644 --- a/stdlib/source/program/licentia/license/grant.lux +++ b/stdlib/source/program/licentia/license/grant.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// [time (#+ Days)] ["_" term] @@ -83,7 +83,7 @@ " explicitly and finally terminates the grants to " _.recipient) complaint-period-condition (format "such " _.contributor " fails to notify " _.recipient - " of the non-compliance by some reasonable means prior to " (%n termination-period) + " of the non-compliance by some reasonable means prior to " (%.nat termination-period) " " ($.plural "day") " after " _.recipient " has come back into compliance")] (format "However, if " restoration-condition ", then " restored-grants " are reinstated provisionally" @@ -100,7 +100,7 @@ " has received notice of non-compliance with " _.license " from such " _.contributor) prompt-compliance (format _.recipient - " becomes compliant prior to " (%n grace-period) + " becomes compliant prior to " (%.nat grace-period) " " ($.plural "day") " after reception of the notice")] ($.and (list notification first-offense diff --git a/stdlib/source/program/licentia/license/liability.lux b/stdlib/source/program/licentia/license/liability.lux index 598341449..51b98ad40 100644 --- a/stdlib/source/program/licentia/license/liability.lux +++ b/stdlib/source/program/licentia/license/liability.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/limitation.lux b/stdlib/source/program/licentia/license/limitation.lux index 602a4f163..1617d9909 100644 --- a/stdlib/source/program/licentia/license/limitation.lux +++ b/stdlib/source/program/licentia/license/limitation.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/miscellaneous.lux b/stdlib/source/program/licentia/license/miscellaneous.lux index a04e3e1e2..03adb1462 100644 --- a/stdlib/source/program/licentia/license/miscellaneous.lux +++ b/stdlib/source/program/licentia/license/miscellaneous.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/notice.lux b/stdlib/source/program/licentia/license/notice.lux index 7e775078c..947669035 100644 --- a/stdlib/source/program/licentia/license/notice.lux +++ b/stdlib/source/program/licentia/license/notice.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor)]]]] ["." // #_ @@ -20,8 +20,8 @@ (let [(^slots [#//time.start #//time.end]) (get@ #//copyright.period holder) single-year? (n/= start end) period-section (if single-year? - (%n start) - (format (%n start) "-" (%n end)))] + (%.nat start) + (format (%.nat start) "-" (%.nat end)))] (format "Copyright (C) " period-section " " (get@ #//copyright.name holder)))) (def: #export copyright diff --git a/stdlib/source/program/licentia/license/submission.lux b/stdlib/source/program/licentia/license/submission.lux index d700c1c1c..855141690 100644 --- a/stdlib/source/program/licentia/license/submission.lux +++ b/stdlib/source/program/licentia/license/submission.lux @@ -2,7 +2,7 @@ [lux #* [data ["." text - format]]] + ["%" format (#+ format)]]]] [// ["_" term] [// diff --git a/stdlib/source/program/licentia/license/term.lux b/stdlib/source/program/licentia/license/term.lux index 31b3e4b5d..54b3b1cc4 100644 --- a/stdlib/source/program/licentia/license/term.lux +++ b/stdlib/source/program/licentia/license/term.lux @@ -1,37 +1,34 @@ (.module: - [lux (#- Definition) - [data - ["." text - format]]] - [// - ["." definition]]) + [lux (#- Definition)] + ["." // #_ + ["#." definition]]) (template [ ] [(def: #export Text - (get@ #definition.term ))] + (get@ #//definition.term ))] - [source-code-form definition.source-code-form] - [object-form definition.object-form] - [license definition.license] - [licensable definition.licensable] - [legal-entity definition.legal-entity] - [recipient definition.recipient] - [licensor definition.licensor] - [work definition.work] - [derivative-work definition.derivative-work] - [submission definition.submission] - [modification definition.modification] - [required-component definition.required-component] - [extension definition.extension] - [contribution definition.contribution] - [contributor definition.contributor] - [patent-claim definition.patent-claim] - [secondary-license definition.secondary-license] - [sell definition.sell] - [personal-use definition.personal-use] - [serve definition.serve] - [research definition.research] - [deploy definition.deploy] - [electronic-distribution-mechanism definition.electronic-distribution-mechanism] + [source-code-form //definition.source-code-form] + [object-form //definition.object-form] + [license //definition.license] + [licensable //definition.licensable] + [legal-entity //definition.legal-entity] + [recipient //definition.recipient] + [licensor //definition.licensor] + [work //definition.work] + [derivative-work //definition.derivative-work] + [submission //definition.submission] + [modification //definition.modification] + [required-component //definition.required-component] + [extension //definition.extension] + [contribution //definition.contribution] + [contributor //definition.contributor] + [patent-claim //definition.patent-claim] + [secondary-license //definition.secondary-license] + [sell //definition.sell] + [personal-use //definition.personal-use] + [serve //definition.serve] + [research //definition.research] + [deploy //definition.deploy] + [electronic-distribution-mechanism //definition.electronic-distribution-mechanism] ) diff --git a/stdlib/source/program/licentia/output.lux b/stdlib/source/program/licentia/output.lux index 43080697e..05d68ff76 100644 --- a/stdlib/source/program/licentia/output.lux +++ b/stdlib/source/program/licentia/output.lux @@ -3,7 +3,7 @@ [data ["." maybe ("#;." functor)] ["." text - format] + ["%" format (#+ format)]] [collection ["." list ("#;." functor monoid)]]]] [// diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index 1522e8f66..569371900 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -15,7 +15,7 @@ [format ["md" markdown (#+ Markdown Span Block)]] ["." text ("#;." equivalence) - format + ["%" format (#+ format)] ["." encoding]] [collection ["." sequence (#+ Sequence) ("#;." functor)] @@ -104,10 +104,10 @@ [_ (#.Primitive name params)] (case params #.Nil - (format "(primitive " (%t name) ")") + (format "(primitive " (%.text name) ")") _ - (format "(primitive " (%t name) " " (|> params (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")")) + (format "(primitive " (%.text name) " " (|> params (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")")) [_ (#.Sum _)] (let [members (type.flatten-variant type)] @@ -166,7 +166,7 @@ (^template [
 ]
         [_ ( id)]
-        (format 
 (%n id) ))
+        (format 
 (%.nat id) ))
       ([#.Var "⌈v:" "⌋"]
        [#.Ex  "⟨e:" "⟩"])
 
@@ -196,7 +196,7 @@
       [_ (#.Named [_module _name] type)]
       (if (text;= module _module)
         _name
-        (%name [_module _name]))
+        (%.name [_module _name]))
       )))
 
 (def: (pprint-type level type-func-name module type)
@@ -205,10 +205,10 @@
     (#.Primitive name params)
     (case params
       #.Nil
-      (format "(primitive " (%t name) ")")
+      (format "(primitive " (%.text name) ")")
 
       _
-      (format "(primitive " (%t name) " " (|> params (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
+      (format "(primitive " (%.text name) " " (|> params (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
 
     (#.Sum _)
     (let [members (type.flatten-variant type)]
@@ -231,7 +231,7 @@
 
     (^template [ 
 ]
       ( id)
-      (format 
 (%n id) ))
+      (format 
 (%.nat id) ))
     ([#.Var "⌈" "⌋"]
      [#.Ex  "⟨" "⟩"])
 
@@ -253,7 +253,7 @@
     (#.Named [_module _name] type)
     (if (text;= module _module)
       _name
-      (%name [_module _name]))
+      (%.name [_module _name]))
     ))
 
 (type: (Mutation a)
@@ -337,7 +337,7 @@
     type))
 
 (exception: #export (anonymous-type-definition {type Type})
-  (ex.report ["Type" (%type type)]))
+  (ex.report ["Type" (%.type type)]))
 
 (def: (document-type module type def-annotations)
   (-> Text Type Code (Meta (Markdown Block)))
diff --git a/stdlib/source/spec/compositor/generation/case.lux b/stdlib/source/spec/compositor/generation/case.lux
index 880a26eae..5b1187210 100644
--- a/stdlib/source/spec/compositor/generation/case.lux
+++ b/stdlib/source/spec/compositor/generation/case.lux
@@ -8,7 +8,7 @@
    [data
     ["." error (#+ Error)]
     ["." text ("#@." equivalence)
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list ("#@." fold)]]]
    [math
@@ -97,7 +97,7 @@
   (-> Runner Test)
   (do r.monad
     [value r.safe-frac]
-    (_.test (%name (name-of synthesis.branch/let))
+    (_.test (%.name (name-of synthesis.branch/let))
             (|> (synthesis.branch/let [(synthesis.f64 value)
                                        0
                                        (synthesis.variable/local 0)])
@@ -110,7 +110,7 @@
     [on-true r.safe-frac
      on-false (|> r.safe-frac (r.filter (|>> (f/= on-true) not)))
      verdict r.bit]
-    (_.test (%name (name-of synthesis.branch/if))
+    (_.test (%.name (name-of synthesis.branch/if))
             (|> (synthesis.branch/if [(synthesis.bit verdict)
                                       (synthesis.f64 on-true)
                                       (synthesis.f64 on-false)])
@@ -123,7 +123,7 @@
     [[inputS pathS] ..case
      on-success r.safe-frac
      on-failure (|> r.safe-frac (r.filter (|>> (f/= on-success) not)))]
-    (_.test (%name (name-of synthesis.branch/case))
+    (_.test (%.name (name-of synthesis.branch/case))
             (|> (synthesis.branch/case
                  [inputS
                   ($_ synthesis.path/alt
diff --git a/stdlib/source/spec/compositor/generation/common.lux b/stdlib/source/spec/compositor/generation/common.lux
index c837c30a3..a4037c9d4 100644
--- a/stdlib/source/spec/compositor/generation/common.lux
+++ b/stdlib/source/spec/compositor/generation/common.lux
@@ -11,7 +11,7 @@
     [number
      ["." i64]]
     ["." text ("#@." equivalence)
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list]]]
    [math
diff --git a/stdlib/source/spec/compositor/generation/function.lux b/stdlib/source/spec/compositor/generation/function.lux
index 2a8b4687d..0f12906a0 100644
--- a/stdlib/source/spec/compositor/generation/function.lux
+++ b/stdlib/source/spec/compositor/generation/function.lux
@@ -8,8 +8,6 @@
    [data
     ["." maybe]
     ["." error (#+ Error)]
-    [text
-     format]
     [collection
      ["." list ("#@." functor)]]]
    [math
diff --git a/stdlib/source/spec/compositor/generation/primitive.lux b/stdlib/source/spec/compositor/generation/primitive.lux
index 63568fbce..48ff99933 100644
--- a/stdlib/source/spec/compositor/generation/primitive.lux
+++ b/stdlib/source/spec/compositor/generation/primitive.lux
@@ -11,7 +11,7 @@
     [number
      ["." frac]]
     ["." text ("#@." equivalence)
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]
    [tool
@@ -32,7 +32,7 @@
           (~~ (template [   ]
                 [(do r.monad
                    [expected ]
-                   (_.test (%name (name-of ))
+                   (_.test (%.name (name-of ))
                            (|> (run  ( expected))
                                (case> (#error.Success actual)
                                       ( expected (:assume actual))
diff --git a/stdlib/source/spec/compositor/generation/structure.lux b/stdlib/source/spec/compositor/generation/structure.lux
index 99745a819..d22775a43 100644
--- a/stdlib/source/spec/compositor/generation/structure.lux
+++ b/stdlib/source/spec/compositor/generation/structure.lux
@@ -9,7 +9,7 @@
     ["." error]
     ["." maybe]
     ["." text ("#@." equivalence)
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." array (#+ Array)]
      ["." list ("#@." functor)]]]
@@ -32,7 +32,7 @@
      tag-in (|> r.nat (:: @ map (n/% num-tags)))
      #let [last?-in (|> num-tags dec (n/= tag-in))]
      value-in r.i64]
-    (_.test (%name (name-of synthesis.variant))
+    (_.test (%.name (name-of synthesis.variant))
             (|> (synthesis.variant {#analysis.lefts (if last?-in
                                                       (dec tag-in)
                                                       tag-in)
@@ -65,7 +65,7 @@
   (do r.monad
     [size (|> r.nat (:: @ map (|>> (n/% 10) (n/max 2))))
      tuple-in (r.list size r.i64)]
-    (_.test (%name (name-of synthesis.tuple))
+    (_.test (%.name (name-of synthesis.tuple))
             (|> (synthesis.tuple (list@map (|>> synthesis.i64) tuple-in))
                 (run "tuple")
                 (case> (#error.Success tuple-out)
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index b69a6b969..945fd9c54 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -28,7 +28,7 @@
      [locale (#+)
       [language (#+)]
       [territory (#+)]]
-     data/text/format
+     ["%" data/text/format (#+ format)]
      ["r" math/random (#+ Random) ("#@." functor)]
      ## TODO: Test these modules
      [data
@@ -322,8 +322,8 @@
           (<| (_.context "Conversion.")
               (`` ($_ _.and
                       (~~ (template [<=>   ]
-                            [(<| (_.context (format (%name (name-of ))
-                                                    " " (%name (name-of ))))
+                            [(<| (_.context (format (%.name (name-of ))
+                                                    " " (%.name (name-of ))))
                                  (..conversion    <=>))]
 
                             [i/= .nat         .int         (r@map (i/% +1,000,000) r.int)]
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index 6b3ea631f..b2d67d3e9 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -3,7 +3,7 @@
    [abstract/monad (#+ do)]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [control
     ["." function]]
    [math
@@ -63,7 +63,7 @@
 
 (def: #export (spec injection comparison apply)
   (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
-  (_.context (%name (name-of /.Apply))
+  (_.context (%.name (name-of /.Apply))
              ($_ _.and
                  (..identity injection comparison apply)
                  (..homomorphism injection comparison apply)
diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux
index 80203c237..99afe290f 100644
--- a/stdlib/source/test/lux/abstract/codec.lux
+++ b/stdlib/source/test/lux/abstract/codec.lux
@@ -3,7 +3,7 @@
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." error]]
    [math
     ["r" random (#+ Random)]]]
@@ -16,7 +16,7 @@
   (All [m a] (-> (Equivalence a) (Codec m a) (Random a) Test))
   (do r.monad
     [expected generator]
-    (<| (_.context (%name (name-of /.Codec)))
+    (<| (_.context (%.name (name-of /.Codec)))
         (_.test "Isomorphism."
                 (case (|> expected /@encode /@decode)
                   (#error.Success actual)
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index b0498dc09..926230ce1 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [control
     ["." function]]
@@ -14,7 +14,7 @@
   (All [a] (-> (Enum a) (Random a) Test))
   (do r.monad
     [sample gen-sample]
-    (<| (_.context (%name (name-of /.Order)))
+    (<| (_.context (%.name (name-of /.Order)))
         ($_ _.and
             (_.test "Successor and predecessor are inverse functions."
                     (and (/@= (|> sample /@succ /@pred)
diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux
index d9e61131f..ac0084e82 100644
--- a/stdlib/source/test/lux/abstract/equivalence.lux
+++ b/stdlib/source/test/lux/abstract/equivalence.lux
@@ -4,7 +4,7 @@
    [abstract/monad (#+ do)]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random (#+ Random)]]]
   {1
@@ -15,7 +15,7 @@
   (do r.monad
     [left generator
      right generator]
-    (<| (_.context (%name (name-of /.Equivalence)))
+    (<| (_.context (%.name (name-of /.Equivalence)))
         ($_ _.and
             (_.test "Reflexivity."
                     (_@= left left))
diff --git a/stdlib/source/test/lux/abstract/fold.lux b/stdlib/source/test/lux/abstract/fold.lux
index 8dfe7fc4c..99ac25c5b 100644
--- a/stdlib/source/test/lux/abstract/fold.lux
+++ b/stdlib/source/test/lux/abstract/fold.lux
@@ -1,7 +1,7 @@
 (.module:
   [lux #*
    ["_" test (#+ Test)]
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random]
    [abstract/monad (#+ do)]]
   [//
@@ -11,7 +11,7 @@
 
 (def: #export (spec injection comparison (^open "/@."))
   (All [f] (-> (Injection f) (Comparison f) (Fold f) Test))
-  (_.context (%name (name-of /.Fold))
+  (_.context (%.name (name-of /.Fold))
              (do r.monad
                [subject r.nat
                 parameter r.nat]
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index 77a07233b..4c7c87c63 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -1,7 +1,7 @@
 (.module:
   [lux #*
    ["_" test (#+ Test)]
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random]
    [abstract
     [equivalence (#+ Equivalence)]
@@ -51,7 +51,7 @@
 
 (def: #export (spec injection comparison functor)
   (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
-  (_.context (%name (name-of /.Functor))
+  (_.context (%.name (name-of /.Functor))
              ($_ _.and
                  (..identity injection comparison functor)
                  (..homomorphism injection comparison functor)
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index 62b56a5fb..e4a489822 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -13,7 +13,7 @@
     [number
      ["." nat]]
     [text
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." set]
      ["." list]]]
@@ -217,7 +217,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Interval)))
+  (<| (_.context (%.name (name-of /.Interval)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..interval)
           (<| (_.context "Boundaries.")
@@ -238,7 +238,7 @@
 
 (def: #export (spec (^open ",@.") gen-sample)
   (All [a] (-> (Interval a) (Random a) Test))
-  (<| (_.context (%name (name-of /.Interval)))
+  (<| (_.context (%.name (name-of /.Interval)))
       (do r.monad
         [sample gen-sample]
         ($_ _.and
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index 827a1e509..c420d6416 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -2,7 +2,7 @@
   [lux #*
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [control
     ["." function]]
    [math
@@ -51,7 +51,7 @@
 
 (def: #export (spec injection comparison monad)
   (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
-  (_.context (%name (name-of /.Monad))
+  (_.context (%.name (name-of /.Monad))
              ($_ _.and
                  (..left-identity injection comparison monad)
                  (..right-identity injection comparison monad)
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index 3600795ff..b0f89abc7 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
    [math
@@ -16,7 +16,7 @@
   (All [a] (-> (Equivalence a) (Monoid a) (Random a) Test))
   (do r.monad
     [sample gen-sample]
-    (<| (_.context (%name (name-of /.Monoid)))
+    (<| (_.context (%.name (name-of /.Monoid)))
         ($_ _.and
             (_.test "Left identity."
                     (/@= sample (/@compose /@identity sample)))
diff --git a/stdlib/source/test/lux/abstract/number.lux b/stdlib/source/test/lux/abstract/number.lux
index 363621791..e04ad3124 100644
--- a/stdlib/source/test/lux/abstract/number.lux
+++ b/stdlib/source/test/lux/abstract/number.lux
@@ -4,7 +4,7 @@
    [abstract/monad (#+ do)]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random (#+ Random)]]]
   {1
@@ -20,7 +20,7 @@
                               gen-sample)]
      parameter non-zero
      subject non-zero]
-    (<| (_.context (%name (name-of /.Number)))
+    (<| (_.context (%.name (name-of /.Number)))
         ($_ _.and
             (_.test "Addition and subtraction are inverse functions."
                     (|> subject (/@+ parameter) (/@- parameter) (/@= subject)))
diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux
index 5406a490c..c31ab31e1 100644
--- a/stdlib/source/test/lux/abstract/order.lux
+++ b/stdlib/source/test/lux/abstract/order.lux
@@ -4,7 +4,7 @@
    [abstract/monad (#+ do)]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random (#+ Random)]]]
   {1
@@ -15,7 +15,7 @@
   (do r.monad
     [parameter generator
      subject generator]
-    (<| (_.context (%name (name-of /.Order)))
+    (<| (_.context (%.name (name-of /.Order)))
         ($_ _.and
             (_.test "Values are either ordered, or they are equal. All options are mutually exclusive."
                     (cond (,@< parameter subject)
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index a39f7b039..017ee60ef 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -8,7 +8,7 @@
    [data
     ["." error]
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -28,7 +28,7 @@
 
   ((stop cause state)
    (promise;wrap (log! (if (ex.match? /.poisoned cause)
-                         (format "Counter was poisoned: " (%n state))
+                         (format "Counter was poisoned: " (%.nat state))
                          cause)))))
 
 (message: #export Counter
@@ -40,7 +40,7 @@
   Test
   (do r.monad
     [_ (wrap [])]
-    (<| (_.context (%name (name-of /.Actor)))
+    (<| (_.context (%.name (name-of /.Actor)))
         ($_ _.and
             (_.test "Can check if an actor is alive."
                     (io.run (do io.monad
diff --git a/stdlib/source/test/lux/control/concurrency/atom.lux b/stdlib/source/test/lux/control/concurrency/atom.lux
index 63f9ec296..15d24b826 100644
--- a/stdlib/source/test/lux/control/concurrency/atom.lux
+++ b/stdlib/source/test/lux/control/concurrency/atom.lux
@@ -2,7 +2,7 @@
   [lux #*
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [math
     ["r" random]]
    [control
@@ -12,7 +12,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Atom)))
+  (<| (_.context (%.name (name-of /.Atom)))
       (do r.monad
         [value r.nat
          swap-value r.nat
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 5a4a41adb..5b412e212 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -5,7 +5,7 @@
    [control
     pipe
     ["." io]]
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [math
     ["r" random]]]
   {1
@@ -15,7 +15,7 @@
   Test
   (do r.monad
     [_ (wrap [])]
-    (<| (_.context (%name (name-of /.Promise)))
+    (<| (_.context (%.name (name-of /.Promise)))
         ($_ _.and
             (wrap (do /.monad
                     [running? (/.future (io.io #1))]
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 369bc8507..05329d9f0 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -11,7 +11,7 @@
    [data
     ["." maybe]
     ["." text ("#;." equivalence monoid)
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list ("#;." functor)]]]
    [math
@@ -119,7 +119,7 @@
 ##   (-> (Atom Text) /.Barrier Nat (Promise Any))
 ##   (do promise.monad
 ##     [_ (/.block barrier)
-##      #let [_ (io.run (atom.update (|>> (format (%n id))) resource))]]
+##      #let [_ (io.run (atom.update (|>> (format (%.nat id))) resource))]]
 ##     (wrap [])))
 
 ## (context: "Barrier."
@@ -139,6 +139,6 @@
 ##                 (assert "A barrier can stop all processes from acting, until an amount of waiting processes is reached, and then the barrier is un-blocked for all."
 ##                         (and (text.ends-with? "__________" outcome)
 ##                              (list.every? (function (_ id)
-##                                             (text.contains? (%n id) outcome))
+##                                             (text.contains? (%.nat id) outcome))
 ##                                           ids)
 ##                              )))))))
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index 6b9a65a55..ca9d3c050 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -5,7 +5,7 @@
    [control
     ["." io (#+ IO)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     [number
      ["." nat]]
     [collection
@@ -38,7 +38,7 @@
   Test
   (do r.monad
     [_ (wrap [])]
-    (<| (_.context (%name (name-of /.STM)))
+    (<| (_.context (%.name (name-of /.STM)))
         ($_ _.and
             (wrap (do promise.monad
                     [output (/.commit (/.read (/.var 0)))]
diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux
index 571225ecc..b8d4b96d2 100644
--- a/stdlib/source/test/lux/control/continuation.lux
+++ b/stdlib/source/test/lux/control/continuation.lux
@@ -12,7 +12,7 @@
     [number
      ["." nat]]
     [text
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list]]]
    [math
@@ -31,7 +31,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Cont)))
+  (<| (_.context (%.name (name-of /.Cont)))
       (do r.monad
         [sample r.nat
          #let [(^open "_;.") /.apply
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index 7b7d90dbf..46d495a4b 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -3,7 +3,7 @@
    [abstract/monad (#+ do)]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]
    ["_" test (#+ Test)]]
@@ -17,7 +17,7 @@
   (do r.monad
     [right r.nat
      wrong (r.filter (|>> (n/= right) not) r.nat)]
-    (<| (_.context (%name (name-of /.Exception)))
+    (<| (_.context (%.name (name-of /.Exception)))
         ($_ _.and
             (_.test "Can catch exceptions."
                     (n/= right
diff --git a/stdlib/source/test/lux/control/io.lux b/stdlib/source/test/lux/control/io.lux
index 1a14558b2..4e000d39c 100644
--- a/stdlib/source/test/lux/control/io.lux
+++ b/stdlib/source/test/lux/control/io.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    ["r" math/random]
    [abstract
@@ -26,7 +26,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.IO)))
+  (<| (_.context (%.name (name-of /.IO)))
       (do r.monad
         [sample r.nat
          exit-code r.int]
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 6e1845d15..d9ea8865b 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -17,7 +17,7 @@
     [number
      ["." nat]]
     ["." text ("#;." equivalence)
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list ("#;." functor)]]]
    [math
@@ -226,7 +226,7 @@
   Test
   (do r.monad
     [assertion (r.ascii 1)]
-    (<| (_.context (%name (name-of /.Parser)))
+    (<| (_.context (%.name (name-of /.Parser)))
         ($_ _.and
             ($functor.spec ..injection ..comparison /.functor)
             ($apply.spec ..injection ..comparison /.apply)
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux
index aab4c5158..5c87513d4 100644
--- a/stdlib/source/test/lux/control/parser/cli.lux
+++ b/stdlib/source/test/lux/control/parser/cli.lux
@@ -1,7 +1,6 @@
 (.module:
   [lux #*
    [data
-    text/format
     ["." name]]
    ["M" abstract/monad (#+ Monad do)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index ae2c448c7..b263a20b6 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -1,7 +1,6 @@
 (.module:
   [lux #*
    [data
-    text/format
     ["." name]]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux
index 9b4110a39..4d4e03a79 100644
--- a/stdlib/source/test/lux/control/pipe.lux
+++ b/stdlib/source/test/lux/control/pipe.lux
@@ -7,7 +7,7 @@
     ["." identity]
     ["." name]
     ["." text ("#@." equivalence)
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -69,16 +69,16 @@
             (_.test "Execution."
                     (n/= (n/* 10 sample)
                          (|> sample
-                             (exec> [%n (format "sample = ") log!])
+                             (exec> [%.nat (format "sample = ") log!])
                              (n/* 10))))
             (_.test "Tuple."
                     (let [[left middle right] (|> sample
                                                   (tuple> [inc]
                                                           [dec]
-                                                          [%n]))]
+                                                          [%.nat]))]
                       (and (n/= (inc sample) left)
                            (n/= (dec sample) middle)
-                           (text@= (%n sample) right))))
+                           (text@= (%.nat sample) right))))
             (_.test "Pattern-matching."
                     (text@= (case (n/% 10 sample)
                               0 "zero"
diff --git a/stdlib/source/test/lux/control/reader.lux b/stdlib/source/test/lux/control/reader.lux
index 94aacdb5d..49cb23a48 100644
--- a/stdlib/source/test/lux/control/reader.lux
+++ b/stdlib/source/test/lux/control/reader.lux
@@ -10,7 +10,7 @@
       ["$." monad]]}]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -30,7 +30,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [sample r.nat
          factor r.nat]
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index 57ed91c1a..25ea20ab3 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -6,7 +6,7 @@
    [data
     ["." error (#+ Error)]
     [text
-     format]
+     ["%" format (#+ format)]]
     [collection
      ["." list]]]
    [math
@@ -35,7 +35,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [expected-clean-ups (|> r.nat (:: @ map (|>> (n/% 100) (n/max 1))))]
         ($_ _.and
diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux
index 6fbcea774..edbacddd6 100644
--- a/stdlib/source/test/lux/control/security/policy.lux
+++ b/stdlib/source/test/lux/control/security/policy.lux
@@ -15,8 +15,7 @@
      ["!" capability]]]
    [data
     ["." name]
-    ["." text ("#@." equivalence)
-     format]]
+    ["." text ("#@." equivalence)]]
    [math
     ["r" random]]]
   {1
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 96f9e9d34..778162d61 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -14,7 +14,7 @@
    [data
     ["." product]
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -119,7 +119,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.State)))
+  (<| (_.context (%.name (name-of /.State)))
       ($_ _.and
           (<| (_.context "Basics.")
               ..basics)
diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux
index 56d3a7d5c..84bcfbcd4 100644
--- a/stdlib/source/test/lux/control/thread.lux
+++ b/stdlib/source/test/lux/control/thread.lux
@@ -10,7 +10,7 @@
       ["$." monad]]}]
    [data
     [text
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -30,7 +30,7 @@
   (do r.monad
     [original r.nat
      factor r.nat]
-    (<| (_.context (%name (name-of /.Thread)))
+    (<| (_.context (%.name (name-of /.Thread)))
         ($_ _.and
             ($functor.spec ..injection ..comparison /.functor)
             ($apply.spec ..injection ..comparison /.apply)
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index a95384fef..5f510d6c0 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -15,7 +15,7 @@
    [data
     ["." product]
     ["." text ("#;." equivalence)
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random]]]
   {1
@@ -36,7 +36,7 @@
     [log (r.ascii 1)
      left r.nat
      right r.nat]
-    (<| (_.context (%name (name-of /.Writer)))
+    (<| (_.context (%.name (name-of /.Writer)))
         ($_ _.and
             ($functor.spec (..injection text.monoid) ..comparison /.functor)
             ($apply.spec (..injection text.monoid) ..comparison (/.apply text.monoid))
diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux
index eebca5f2a..7dda82016 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    ["r" math/random]
    [abstract
@@ -17,7 +17,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .Bit)))
+  (<| (_.context (%.name (name-of .Bit)))
       (do r.monad
         [value r.bit]
         ($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index c210a9163..50b1fcc71 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do Monad)]
@@ -34,7 +34,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Array)))
+  (<| (_.context (%.name (name-of /.Array)))
       (do r.monad
         [size bounded-size]
         ($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 4b9743912..b0f4dec0e 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -27,7 +27,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..bits)
           (do r.monad
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 863c47973..4512c0bec 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -26,7 +26,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Dictionary)))
+  (<| (_.context (%.name (name-of /.Dictionary)))
       (do r.monad
         [#let [capped-nat (:: r.monad map (n/% 100) r.nat)]
          size capped-nat
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 57dab9884..28119cd93 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -39,7 +39,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Dictionary)))
+  (<| (_.context (%.name (name-of /.Dictionary)))
       (do r.monad
         [size (|> r.nat (:: @ map (n/% 100)))
          keys (r.set nat.hash size r.nat)
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index fb97c3d32..77d473fd6 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -64,7 +64,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .List)))
+  (<| (_.context (%.name (name-of .List)))
       (do r.monad
         [size bounded-size
          #let [(^open "/@.") (/.equivalence nat.equivalence)
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 506cf15e3..f9a32c0c8 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -22,7 +22,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Queue)))
+  (<| (_.context (%.name (name-of /.Queue)))
       (do r.monad
         [size (:: @ map (n/% 100) r.nat)
          sample (r.queue size r.nat)
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 4c4f2923a..9464819a3 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     ["." monad (#+ do)]]
@@ -26,7 +26,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Queue)))
+  (<| (_.context (%.name (name-of /.Queue)))
       (do r.monad
         [size (|> r.nat (:: @ map (n/% 100)))
          sample (..queue size)
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 15085776b..7afbafd59 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -25,7 +25,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 10))))]
         ($_ _.and
@@ -43,35 +43,35 @@
                non-member (|> r.nat (r.filter (|>> (/.member? nat.equivalence sample) not)))
                #let [(^open "/@.") (/.equivalence nat.equivalence)]]
               ($_ _.and
-                  (_.test (format (%name (name-of /.size))
-                                  " " (%name (name-of /.empty?)))
+                  (_.test (format (%.name (name-of /.size))
+                                  " " (%.name (name-of /.empty?)))
                           (if (/.empty? sample)
                             (and (n/= 0 size)
                                  (n/= 0 (/.size sample)))
                             (n/= size (/.size sample))))
-                  (_.test (format (%name (name-of /.add))
-                                  " " (%name (name-of /.pop)))
+                  (_.test (format (%.name (name-of /.add))
+                                  " " (%.name (name-of /.pop)))
                           (and (n/= (inc size) (/.size (/.add non-member sample)))
                                (n/= (dec size) (/.size (/.pop sample)))))
-                  (_.test (format (%name (name-of /.put))
-                                  " " (%name (name-of /.nth)))
+                  (_.test (format (%.name (name-of /.put))
+                                  " " (%.name (name-of /.nth)))
                           (|> sample
                               (/.put idx non-member)
                               (/.nth idx)
                               maybe.assume
                               (is? non-member)))
-                  (_.test (%name (name-of /.update))
+                  (_.test (%.name (name-of /.update))
                           (|> sample
                               (/.put idx non-member) (/.update idx inc)
                               (/.nth idx) maybe.assume
                               (n/= (inc non-member))))
-                  (_.test (format (%name (name-of /.to-list))
-                                  " " (%name (name-of /.from-list)))
+                  (_.test (format (%.name (name-of /.to-list))
+                                  " " (%.name (name-of /.from-list)))
                           (|> sample /.to-list /.from-list (/@= sample)))
-                  (_.test (%name (name-of /.member?))
+                  (_.test (%.name (name-of /.member?))
                           (and (not (/.member? nat.equivalence sample non-member))
                                (/.member? nat.equivalence (/.add non-member sample) non-member)))
-                  (_.test (%name (name-of /.reverse))
+                  (_.test (%.name (name-of /.reverse))
                           (and (not (/@= sample
                                          (/.reverse sample)))
                                (/@= sample
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index 19926ca92..2beb3599f 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     comonad
@@ -20,7 +20,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Sequence)))
+  (<| (_.context (%.name (name-of /.Sequence)))
       (do r.monad
         [size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 2))))
          offset (|> r.nat (:: @ map (n/% 100)))
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index f272cf305..6e668af56 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -25,7 +25,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Set)))
+  (<| (_.context (%.name (name-of /.Set)))
       (do r.monad
         [size gen-nat]
         ($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 4bddfaf33..fa7c00798 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -39,7 +39,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Set)))
+  (<| (_.context (%.name (name-of /.Set)))
       ($_ _.and
           (do r.monad
             [size gen-nat]
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index 05b8efc47..74ddf6c86 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -28,7 +28,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [size gen-nat
          sample (r.stack size gen-nat)
@@ -37,13 +37,13 @@
             ($equivalence.spec (/.equivalence nat.equivalence) (r.stack size r.nat))
             ($functor.spec ..injection /.equivalence /.functor)
             
-            (_.test (%name (name-of /.size))
+            (_.test (%.name (name-of /.size))
                     (n/= size (/.size sample)))
-            (_.test (%name (name-of /.peek))
+            (_.test (%.name (name-of /.peek))
                     (case (/.peek sample)
                       #.None     (/.empty? sample)
                       (#.Some _) (not (/.empty? sample))))
-            (_.test (%name (name-of /.pop))
+            (_.test (%.name (name-of /.pop))
                     (case (/.size sample)
                       0 (case (/.pop sample)
                           #.None
@@ -58,7 +58,7 @@
                                  
                                  #.None
                                  false)))
-            (_.test (%name (name-of /.push))
+            (_.test (%.name (name-of /.push))
                     (and (is? sample
                               (|> sample (/.push new-top) /.pop maybe.assume))
                          (n/= (inc (/.size sample))
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 65b46e382..1506494c8 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -47,7 +47,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Tree)))
+  (<| (_.context (%.name (name-of /.Tree)))
       (do r.monad
         [size (:: @ map (|>> (n/% 100) (n/+ 1)) r.nat)]
         ($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index f4b812420..71d5a71cd 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do Monad)]
    [control
@@ -22,7 +22,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Zipper)))
+  (<| (_.context (%.name (name-of /.Zipper)))
       (do r.monad
         [size (:: @ map (|>> (n/% 90) (n/+ 10)) r.nat)
          sample (//.tree size r.nat)
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index a8a61cb46..86abba0a3 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -7,7 +7,7 @@
      [/
       ["$." equivalence]]}]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     [number
      ["." frac ("#@." number)]]]
    ["." math
@@ -52,7 +52,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [any ..color
          colorful (|> color
diff --git a/stdlib/source/test/lux/data/error.lux b/stdlib/source/test/lux/data/error.lux
index f65128ec3..340b4b73b 100644
--- a/stdlib/source/test/lux/data/error.lux
+++ b/stdlib/source/test/lux/data/error.lux
@@ -13,7 +13,7 @@
     pipe
     ["." io]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     [number
      ["." nat]]]
    [math
@@ -38,7 +38,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec (/.equivalence nat.equivalence) (..error r.nat))
           ($functor.spec ..injection ..comparison /.functor)
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index c2826143a..61cf67a6c 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     codec
@@ -63,7 +63,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..json)
           ($codec.spec /.equivalence /.codec ..json)
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 0ad940971..6ca73269a 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux (#- char)
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ Monad do)]
@@ -66,7 +66,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.XML)))
+  (<| (_.context (%.name (name-of /.XML)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..xml)
           ($codec.spec /.equivalence /.codec ..xml)
diff --git a/stdlib/source/test/lux/data/identity.lux b/stdlib/source/test/lux/data/identity.lux
index 3d0ae44c2..cd9f480fa 100644
--- a/stdlib/source/test/lux/data/identity.lux
+++ b/stdlib/source/test/lux/data/identity.lux
@@ -13,7 +13,7 @@
       ["$." monad]]}]
    [data
     ["." text ("#@." monoid equivalence)
-     format]]]
+     ["%" format (#+ format)]]]]
   {1
    ["." / (#+ Identity)]})
 
@@ -28,7 +28,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Identity)))
+  (<| (_.context (%.name (name-of /.Identity)))
       ($_ _.and
           ($functor.spec ..injection ..comparison /.functor)
           ($apply.spec ..injection ..comparison /.apply)
diff --git a/stdlib/source/test/lux/data/lazy.lux b/stdlib/source/test/lux/data/lazy.lux
index 62b1273e4..cfc096326 100644
--- a/stdlib/source/test/lux/data/lazy.lux
+++ b/stdlib/source/test/lux/data/lazy.lux
@@ -10,7 +10,7 @@
       ["$." monad]
       ["$." equivalence]]}]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     [number
      ["." nat]]]
    [math
@@ -33,7 +33,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Lazy)))
+  (<| (_.context (%.name (name-of /.Lazy)))
       (do r.monad
         [left r.nat
          right r.nat
diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux
index a92141bd9..60d154a7a 100644
--- a/stdlib/source/test/lux/data/maybe.lux
+++ b/stdlib/source/test/lux/data/maybe.lux
@@ -14,7 +14,7 @@
     pipe]
    [data
     ["." text
-     format]
+     ["%" format (#+ format)]]
     [number
      ["." nat]]]
    [math
@@ -28,7 +28,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .Maybe)))
+  (<| (_.context (%.name (name-of .Maybe)))
       ($_ _.and
           ($equivalence.spec (/.equivalence nat.equivalence) (..maybe r.nat))
           ($functor.spec /@wrap /.equivalence /.functor)
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index d9ee517d0..63acad50b 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -11,7 +11,7 @@
     pipe]
    [data
     ["." text ("#@." equivalence)
-     format]]
+     ["%" format (#+ format)]]]
    [math
     ["r" random (#+ Random)]]]
   {1
@@ -28,7 +28,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .Name)))
+  (<| (_.context (%.name (name-of .Name)))
       (do r.monad
         [## First Name
          sizeM1 (|> r.nat (:: @ map (n/% 100)))
diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux
index 644db8e27..6d7689582 100644
--- a/stdlib/source/test/lux/data/number/complex.lux
+++ b/stdlib/source/test/lux/data/number/complex.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -193,7 +193,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ..construction
           ..absolute-value
diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/data/number/frac.lux
index 544ab858c..e683fb134 100644
--- a/stdlib/source/test/lux/data/number/frac.lux
+++ b/stdlib/source/test/lux/data/number/frac.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -20,20 +20,20 @@
 (def: #export test
   Test
   (let [gen-frac (:: r.monad map (|>> (i/% +100) .int-to-frac) r.int)]
-    (<| (_.context (%name (name-of /._)))
+    (<| (_.context (%.name (name-of /._)))
         (`` ($_ _.and
                 ($equivalence.spec /.equivalence gen-frac)
                 ($order.spec /.order gen-frac)
                 ($number.spec /.order /.number gen-frac)
                 (~~ (template []
-                      [(<| (_.context (%name (name-of )))
+                      [(<| (_.context (%.name (name-of )))
                            ($monoid.spec /.equivalence  gen-frac))]
 
                       [/.addition] [/.multiplication] [/.minimum] [/.maximum]
                       ))
                 ## TODO: Uncomment ASAP
                 ## (~~ (template []
-                ##     [(<| (_.context (%name (name-of /.binary)))
+                ##     [(<| (_.context (%.name (name-of /.binary)))
                 ##          ($codec.spec /.equivalence  gen-frac))]
 
                 ##     [/.binary] [/.octal] [/.decimal] [/.hex]
@@ -48,6 +48,6 @@
                                   (hex "+dead,BE.EF"))))
                 (do r.monad
                   [sample gen-frac]
-                  (_.test (format (%name (name-of /.frac-to-bits)) " " (%name (name-of /.bits-to-frac)))
+                  (_.test (format (%.name (name-of /.frac-to-bits)) " " (%.name (name-of /.bits-to-frac)))
                           (|> sample /.frac-to-bits /.bits-to-frac (f/= sample))))
                 )))))
diff --git a/stdlib/source/test/lux/data/number/i64.lux b/stdlib/source/test/lux/data/number/i64.lux
index 1519b1e48..c4124669b 100644
--- a/stdlib/source/test/lux/data/number/i64.lux
+++ b/stdlib/source/test/lux/data/number/i64.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -16,7 +16,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [pattern r.nat
          idx (:: @ map (n/% /.width) r.nat)]
diff --git a/stdlib/source/test/lux/data/number/int.lux b/stdlib/source/test/lux/data/number/int.lux
index 5b0d523ae..4fa93051b 100644
--- a/stdlib/source/test/lux/data/number/int.lux
+++ b/stdlib/source/test/lux/data/number/int.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -21,7 +21,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (`` ($_ _.and
               ($equivalence.spec /.equivalence r.int)
               ($order.spec /.order r.int)
@@ -29,13 +29,13 @@
               ($enum.spec /.enum r.int)
               ($interval.spec /.interval r.int)
               (~~ (template []
-                    [(<| (_.context (%name (name-of )))
+                    [(<| (_.context (%.name (name-of )))
                          ($monoid.spec /.equivalence  r.int))]
 
                     [/.addition] [/.multiplication] [/.minimum] [/.maximum]
                     ))
               (~~ (template []
-                    [(<| (_.context (%name (name-of /.binary)))
+                    [(<| (_.context (%.name (name-of /.binary)))
                          ($codec.spec /.equivalence  r.int))]
 
                     [/.binary] [/.octal] [/.decimal] [/.hex]
diff --git a/stdlib/source/test/lux/data/number/nat.lux b/stdlib/source/test/lux/data/number/nat.lux
index 4c46b4b0c..dda227223 100644
--- a/stdlib/source/test/lux/data/number/nat.lux
+++ b/stdlib/source/test/lux/data/number/nat.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -21,7 +21,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (`` ($_ _.and
               ($equivalence.spec /.equivalence r.nat)
               ($order.spec /.order r.nat)
@@ -29,13 +29,13 @@
               ($enum.spec /.enum r.nat)
               ($interval.spec /.interval r.nat)
               (~~ (template []
-                    [(<| (_.context (%name (name-of )))
+                    [(<| (_.context (%.name (name-of )))
                          ($monoid.spec /.equivalence  r.nat))]
 
                     [/.addition] [/.multiplication] [/.minimum] [/.maximum]
                     ))
               (~~ (template []
-                    [(<| (_.context (%name (name-of /.binary)))
+                    [(<| (_.context (%.name (name-of /.binary)))
                          ($codec.spec /.equivalence  r.nat))]
 
                     [/.binary] [/.octal] [/.decimal] [/.hex]
diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/data/number/ratio.lux
index f0ce55751..160a4fa53 100644
--- a/stdlib/source/test/lux/data/number/ratio.lux
+++ b/stdlib/source/test/lux/data/number/ratio.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -29,13 +29,13 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (`` ($_ _.and
               ($equivalence.spec /.equivalence ..ratio)
               ($order.spec /.order ..ratio)
               ($number.spec /.order /.number ..ratio)
               (~~ (template []
-                    [(<| (_.context (%name (name-of )))
+                    [(<| (_.context (%.name (name-of )))
                          ($monoid.spec /.equivalence  ..ratio))]
 
                     [/.addition] [/.multiplication]
diff --git a/stdlib/source/test/lux/data/number/rev.lux b/stdlib/source/test/lux/data/number/rev.lux
index 308861368..9b25ae6af 100644
--- a/stdlib/source/test/lux/data/number/rev.lux
+++ b/stdlib/source/test/lux/data/number/rev.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -25,20 +25,20 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (`` ($_ _.and
               ($equivalence.spec /.equivalence r.rev)
               ($order.spec /.order r.rev)
               ($enum.spec /.enum r.rev)
               ($interval.spec /.interval r.rev)
               (~~ (template []
-                    [(<| (_.context (%name (name-of )))
+                    [(<| (_.context (%.name (name-of )))
                          ($monoid.spec /.equivalence  r.rev))]
 
                     [/.addition] [/.minimum] [/.maximum]
                     ))
               (~~ (template []
-                    [(<| (_.context (%name (name-of /.binary)))
+                    [(<| (_.context (%.name (name-of /.binary)))
                          ($codec.spec /.equivalence  r.rev))]
 
                     [/.binary] [/.octal] [/.decimal] [/.hex]
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 5e28aaf5e..b7522077c 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -1,13 +1,13 @@
 (.module:
   [lux #*
    ["_" test (#+ Test)]
-   data/text/format]
+   ["%" data/text/format (#+ format)]]
   {1
    ["." /]})
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .&)))
+  (<| (_.context (%.name (name-of .&)))
       ($_ _.and
           (_.test "Can access the sides of a pair."
                   (and (i/= +1 (/.left [+1 +2]))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 2a7fa889e..29e02de04 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -1,7 +1,7 @@
 (.module:
   [lux #*
    ["_" test (#+ Test)]
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [control
     pipe]
    [data
@@ -13,7 +13,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .|)))
+  (<| (_.context (%.name (name-of .|)))
       (let [(^open "list/.") (list.equivalence text.equivalence)]
         ($_ _.and
             (_.test "Can inject values into Either."
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 20ad838b7..8adabf715 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do Monad)]
@@ -25,7 +25,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of .Text)))
+  (<| (_.context (%.name (name-of .Text)))
       ($_ _.and
           ($equivalence.spec /.equivalence (r.ascii 2))
           ($order.spec /.order (r.ascii 2))
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux
index 03f1e2f9c..61e1df77a 100644
--- a/stdlib/source/test/lux/data/text/regex.lux
+++ b/stdlib/source/test/lux/data/text/regex.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
    [control
@@ -292,7 +292,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.regex)))
+  (<| (_.context (%.name (name-of /.regex)))
       ($_ _.and
           ..basics
           ..system-character-classes
diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux
index acd4bcdac..bc5ed349c 100644
--- a/stdlib/source/test/lux/macro.lux
+++ b/stdlib/source/test/lux/macro.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]]
@@ -17,7 +17,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           /code.test
           /syntax.test
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux
index c8d0b8077..f395c5509 100644
--- a/stdlib/source/test/lux/macro/code.lux
+++ b/stdlib/source/test/lux/macro/code.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
@@ -11,7 +11,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [bit r.bit
          nat r.nat
@@ -35,17 +35,17 @@
                                  (and (text@=  (/.to-text code))
                                       (:: /.equivalence = code code))))]
 
-                      ["bit"              (/.bit bit)                                 (%b bit)]
-                      ["nat"              (/.nat nat)                                 (%n nat)]
-                      ["int"              (/.int int)                                 (%i int)]
-                      ["rev"              (/.rev rev)                                 (%r rev)]
-                      ["frac"             (/.frac frac)                               (%f frac)]
-                      ["text"             (/.text text)                               (%t text)]
+                      ["bit"              (/.bit bit)                                 (%.bit bit)]
+                      ["nat"              (/.nat nat)                                 (%.nat nat)]
+                      ["int"              (/.int int)                                 (%.int int)]
+                      ["rev"              (/.rev rev)                                 (%.rev rev)]
+                      ["frac"             (/.frac frac)                               (%.frac frac)]
+                      ["text"             (/.text text)                               (%.text text)]
                       ["local-ltag"       (/.local-tag short)                         (format "#" short)]
-                      ["lag"              (/.tag [module short])                      (format "#" (%name name))]
+                      ["lag"              (/.tag [module short])                      (format "#" (%.name name))]
                       ["local-identifier" (/.local-identifier short)                  short]
-                      ["identifier"       (/.identifier [module short])               (%name name)]
-                      ["form"             (/.form (list (/.bit bit) (/.int int)))     (format "(" (%b bit) " " (%i int) ")")]
-                      ["tuple"            (/.tuple (list (/.bit bit) (/.int int)))    (format "[" (%b bit) " " (%i int) "]")]
-                      ["record"           (/.record (list [(/.bit bit) (/.int int)])) (format "{" (%b bit) " " (%i int) "}")]
+                      ["identifier"       (/.identifier [module short])               (%.name name)]
+                      ["form"             (/.form (list (/.bit bit) (/.int int)))     (format "(" (%.bit bit) " " (%.int int) ")")]
+                      ["tuple"            (/.tuple (list (/.bit bit) (/.int int)))    (format "[" (%.bit bit) " " (%.int int) "]")]
+                      ["record"           (/.record (list [(/.bit bit) (/.int int)])) (format "{" (%.bit bit) " " (%.int int) "}")]
                       )))))))
diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux
index 4024d0a89..ef46b9063 100644
--- a/stdlib/source/test/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/test/lux/macro/poly/equivalence.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
@@ -65,7 +65,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [sample gen-record
          #let [(^open "/@.") ..equivalence]]
diff --git a/stdlib/source/test/lux/macro/poly/functor.lux b/stdlib/source/test/lux/macro/poly/functor.lux
index 7f47148ab..4eb05af3c 100644
--- a/stdlib/source/test/lux/macro/poly/functor.lux
+++ b/stdlib/source/test/lux/macro/poly/functor.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
@@ -20,6 +20,6 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (_.test "Can derive functors automatically."
               #1)))
diff --git a/stdlib/source/test/lux/macro/poly/json.lux b/stdlib/source/test/lux/macro/poly/json.lux
index 78ed58a9a..469c2c2f2 100644
--- a/stdlib/source/test/lux/macro/poly/json.lux
+++ b/stdlib/source/test/lux/macro/poly/json.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     codec
@@ -112,6 +112,6 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (<| (_.seed 14562075782602945288)
           ($codec.spec ..equivalence ..codec gen-record))))
diff --git a/stdlib/source/test/lux/macro/syntax.lux b/stdlib/source/test/lux/macro/syntax.lux
index 65e0c1280..b09f45b1d 100644
--- a/stdlib/source/test/lux/macro/syntax.lux
+++ b/stdlib/source/test/lux/macro/syntax.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index cee41346a..88dc6d420 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    ["r" math/random (#+ Random)]
    [abstract/monad (#+ Monad do)]
@@ -31,7 +31,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           (<| (_.context "Trigonometry")
               (do r.monad
diff --git a/stdlib/source/test/lux/math/infix.lux b/stdlib/source/test/lux/math/infix.lux
index 5224700a5..bbad48621 100644
--- a/stdlib/source/test/lux/math/infix.lux
+++ b/stdlib/source/test/lux/math/infix.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random]
    ["_" test (#+ Test)]
@@ -12,7 +12,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [subject r.nat
          parameter r.nat
diff --git a/stdlib/source/test/lux/math/logic/continuous.lux b/stdlib/source/test/lux/math/logic/continuous.lux
index 82ad36be0..6895060c1 100644
--- a/stdlib/source/test/lux/math/logic/continuous.lux
+++ b/stdlib/source/test/lux/math/logic/continuous.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random]
    ["_" test (#+ Test)]]
@@ -9,7 +9,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [left r.rev
          right r.rev]
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index 64051ffd9..3d21a1f21 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
@@ -20,7 +20,7 @@
 (template [        ]
   [(def: 
      Test
-     (<| (_.context (%name (name-of )))
+     (<| (_.context (%.name (name-of )))
          (do r.monad
            [values (r.set  3 )
             #let [[x y z] (case (set.to-list values)
@@ -59,7 +59,7 @@
 (template [        ]
   [(def: 
      Test
-     (<| (_.context (%name (name-of )))
+     (<| (_.context (%.name (name-of )))
          (do r.monad
            [values (r.set  4 )
             #let [[w x y z] (case (set.to-list values)
@@ -116,24 +116,24 @@
          right ..triangle
          sample r.rev]
         ($_ _.and
-            (_.test (%name (name-of /.union))
+            (_.test (%.name (name-of /.union))
                     (let [combined (/.union left right)
                           combined-membership (/.membership sample combined)]
                       (and (r/>= (/.membership sample left)
                                  combined-membership)
                            (r/>= (/.membership sample right)
                                  combined-membership))))
-            (_.test (%name (name-of /.intersection))
+            (_.test (%.name (name-of /.intersection))
                     (let [combined (/.intersection left right)
                           combined-membership (/.membership sample combined)]
                       (and (r/<= (/.membership sample left)
                                  combined-membership)
                            (r/<= (/.membership sample right)
                                  combined-membership))))
-            (_.test (%name (name-of /.complement))
+            (_.test (%.name (name-of /.complement))
                     (r/= (/.membership sample left)
                          (//.not (/.membership sample (/.complement left)))))
-            (_.test (%name (name-of /.difference))
+            (_.test (%.name (name-of /.difference))
                     (r/<= (/.membership sample right)
                           (/.membership sample (/.difference left right))))
             ))))
@@ -144,10 +144,10 @@
     [#let [set-10 (set.from-list nat.hash (list.n/range 0 10))]
      sample (|> r.nat (:: @ map (n/% 20)))]
     ($_ _.and
-        (_.test (%name (name-of /.from-predicate))
+        (_.test (%.name (name-of /.from-predicate))
                 (bit@= (r/= //.true (/.membership sample (/.from-predicate n/even?)))
                        (n/even? sample)))
-        (_.test (%name (name-of /.from-set))
+        (_.test (%.name (name-of /.from-set))
                 (bit@= (r/= //.true (/.membership sample (/.from-set set-10)))
                        (set.member? set-10 sample)))
         )))
@@ -160,7 +160,7 @@
      threshold r.rev
      #let [vip-fuzzy (/.cut threshold fuzzy)
            member? (/.to-predicate threshold fuzzy)]]
-    (<| (_.context (%name (name-of /.cut)))
+    (<| (_.context (%.name (name-of /.cut)))
         ($_ _.and
             (_.test "Can increase the threshold of membership of a fuzzy set."
                     (bit@= (r/> //.false (/.membership sample vip-fuzzy))
@@ -172,7 +172,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ..rev-triangles
           ..rev-trapezoids
diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux
index 5d929527e..45c1b4b65 100644
--- a/stdlib/source/test/lux/math/modular.lux
+++ b/stdlib/source/test/lux/math/modular.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    ["r" math/random]
    [abstract/monad (#+ do)]
@@ -59,7 +59,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /.Mod)))
+  (<| (_.context (%.name (name-of /.Mod)))
       (do r.monad
         [_normalM modulusR
          _alternativeM (|> modulusR (r.filter (|>> (i/= _normalM) not)))
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index acef6060f..da8eebbd9 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -10,7 +10,7 @@
    [data
     ["." error (#+ Error)]
     ["." text
-     format]
+     ["%" format (#+ format)]]
     [format
      [".F" binary]]
     [collection
@@ -43,7 +43,7 @@
 ##                  (!.use (:: file over-write) bytecode))]
 ##       (wrap (case outcome
 ##               (#error.Success definition)
-##               (format "Wrote: " (%t file-path))
+##               (format "Wrote: " (%.text file-path))
 
 ##               (#error.Failure error)
 ##               error)))))
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index cd03bca37..325a5f3f3 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract
@@ -23,7 +23,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..date)
           ($order.spec /.order ..date)
diff --git a/stdlib/source/test/lux/time/day.lux b/stdlib/source/test/lux/time/day.lux
index 4df0ad30b..ce57fc282 100644
--- a/stdlib/source/test/lux/time/day.lux
+++ b/stdlib/source/test/lux/time/day.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     {[0 #test]
@@ -25,7 +25,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..day)
           ($order.spec /.order ..day)
diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux
index e63397b32..851267c59 100644
--- a/stdlib/source/test/lux/time/duration.lux
+++ b/stdlib/source/test/lux/time/duration.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do)]
@@ -23,7 +23,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..duration)
           ($order.spec /.order ..duration)
diff --git a/stdlib/source/test/lux/time/instant.lux b/stdlib/source/test/lux/time/instant.lux
index 24f7e7962..3e3e2ca8c 100644
--- a/stdlib/source/test/lux/time/instant.lux
+++ b/stdlib/source/test/lux/time/instant.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     [monad (#+ do Monad)]
@@ -32,7 +32,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..instant)
           ($order.spec /.order ..instant)
diff --git a/stdlib/source/test/lux/time/month.lux b/stdlib/source/test/lux/time/month.lux
index 7b0cb43d2..2c4c1c34f 100644
--- a/stdlib/source/test/lux/time/month.lux
+++ b/stdlib/source/test/lux/time/month.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["_" test (#+ Test)]
    [abstract
     {[0 #test]
@@ -30,7 +30,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           ($equivalence.spec /.equivalence ..month)
           ($order.spec /.order ..month)
diff --git a/stdlib/source/test/lux/tool/compiler/default/syntax.lux b/stdlib/source/test/lux/tool/compiler/default/syntax.lux
index d6aee7e37..a9744dfb6 100644
--- a/stdlib/source/test/lux/tool/compiler/default/syntax.lux
+++ b/stdlib/source/test/lux/tool/compiler/default/syntax.lux
@@ -2,7 +2,7 @@
   [lux #*
    [abstract/monad (#+ do)]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -79,7 +79,7 @@
     [sample code^]
     ($_ _.and
         (_.test "Can parse Lux code."
-                (case (let [source-code (%code sample)]
+                (case (let [source-code (%.code sample)]
                         (/.parse "" (dictionary.new text.hash) (text.size source-code)
                                  [default-cursor 0 source-code]))
                   (#.Left error)
@@ -90,7 +90,7 @@
         (do @
           [other code^]
           (_.test "Can parse Lux multiple code nodes."
-                  (let [source-code (format (%code sample) " " (%code other))
+                  (let [source-code (format (%.code sample) " " (%.code other))
                         source-code//size (text.size source-code)]
                     (case (/.parse "" (dictionary.new text.hash) source-code//size
                                    [default-cursor 0 source-code])
@@ -128,7 +128,7 @@
      comment comment^]
     ($_ _.and
         (_.test "Can handle comments."
-                (case (let [source-code (format comment (%code sample))
+                (case (let [source-code (format comment (%.code sample))
                             source-code//size (text.size source-code)]
                         (/.parse "" (dictionary.new text.hash) source-code//size
                                  [default-cursor 0 source-code]))
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
index 6f5a324cd..30b446bb5 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/case.lux
@@ -2,7 +2,7 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name ("#@." equivalence)]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
index 252344cb6..08346c47b 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/function.lux
@@ -2,7 +2,7 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name ("#@." equivalence)]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -50,7 +50,7 @@
      [outputT outputC] _primitive.primitive
      [inputT _] _primitive.primitive
      #let [g!arg (code.local-identifier arg-name)]]
-    (<| (_.context (%name (name-of /.function)))
+    (<| (_.context (%.name (name-of /.function)))
         ($_ _.and
             (_.test "Can analyse function."
                     (and (|> (//type.with-type (All [a] (-> a outputT))
@@ -97,7 +97,7 @@
                               (type.function (#.Cons varT partial-poly-inputsT))
                               varT)
            dummy-function (#////analysis.Function (list) (#////analysis.Reference (////reference.local 1)))]]
-    (<| (_.context (%name (name-of /.apply)))
+    (<| (_.context (%.name (name-of /.apply)))
         ($_ _.and
             (_.test "Can analyse monomorphic type application."
                     (|> (/.apply _primitive.phase funcT dummy-function (' []) inputsC)
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
index 0b3990cf0..1a7aec26f 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/primitive.lux
@@ -3,7 +3,7 @@
    ["@" target]
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -65,8 +65,8 @@
 
 (exception: (wrong-inference {expected Type} {inferred Type})
   (exception.report
-   ["Expected" (%type expected)]
-   ["Inferred" (%type inferred)]))
+   ["Expected" (%.type expected)]
+   ["Inferred" (%.type inferred)]))
 
 (def: (infer expected-type analysis)
   (-> Type (Operation Analysis) (Error Analysis))
@@ -84,7 +84,7 @@
 (def: #export test
   (<| (_.context (name.module (name-of /._)))
       (`` ($_ _.and
-              (_.test (%name (name-of #////analysis.Unit))
+              (_.test (%.name (name-of #////analysis.Unit))
                       (|> (infer Any (..phase (' [])))
                           (case> (^ (#error.Success (#////analysis.Primitive (#////analysis.Unit output))))
                                  (is? [] output)
@@ -94,7 +94,7 @@
               (~~ (template [   ]
                     [(do r.monad
                        [sample ]
-                       (_.test (%name (name-of ))
+                       (_.test (%.name (name-of ))
                                (|> (infer  (..phase ( sample)))
                                    (case> (#error.Success (#////analysis.Primitive ( output)))
                                           (is? sample output)
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
index 842c23950..427e0dc2c 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/reference.lux
@@ -2,7 +2,6 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
     ["." name ("#@." equivalence)]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
index 7c7e9e52c..156965a55 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/analysis/structure.lux
@@ -2,7 +2,7 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -125,7 +125,7 @@
                                           (list.drop choice primitives)))
            [+valueT +valueC] (maybe.assume (list.nth +choice +primitives))
            +variantT (type.variant (list@map product.left +primitives))]]
-    (<| (_.context (%name (name-of /.sum)))
+    (<| (_.context (%.name (name-of /.sum)))
         ($_ _.and
             (_.test "Can analyse."
                     (check-sum variantT choice size
@@ -174,7 +174,7 @@
                                           (list [(#.Parameter 1) +valueC])
                                           (list.drop choice primitives)))
            +tupleT (type.tuple (list@map product.left +primitives))]]
-    (<| (_.context (%name (name-of /.product)))
+    (<| (_.context (%.name (name-of /.product)))
         ($_ _.and
             (_.test "Can analyse."
                     (|> (//type.with-type tupleT
@@ -243,7 +243,7 @@
                      (type.univ-q 1))
            choice-tag (maybe.assume (list.nth choice tags))
            other-choice-tag (maybe.assume (list.nth other-choice tags))]]
-    (<| (_.context (%name (name-of /.tagged-sum)))
+    (<| (_.context (%.name (name-of /.tagged-sum)))
         ($_ _.and
             (_.test "Can infer."
                     (|> (/.tagged-sum _primitive.phase [module-name choice-tag] choiceC)
@@ -287,7 +287,7 @@
                                                     (list.drop (inc choice) primitivesT))))
                      (type.univ-q 1)
                      (#.Named [module-name type-name]))]]
-    (<| (_.context (%name (name-of /.record)))
+    (<| (_.context (%.name (name-of /.record)))
         (_.test "Can infer."
                 (|> (/.record _primitive.phase recordC)
                     (check-record module-name tags monoT monoT size))))))
diff --git a/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/lux.lux
index e45656025..1b89d30d4 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/extension/analysis/lux.lux
@@ -2,7 +2,7 @@
   [lux (#- i64 int primitive)
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -117,7 +117,7 @@
   (do r.monad
     [subjectC (|> r.safe-frac (:: @ map code.frac))
      paramC (|> r.safe-frac (:: @ map code.frac))
-     encodedC (|> r.safe-frac (:: @ map (|>> %f code.text)))]
+     encodedC (|> r.safe-frac (:: @ map (|>> %.frac code.text)))]
     ($_ _.and
         (_.test "Can add frac numbers."
                 (check-success+ "lux f64 +" (list paramC subjectC) Frac))
diff --git a/stdlib/source/test/lux/tool/compiler/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/phase/synthesis/case.lux
index ea2114509..b5a03fd9f 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/synthesis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/synthesis/case.lux
@@ -2,7 +2,6 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/phase/synthesis/function.lux
index 5c6c3f3af..3ca60e77b 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/synthesis/function.lux
@@ -2,7 +2,6 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
diff --git a/stdlib/source/test/lux/tool/compiler/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/phase/synthesis/primitive.lux
index d5683b14f..f54ace3d5 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/synthesis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/synthesis/primitive.lux
@@ -2,7 +2,7 @@
   [lux (#- primitive)
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -57,12 +57,12 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of #////synthesis.Primitive)))
+  (<| (_.context (%.name (name-of #////synthesis.Primitive)))
       (`` ($_ _.and
               (~~ (template [  ]
                     [(do r.monad
                        [expected ]
-                       (_.test (%name (name-of ))
+                       (_.test (%.name (name-of ))
                                (|> (#////analysis.Primitive ( expected))
                                    //.phase
                                    (///.run [///bundle.empty ////synthesis.init])
diff --git a/stdlib/source/test/lux/tool/compiler/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/phase/synthesis/structure.lux
index 4e7f6c3b5..0ea42a2a9 100644
--- a/stdlib/source/test/lux/tool/compiler/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/phase/synthesis/structure.lux
@@ -2,7 +2,7 @@
   [lux #*
    [abstract ["." monad (#+ do)]]
    [data
-    text/format
+    ["%" text/format (#+ format)]
     ["." name]]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
@@ -68,7 +68,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of #////synthesis.Structure)))
+  (<| (_.context (%.name (name-of #////synthesis.Structure)))
       ($_ _.and
           ..variant
           ..tuple
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 6840807f7..c3931c331 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux (#- type)
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["M" abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
@@ -51,7 +51,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           (do r.monad
             [sample ..type]
@@ -152,7 +152,7 @@
                           ["existentially-quantified" /.ex-q   /.flatten-ex-q]
                           ))
                     )))
-          (_.test (%name (name-of /.:by-example))
+          (_.test (%.name (name-of /.:by-example))
                   (let [example (: (Maybe Nat)
                                    #.None)]
                     (/@= (.type (List Nat))
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index 9d511d5ae..d3d0570a1 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux (#- type)
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract
@@ -94,7 +94,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           (do r.monad
             [sample (|> ..type (r.filter valid-type?))]
diff --git a/stdlib/source/test/lux/type/dynamic.lux b/stdlib/source/test/lux/type/dynamic.lux
index 4e1bea6a8..5baccd9dc 100644
--- a/stdlib/source/test/lux/type/dynamic.lux
+++ b/stdlib/source/test/lux/type/dynamic.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    [abstract/monad (#+ do)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
@@ -11,7 +11,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [expected r.nat
          #let [value (:dynamic expected)]]
diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux
index 372f544f7..34b8b68c9 100644
--- a/stdlib/source/test/lux/type/implicit.lux
+++ b/stdlib/source/test/lux/type/implicit.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
@@ -18,7 +18,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [x r.nat
          y r.nat]
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux
index 92b085e6a..637f0a564 100644
--- a/stdlib/source/test/lux/type/resource.lux
+++ b/stdlib/source/test/lux/type/resource.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract
@@ -13,7 +13,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       ($_ _.and
           (_.test "Can produce and consume keys in an ordered manner."
                   (<| (n/= (n/+ 123 456))
diff --git a/stdlib/source/test/lux/world/binary.lux b/stdlib/source/test/lux/world/binary.lux
index a9817115d..8fb17114e 100644
--- a/stdlib/source/test/lux/world/binary.lux
+++ b/stdlib/source/test/lux/world/binary.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random)]
    ["_" test (#+ Test)]
    [abstract
@@ -53,7 +53,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [#let [gen-size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 8))))]
          binary-size gen-size
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index b72e8be82..c0c3f7d18 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -1,6 +1,6 @@
 (.module:
   [lux #*
-   data/text/format
+   ["%" data/text/format (#+ format)]
    ["r" math/random (#+ Random) ("#@." monad)]
    ["_" test (#+ Test)]
    [abstract/monad (#+ do)]
@@ -34,7 +34,7 @@
 (def: (creation-and-deletion number)
   (-> Nat Test)
   (r@wrap (do promise.monad
-            [#let [path (format "temp_file_" (%n number))]
+            [#let [path (format "temp_file_" (%.nat number))]
              result (promise.future
                      (do (error.with io.monad)
                        [#let [check-existence! (: (IO (Error Bit))
@@ -53,7 +53,7 @@
 (def: (read-and-write number data)
   (-> Nat Binary Test)
   (r@wrap (do promise.monad
-            [#let [path (format "temp_file_" (%n number))]
+            [#let [path (format "temp_file_" (%.nat number))]
              result (promise.future
                      (do (error.with io.monad)
                        [file (!.use (:: /.system create-file) path)
@@ -66,7 +66,7 @@
 
 (def: #export test
   Test
-  (<| (_.context (%name (name-of /._)))
+  (<| (_.context (%.name (name-of /._)))
       (do r.monad
         [file-size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 10))))
          dataL (_binary.binary file-size)
-- 
cgit v1.2.3