diff --git a/documentation/bookmark/art/film.md b/documentation/bookmark/art/film.md new file mode 100644 index 0000000000..43e8f883be --- /dev/null +++ b/documentation/bookmark/art/film.md @@ -0,0 +1,5 @@ +# Reference + +0. [What Does CINEMATIC Really Mean?](https://www.youtube.com/watch?v=ZbByKUDJlbI) +0. [How To Analyze Movies – Film Studies 101](https://www.youtube.com/watch?v=ahHIifcFyqk) + diff --git a/lux-c++/source/program.lux b/lux-c++/source/program.lux index dd5f557c49..0fa1a077de 100644 --- a/lux-c++/source/program.lux +++ b/lux-c++/source/program.lux @@ -4,7 +4,7 @@ ... https://github.com/wlav/cppyy (.require [library - [lux (.except) + [lux (.except tuple) [program (.only program)] ["[0]" ffi (.only import)] [abstract @@ -109,7 +109,7 @@ (the (runtime globals) (-> Any Runtime) - (getattr globals /runtime.namespace)) + (getattr [globals /runtime.namespace])) (with_template [ ] [(the ( @ it) @@ -117,7 +117,7 @@ ) (let [on (as (-> Any ) - (getattr @ (template.symbol [/runtime._] [])))] + (getattr [@ (template.symbol [/runtime._] [])]))] (on it)))] [object_tag Nat] @@ -141,14 +141,14 @@ [] (.python_object_none#))) (array.has! 2 choice) - ..tuple)) + [] ..tuple)) (the (tuple::member @ member it) (-> Runtime Nat Any Value) (let [on (as (-> Nat Any Value) - (getattr @ /runtime.tuple::member))] + (getattr [@ /runtime.tuple::member]))] (on member it))) (the (lux_tuple @ lux_value input) @@ -176,7 +176,7 @@ ... /runtime.f64_tag /runtime.text_tag - (..str (lux_text @ it)) + (..str [(lux_text @ it)]) /runtime.variant_tag (lux_variant (variant::lefts @ it) @@ -211,7 +211,7 @@ [_ (cppyy::cppdef (_.code definition)) .let [globals (io.run! (cppyy::gbl)) it (lux_value (..runtime globals) - (getattr globals global))] + (getattr [globals global]))] _ (cppyy::cppexec (_.code (_.; (_.:= (_.local global) /runtime.unit))))] (in it))))))) execute! (is (-> /runtime.Declaration @@ -236,12 +236,12 @@ _ (execute! definition) .let [globals (io.run! (cppyy::gbl)) value (lux_value (..runtime globals) - (getattr globals global))]] + (getattr [globals global]))]] (in [global value definition])))) (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as /runtime.Declaration))) @@ -270,7 +270,7 @@ platform.#runtime /runtime.translation platform.#phase_wrapper ..phase_wrapper - platform.#write (|>> _.code (of utf8.codec injection))]]))) + platform.#write (|>> _.code (of utf8.format injection))]]))) (the (extender _) Extender diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 48eed5ec7c..c1e265a21e 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -559,7 +559,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -621,7 +621,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -660,7 +660,7 @@ platform.#phase js.expression platform.#runtime runtime.translate platform.#phase_wrapper ..phase_wrapper - platform.#write (|>> _.code (of utf8.codec injection))]))) + platform.#write (|>> _.code (of utf8.format injection))]))) (the (lux_program context program) (Program _.Expression _.Statement) diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index f3d1a8b986..3f4db4a909 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -732,7 +732,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -775,7 +775,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -857,7 +857,7 @@ platform.#phase lua.expression platform.#runtime runtime.translate platform.#phase_wrapper (..phase_wrapper ..to_host) - platform.#write (|>> _.code (of utf8.codec injection))]])))] + platform.#write (|>> _.code (of utf8.format injection))]])))] (for .old .jvm .lua (the platform @@ -869,7 +869,7 @@ platform.#phase lua.expression platform.#runtime runtime.translate platform.#phase_wrapper (..phase_wrapper ..to_host) - platform.#write (|>> _.code (of utf8.codec injection))]))))) + platform.#write (|>> _.code (of utf8.format injection))]))))) (the (lux_program context program) (Program _.Expression _.Statement) diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 4df2451f7d..46ad687a4f 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -441,7 +441,7 @@ Called by `imenu--generic-function'." "for" "io" "infix" - "format" + "message" "regex") "\\>")))) (separator "\\.") diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index 41bca4cea6..862b31001e 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -499,7 +499,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -519,7 +519,7 @@ platform.#host host platform.#phase php.translate platform.#runtime runtime.translate - platform.#write (|>> _.code (of utf8.codec injection))]))) + platform.#write (|>> _.code (of utf8.format injection))]))) (the (program context program) (Program _.Expression _.Statement) diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux index 76571fcd51..65912b5eb1 100644 --- a/lux-python/source/program.lux +++ b/lux-python/source/program.lux @@ -443,7 +443,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as (_.Statement Any)))) @@ -487,7 +487,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as (_.Statement Any)))) @@ -544,7 +544,7 @@ platform.#phase python.expression platform.#runtime runtime.translate platform.#phase_wrapper ..phase_wrapper - platform.#write (|>> _.code (of utf8.codec injection))]))) + platform.#write (|>> _.code (of utf8.format injection))]))) (the (lux_program context program) (Program (_.Expression Any) (_.Statement Any)) diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux index 7126f7a571..8fe19c91eb 100644 --- a/lux-r/source/program.lux +++ b/lux-r/source/program.lux @@ -538,7 +538,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Expression))) @@ -561,7 +561,7 @@ platform.#host host platform.#phase r.translate platform.#runtime runtime.translate - platform.#write (|>> _.code (of utf8.codec injection))]]))) + platform.#write (|>> _.code (of utf8.format injection))]]))) (the (program context program) (Program _.Expression _.Expression) diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index 0665426977..ecf544fa84 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -772,7 +772,7 @@ (the (ingest context content) (|> content - (of utf8.codec projection) + (of utf8.format projection) try.trusted (as _.Statement))) @@ -974,7 +974,7 @@ platform.#phase ruby.expression platform.#runtime runtime.translate platform.#phase_wrapper ..phase_wrapper - platform.#write (|>> _.code (of utf8.codec injection))]))) + platform.#write (|>> _.code (of utf8.format injection))]))) (the (lux_program context program) (Program _.Expression _.Statement) diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 7d5041bbff..2a24e5e26c 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -154,11 +154,11 @@ "Existential quantification." ($.example (' (for_some (_ a) - [(Codec Text a) a]))) + [(Format Text a) a]))) ($.comment "A name can be provided, to specify a recursive type.") ($.example (' (for_some (Self a) - [(Codec Text a) + [(Format Text a) a (List (Self a))])))) )) @@ -594,7 +594,7 @@ ["M" monad (.except)]] [data maybe - ["[0]" name (.use "[1]#[0]" codec)]] + ["[0]" name (.use "[1]#[0]" format)]] [macro code]] [// @@ -602,10 +602,10 @@ ($.definition /.of "Allows accessing the value of a implementation's member." - ($.example (' (of codec injection))) + ($.example (' (of format injection))) ($.comment "Also allows using that value as a function.") - ($.example (' (of codec injection +123)))) + ($.example (' (of format injection +123)))) ($.definition /.has "Sets the value of a record at a given tag." @@ -705,7 +705,7 @@ [ (with_template [ ] [(cover [] (compare - (of codec injection )))] + (of format injection )))] [bit #1 "#1"] [int +123 "+123"] diff --git a/stdlib/source/documentation/lux/abstract.lux b/stdlib/source/documentation/lux/abstract.lux index f0a0c40d8e..25802c8916 100644 --- a/stdlib/source/documentation/lux/abstract.lux +++ b/stdlib/source/documentation/lux/abstract.lux @@ -10,7 +10,7 @@ ["[0]" list]]]]] ["[0]" / ["[1][0]" apply] - ["[1][0]" codec] + ["[1][0]" format] ["[1][0]" comonad] ["[1][0]" enum] ["[1][0]" equivalence] @@ -25,7 +25,7 @@ (.List $.Documentation) (list.together (list /apply.documentation - /codec.documentation + /format.documentation /comonad.documentation /enum.documentation /equivalence.documentation diff --git a/stdlib/source/documentation/lux/abstract/codec.lux b/stdlib/source/documentation/lux/abstract/format.lux similarity index 60% rename from stdlib/source/documentation/lux/abstract/codec.lux rename to stdlib/source/documentation/lux/abstract/format.lux index 4e1b291ee7..d877edb5ca 100644 --- a/stdlib/source/documentation/lux/abstract/codec.lux +++ b/stdlib/source/documentation/lux/abstract/format.lux @@ -13,13 +13,13 @@ (list ($.module /._ "") - ($.definition (/.Codec medium value) + ($.definition (/.Format medium value) "A way to move back-and-forth between a type and an alternative representation for it.") ($.definition /.composite - "Codec composition." - ($.example (' (is (Codec c a) - (composite (is (Codec c b) - cb_codec) - (is (Codec b a) - ba_codec)))))))) + "Format composition." + ($.example (' (is (Format c a) + (composite (is (Format c b) + cb_format) + (is (Format b a) + ba_format)))))))) diff --git a/stdlib/source/documentation/lux/control/projection.lux b/stdlib/source/documentation/lux/control/projection.lux index 09e13c0083..d3654bdef9 100644 --- a/stdlib/source/documentation/lux/control/projection.lux +++ b/stdlib/source/documentation/lux/control/projection.lux @@ -125,7 +125,7 @@ \n "That way, the same input can be consumed again by another projection.") ($.example (' (speculative projection)))) - ($.definition /.codec - "Decode the output of a projection using a codec." - ($.example (' (codec codec projection)))) + ($.definition /.format + "Decode the output of a projection using a format." + ($.example (' (format format projection)))) )) diff --git a/stdlib/source/documentation/lux/data/bit.lux b/stdlib/source/documentation/lux/data/bit.lux index d0616acffc..51b312fbe5 100644 --- a/stdlib/source/documentation/lux/data/bit.lux +++ b/stdlib/source/documentation/lux/data/bit.lux @@ -24,7 +24,7 @@ ($.definition /.hash) ($.definition /.disjunction) ($.definition /.conjunction) - ($.definition /.codec) + ($.definition /.format) ($.definition /.complement (%.message "Generates the complement of a predicate." diff --git a/stdlib/source/documentation/lux/data/format/json.lux b/stdlib/source/documentation/lux/data/format/json.lux index e5da1a9eb4..06ed0b09db 100644 --- a/stdlib/source/documentation/lux/data/format/json.lux +++ b/stdlib/source/documentation/lux/data/format/json.lux @@ -98,7 +98,7 @@ ($.definition /.object) ($.definition /.equivalence) ($.definition /.injection) - ($.definition /.codec) + ($.definition /.format) ($.definition /.json "A simple way to produce JSON literals." diff --git a/stdlib/source/documentation/lux/data/format/xml.lux b/stdlib/source/documentation/lux/data/format/xml.lux index ec6b40e272..c19876f9e5 100644 --- a/stdlib/source/documentation/lux/data/format/xml.lux +++ b/stdlib/source/documentation/lux/data/format/xml.lux @@ -65,7 +65,7 @@ ($.definition /.Attribute) ($.definition /.Attrs) ($.definition /.XML) - ($.definition /.codec) + ($.definition /.format) ($.definition /.equivalence) ($.definition /.attributes diff --git a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux index 2e11932fdf..d6adbc14ec 100644 --- a/stdlib/source/documentation/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/documentation/lux/data/text/encoding/utf8.lux @@ -13,6 +13,6 @@ (list ($.module /._ "") - ($.definition /.codec - "A codec for binary encoding of text as UTF-8.") + ($.definition /.format + "A format for binary encoding of text as UTF-8.") )) diff --git a/stdlib/source/documentation/lux/math/arithmetic/modular.lux b/stdlib/source/documentation/lux/math/arithmetic/modular.lux index 72dd366446..f599256bab 100644 --- a/stdlib/source/documentation/lux/math/arithmetic/modular.lux +++ b/stdlib/source/documentation/lux/math/arithmetic/modular.lux @@ -16,7 +16,7 @@ ($.definition /.modulus) ($.definition /.value) ($.definition /.incorrect_modulus) - ($.definition /.codec) + ($.definition /.format) ($.definition /.=) ($.definition /.<) diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux index a337812599..66a6d7688d 100644 --- a/stdlib/source/documentation/lux/math/number/frac.lux +++ b/stdlib/source/documentation/lux/math/number/frac.lux @@ -27,7 +27,7 @@ ($.definition /./) ($.definition /.%) ($.definition /.reciprocal) - ($.definition /.codec) + ($.definition /.format) ($.definition /.addition) ($.definition /.multiplication) diff --git a/stdlib/source/documentation/lux/world/time.lux b/stdlib/source/documentation/lux/world/time.lux index 1dc61f2072..125312a972 100644 --- a/stdlib/source/documentation/lux/world/time.lux +++ b/stdlib/source/documentation/lux/world/time.lux @@ -66,7 +66,7 @@ "" ($.example (' (time clock)))) - ($.definition /.codec + ($.definition /.format (%.message "Based on ISO 8601." \n "For example: 21:14:51.827")) diff --git a/stdlib/source/documentation/lux/world/time/date.lux b/stdlib/source/documentation/lux/world/time/date.lux index 10bd946c64..9685bddf56 100644 --- a/stdlib/source/documentation/lux/world/time/date.lux +++ b/stdlib/source/documentation/lux/world/time/date.lux @@ -36,7 +36,7 @@ "A date, within the allowed limits." ($.example (' (date year month day_of_month)))) - ($.definition /.codec + ($.definition /.format (%.message "Based on ISO 8601." \n "For example: 2017-01-15")) )) diff --git a/stdlib/source/documentation/lux/world/time/day.lux b/stdlib/source/documentation/lux/world/time/day.lux index 4f05497c60..e8561ac186 100644 --- a/stdlib/source/documentation/lux/world/time/day.lux +++ b/stdlib/source/documentation/lux/world/time/day.lux @@ -17,7 +17,7 @@ ($.definition /.order) ($.definition /.enum) ($.definition /.not_a_day_of_the_week) - ($.definition /.codec) + ($.definition /.format) ($.definition /.number) ($.definition /.invalid_day) ($.definition /.by_number) diff --git a/stdlib/source/documentation/lux/world/time/duration.lux b/stdlib/source/documentation/lux/world/time/duration.lux index cb974587b9..7f9aeed9c9 100644 --- a/stdlib/source/documentation/lux/world/time/duration.lux +++ b/stdlib/source/documentation/lux/world/time/duration.lux @@ -36,7 +36,7 @@ ($.definition /.normal_year) ($.definition /.leap_year) ($.definition /.monoid) - ($.definition /.codec) + ($.definition /.format) ($.definition /.enum) ($.definition /.Duration diff --git a/stdlib/source/documentation/lux/world/time/instant.lux b/stdlib/source/documentation/lux/world/time/instant.lux index 5b54827d2a..e9f801dd2d 100644 --- a/stdlib/source/documentation/lux/world/time/instant.lux +++ b/stdlib/source/documentation/lux/world/time/instant.lux @@ -47,7 +47,7 @@ ($.definition /.epoch "The instant corresponding to 1970-01-01T00:00:00Z.") - ($.definition /.codec + ($.definition /.format (%.message "Based on ISO 8601." \n "For example: 2017-01-15T21:14:51.827Z")) diff --git a/stdlib/source/documentation/lux/world/time/month.lux b/stdlib/source/documentation/lux/world/time/month.lux index c14d8664f6..4420f5d49a 100644 --- a/stdlib/source/documentation/lux/world/time/month.lux +++ b/stdlib/source/documentation/lux/world/time/month.lux @@ -21,7 +21,7 @@ ($.definition /.order) ($.definition /.enum) ($.definition /.not_a_month_of_the_year) - ($.definition /.codec) + ($.definition /.format) ($.definition /.Month "A month of the year.") diff --git a/stdlib/source/documentation/lux/world/time/year.lux b/stdlib/source/documentation/lux/world/time/year.lux index ef72d9adbc..1d4eb61cfe 100644 --- a/stdlib/source/documentation/lux/world/time/year.lux +++ b/stdlib/source/documentation/lux/world/time/year.lux @@ -46,7 +46,7 @@ "The number of leap years in a period of years." ($.example (' (leaps year)))) - ($.definition /.codec + ($.definition /.format (%.message "Based on ISO 8601." \n "For example: 2017")) )) diff --git a/stdlib/source/injection/lux/data/binary.lux b/stdlib/source/injection/lux/data/binary.lux index cd89975c37..8929c3ae62 100644 --- a/stdlib/source/injection/lux/data/binary.lux +++ b/stdlib/source/injection/lux/data/binary.lux @@ -197,7 +197,7 @@ (with_template [ ] [(the .public (Injection Text) - (|>> (of utf8.codec injection) ))] + (|>> (of utf8.format injection) ))] [utf8_8 ..binary_8] [utf8_16 ..binary_16] diff --git a/stdlib/source/injection/lux/data/text.lux b/stdlib/source/injection/lux/data/text.lux index 88fb446b74..c2da1c0fc7 100644 --- a/stdlib/source/injection/lux/data/text.lux +++ b/stdlib/source/injection/lux/data/text.lux @@ -66,14 +66,14 @@ (Injection ) )] - [bit Bit (of bit.codec injection)] + [bit Bit (of bit.format injection)] [nat Nat (of nat.decimal injection)] [int Int (of int.decimal injection)] [rev Rev (of rev.decimal injection)] [dec Dec (of dec.decimal injection)] [text Text text.injection] - [frac frac.Frac (of frac.codec injection)] + [frac frac.Frac (of frac.format injection)] [complex complex.Complex complex.injection] [symbol Symbol (of symbol.absolute injection)] @@ -81,15 +81,15 @@ [code Code code.absolute] [type Type type.absolute_injection] - [instant instant.Instant (of instant.codec injection)] - [duration duration.Duration (of duration.codec injection)] - [date date.Date (of date.codec injection)] - [time time.Time (of time.codec injection)] - [day day.Day (of day.codec injection)] - [month month.Month (of month.codec injection)] + [instant instant.Instant (of instant.format injection)] + [duration duration.Duration (of duration.format injection)] + [date date.Date (of date.format injection)] + [time time.Time (of time.format injection)] + [day day.Day (of day.format injection)] + [month month.Month (of month.format injection)] - [xml xml.XML (of xml.codec injection)] - [json json.JSON (of json.codec injection)] + [xml xml.XML (of xml.format injection)] + [json json.JSON (of json.format injection)] ) (with_template [] @@ -110,13 +110,13 @@ [permyriad] ) -(with_template [ ,] - [(`` (with_template [ ] +(with_template [ ,] + [(`` (with_template [ ] [(the .public (Injection ) - (of injection))] + (of injection))] - (,, (template.spliced ,))))] + (,, (template.spliced ,))))] [Nat [[nat_2 nat.binary] @@ -152,8 +152,8 @@ (the .public (mod modular) (for_any (_ %) (Injection (modular.Mod %))) - (let [codec (modular.codec (modular.modulus modular))] - (of codec injection modular))) + (let [format (modular.format (modular.modulus modular))] + (of format injection modular))) (the .public (list injection) (for_any (_ of) diff --git a/stdlib/source/library/lux/abstract/codec.lux b/stdlib/source/library/lux/abstract/format.lux similarity index 61% rename from stdlib/source/library/lux/abstract/codec.lux rename to stdlib/source/library/lux/abstract/format.lux index 5d27c3f8fc..ba9a94bb95 100644 --- a/stdlib/source/library/lux/abstract/codec.lux +++ b/stdlib/source/library/lux/abstract/format.lux @@ -1,6 +1,7 @@ ... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. ... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. +... https://en.wikipedia.org/wiki/Content_format (.require [library [lux (.except) @@ -10,7 +11,7 @@ [monad (.only do)] ["[0]" functor]]) -(every .public (Codec super sub) +(every .public (Format super sub) (Interface (is (-> sub super) @@ -19,16 +20,16 @@ (Try sub)) projection))) -(the .public (composite codec_21 codec_10) +(the .public (composite format_21 format_10) (for_any (_ @0 @1 @2) - (-> (Codec @2 @1) (Codec @1 @0) - (Codec @2 @0))) + (-> (Format @2 @1) (Format @1 @0) + (Format @2 @0))) (implementation (the injection - (|>> (of codec_10 injection) - (of codec_21 injection))) + (|>> (of format_10 injection) + (of format_21 injection))) (the (projection cy) (do try.monad - [by (of codec_21 projection cy)] - (of codec_10 projection by))))) + [by (of format_21 projection cy)] + (of format_10 projection by))))) diff --git a/stdlib/source/library/lux/control/projection.lux b/stdlib/source/library/lux/control/projection.lux index 8d1782849c..fd15402095 100644 --- a/stdlib/source/library/lux/control/projection.lux +++ b/stdlib/source/library/lux/control/projection.lux @@ -8,7 +8,7 @@ [functor (.only Functor)] [apply (.only Apply)] [monad (.only Monad do)] - [codec (.only Codec)]] + [format (.only Format)]] [control ["[0]" try (.only Try)]] [data @@ -229,14 +229,14 @@ ))) - (the .public (codec codec projection) + (the .public (format format projection) (for_any (_ state medium of) - (-> (Codec medium of) (Projection state medium) + (-> (Format medium of) (Projection state medium) (Projection state of))) (function (_ input) (when (projection input) {try.#Success [input' to_decode]} - (when (of codec projection to_decode) + (when (of format projection to_decode) {try.#Success value} {try.#Success [input' value]} diff --git a/stdlib/source/library/lux/data/bit.lux b/stdlib/source/library/lux/data/bit.lux index 572ba2d90a..6fef5c9126 100644 --- a/stdlib/source/library/lux/data/bit.lux +++ b/stdlib/source/library/lux/data/bit.lux @@ -8,7 +8,7 @@ [monoid (.only Monoid)] [equivalence (.only Equivalence)] [hash (.only Hash)] - [codec (.only Codec)]] + [format (.only Format)]] [meta ["[0]" location]]]]) @@ -61,8 +61,8 @@ (the false_injection "#0") (the true_injection "#1") -(the .public codec - (Codec Text Bit) +(the .public format + (Format Text Bit) (implementation (the (injection x) (if x diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index d738348413..09af15c96e 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -6,7 +6,7 @@ [lux (.except has nat int rev list) [abstract [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] ["[0]" monad (.only do)]] [control ["<>" projection (.use "[1]#[0]" monad)] @@ -421,7 +421,7 @@ (|> .hexadecimal! (.exactly! 4) .slice - (<>.codec nat.hex) + (<>.format nat.hex) (<>#each text.of_char))) ))) @@ -480,8 +480,8 @@ (array_projection json_projection) (object_projection json_projection)))))) -(the .public codec - (Codec Text JSON) +(the .public format + (Format Text JSON) (implementation (the injection ..injection) (the projection (.value json_projection)))) @@ -489,12 +489,12 @@ (exception.the (cannot_project [it]) (Exception JSON) (exception.report - (.list ["JSON" (with ..codec + (.list ["JSON" (with ..format (injection it))]))) (with_template [,name ,type ,tag] [(the .public ,name - (Codec JSON ,type) + (Format JSON ,type) (implementation (the injection (|>> {,tag})) (the (projection it) @@ -515,7 +515,7 @@ (the high_mask Nat (|> low_mask (i64.left_shifted 32))) (the .public nat - (Codec JSON Nat) + (Format JSON Nat) (implementation (the (injection input) (let [high (|> input (i64.and high_mask) (i64.right_shifted 32)) @@ -537,7 +537,7 @@ (exception.except ..cannot_project [it]))))) (the .public int - (Codec JSON Int) + (Format JSON Int) (implementation (the injection (|>> .nat @@ -547,7 +547,7 @@ (of try.functor each (|>> .int)))))) (the .public rev - (Codec JSON Rev) + (Format JSON Rev) (implementation (the injection (|>> .nat @@ -556,32 +556,32 @@ (|>> (of ..nat projection) (of try.functor each (|>> .rev)))))) -(with_template [,name ,type ,codec] +(with_template [,name ,type ,format] [(the .public ,name - (Codec JSON ,type) + (Format JSON ,type) (implementation (the injection - (|>> (of ,codec injection) + (|>> (of ,format injection) {#String})) (the (projection it) (when it {#String it} - (of ,codec projection it) + (of ,format projection it) _ (exception.except ..cannot_project [it])))))] - [duration duration.Duration duration.codec] - [instant instant.Instant instant.codec] - [date date.Date date.codec] - [day day.Day day.codec] - [month month.Month month.codec] + [duration duration.Duration duration.format] + [instant instant.Instant instant.format] + [date date.Date date.format] + [day day.Day day.format] + [month month.Month month.format] ) (the .public (sum left right) (for_any (_ left right) - (-> (Codec JSON left) (Codec JSON right) - (Codec JSON (Or left right)))) + (-> (Format JSON left) (Format JSON right) + (Format JSON (Or left right)))) (implementation (the (injection it) {#Array (sequence (when it @@ -594,9 +594,9 @@ (when it {#Array it'} (`` (when (sequence.list it') - (,, (with_template [,flag ,codec] + (,, (with_template [,flag ,format] [(.list {#Boolean ,flag} it) - (try#each (|>> {,flag}) (with ,codec (projection it)))] + (try#each (|>> {,flag}) (with ,format (projection it)))] [#0 left] [#1 right] @@ -610,8 +610,8 @@ (the .public (product left right) (for_any (_ left right) - (-> (Codec JSON left) (Codec JSON right) - (Codec JSON (And left right)))) + (-> (Format JSON left) (Format JSON right) + (Format JSON (And left right)))) (implementation (the (injection [itL itR]) {#Array (sequence (with left (injection itL)) @@ -634,9 +634,9 @@ (the .public (recursive context) (for_any (_ of) - (-> (-> (Codec JSON of) - (Codec JSON of)) - (Codec JSON of))) + (-> (-> (Format JSON of) + (Format JSON of)) + (Format JSON of))) (implementation (the (injection it) (with (context [injection @@ -649,8 +649,8 @@ (the .public (list item) (for_any (_ of) - (-> (Codec JSON of) - (Codec JSON (List of)))) + (-> (Format JSON of) + (Format JSON (List of)))) (implementation (the injection (|>> (list#each (with item injection)) @@ -668,8 +668,8 @@ (the .public (dictionary value) (for_any (_ of) - (-> (Codec JSON of) - (Codec JSON (Dictionary Text of)))) + (-> (Format JSON of) + (Format JSON (Dictionary Text of)))) (implementation (the injection (|>> (dictionary#each (of value injection)) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 427d421dd9..be873c2433 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -9,7 +9,7 @@ [ffi (.only)] [abstract [monad (.only do)] - [codec (.only Codec)]] + [format (.only Format)]] [control ["<>" projection] ["[0]" pipe] @@ -109,7 +109,7 @@ (of n.octal injection) (..octal_padding ) (text.suffix suffix) - (of utf8.codec injection) + (of utf8.format injection) (!binary.segment padded_size)))) (the @@ -161,7 +161,7 @@ (Projection Small) (<| (function (_ state)) (parsed state digits (?binary.segment ..small_size)) - (parsed state digits (<>.of_try (of utf8.codec projection digits))) + (parsed state digits (<>.of_try (of utf8.format projection digits))) (parsed state _ ..small_suffix) (do [! try.monad] [value (of n.octal projection digits) @@ -172,7 +172,7 @@ (Projection Big) (<| (function (_ state)) (parsed state digits (?binary.segment ..big_size)) - (parsed state digits (<>.of_try (of utf8.codec projection digits))) + (parsed state digits (<>.of_try (of utf8.format projection digits))) (parsed state end ?binary.bits_8) (let [expected (`` (char (,, (static ..blank))))]) (if (not (n.= expected end)) @@ -205,7 +205,7 @@ (the checksum_checksum (|> ..dummy_checksum nominal.representation - (of utf8.codec injection) + (of utf8.format injection) ..checksum)) (the checksum_code @@ -224,14 +224,14 @@ (let [padded_size (n.+ (text.size ..checksum_suffix) ..small_size)] (|>> nominal.representation - (of utf8.codec injection) + (of utf8.format injection) (!binary.segment padded_size)))) (the checksum_projection (Projection [Nat Checksum]) (<| (function (_ state)) (parsed state ascii (?binary.segment ..small_size)) - (parsed state digits (<>.of_try (of utf8.codec projection ascii))) + (parsed state digits (<>.of_try (of utf8.format projection ascii))) (parsed state _ ..small_suffix) (parsed state value (<>.of_try (of n.octal projection digits))) @@ -246,7 +246,7 @@ (the ascii? (-> Text Bit) - (|>> (of utf8.codec injection) + (|>> (of utf8.format injection) (binary.mix (function (_ char verdict) (.and verdict (n.<= ..last_ascii char))) @@ -270,7 +270,7 @@ size (loop (again [end (-- size)]) (when end - 0 (of utf8.codec injection "") + 0 (of utf8.format injection "") _ (let [last_char (binary!.bits_8 end string)] (`` (when (.nat last_char) (char (,, (static ..null))) @@ -295,7 +295,7 @@ (Try )) (if (..ascii? value) (if (|> value - (of utf8.codec injection) + (of utf8.format injection) binary!.size (n.> )) (exception.except [value]) @@ -313,7 +313,7 @@ padded_size (n.+ (text.size suffix) )] (|>> nominal.representation (text.suffix suffix) - (of utf8.codec injection) + (of utf8.format injection) (!binary.segment padded_size)))) (the @@ -325,7 +325,7 @@ (if (not (n.= expected end)) (exception.except ..wrong_character [expected end])) (do [! try.monad] - [text (of utf8.codec projection (..un_padded string)) + [text (of utf8.format projection (..un_padded string)) it ( text)] (in [state it])))) @@ -356,7 +356,7 @@ (let [padded_size (n.+ (text.size ..null) ..magic_size)] (|>> nominal.representation - (of utf8.codec injection) + (of utf8.format injection) (!binary.segment padded_size)))) (the magic_projection @@ -368,7 +368,7 @@ (if (not (n.= expected end)) (exception.except ..wrong_character [expected end])) (of try.monad each (|>> nominal.abstraction [state]) - (of utf8.codec projection string)))) + (of utf8.format projection string)))) ) (the block_size Size 512) @@ -849,7 +849,7 @@ Nat) (let [|checksum| (|> checksum ..from_checksum - (of utf8.codec injection) + (of utf8.format injection) ..checksum)] (|> (..checksum header) (n.- |checksum|) @@ -1006,8 +1006,8 @@ (of <>.monad each sequence.of_list) (<>.before ..end_of_archive_projection))) -(the .public codec - (Codec Binary Tar) +(the .public format + (Format Binary Tar) (implementation (the injection (!binary.value ..injection)) (the projection (?binary.value ..projection)))) diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux index 45427bd68f..f04c43ddbf 100644 --- a/stdlib/source/library/lux/data/format/xml.lux +++ b/stdlib/source/library/lux/data/format/xml.lux @@ -9,7 +9,7 @@ [abstract [monad (.only do)] [equivalence (.only Equivalence)] - [codec (.only Codec)]] + [format (.only Format)]] [control [try (.only Try)] ["<>" projection (.use "[1]#[0]" monad)]] @@ -64,7 +64,7 @@ (|> (do [! <>.monad] [hex? (<>.maybe (.this "x"))] (<| (of ! each (|>> .nat text.of_char)) - (<>.codec int.decimal) + (<>.format int.decimal) .slice .many! (when hex? @@ -239,8 +239,8 @@ " encoding=" (quote "UTF-8") "?>"))) -(the .public codec - (Codec Text XML) +(the .public format + (Format Text XML) (implementation (the injection (let [attributes (is (-> Attrs Text) diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index b181c01933..ce6457bd28 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -9,8 +9,7 @@ [monoid (.only Monoid)] [equivalence (.only Equivalence)] [order (.only Order)] - [monad (.only do)] - [codec (.only Codec)]] + [monad (.only do)]] [control ["[0]" maybe]] [data diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index 8cccd66d23..9eda701cd9 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -6,7 +6,7 @@ [lux (.except) ["[0]" ffi] [abstract - [codec (.only Codec)]] + [format (.only Format)]] [control ["[0]" try (.only Try)]] [data @@ -157,8 +157,8 @@ ..utf8->string {try.#Success})))) -(the .public codec - (Codec Binary Text) +(the .public format + (Format Binary Text) (implementation (the injection ..injection) (the projection ..projection))) diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index 7caf6976b6..9edad2fc3f 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -208,7 +208,7 @@ (the number^ (Projection Nat) (|> (.many .decimal) - (<>.codec n.decimal))) + (<>.format n.decimal))) (the re_back_reference^ (Projection Code) diff --git a/stdlib/source/library/lux/documentation/remember.lux b/stdlib/source/library/lux/documentation/remember.lux index baf5f60e79..3df428506d 100644 --- a/stdlib/source/library/lux/documentation/remember.lux +++ b/stdlib/source/library/lux/documentation/remember.lux @@ -45,7 +45,7 @@ .int) (do <>.monad [raw .text] - (when (of date.codec projection raw) + (when (of date.format projection raw) {try.#Success date} (in date) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index fc46fa2693..74ba0eba20 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -16,7 +16,7 @@ ["[0]" try (.only Try)]] [data ["[0]" product] - ["[0]" bit (.use "[1]#[0]" codec)] + ["[0]" bit (.use "[1]#[0]" format)] ["[0]" text (.use "[1]#[0]" equivalence monoid) ["%" \\injection]] [collection diff --git a/stdlib/source/library/lux/math/arithmetic/modular.lux b/stdlib/source/library/lux/math/arithmetic/modular.lux index 4d2fb05687..aba83da0c3 100644 --- a/stdlib/source/library/lux/math/arithmetic/modular.lux +++ b/stdlib/source/library/lux/math/arithmetic/modular.lux @@ -8,7 +8,7 @@ [equivalence (.only Equivalence)] [order (.only Order)] [monoid (.only Monoid)] - [codec (.only Codec)] + [format (.only Format)] [monad (.only do)]] [control ["<>" projection] @@ -67,13 +67,13 @@ (the intL (Projection Int) - (<>.codec i.decimal - (.and (.one_of "-+") (.many .decimal)))) + (<>.format i.decimal + (.and (.one_of "-+") (.many .decimal)))) - (the .public (codec expected) + (the .public (format expected) (for_any (_ %) (-> (Modulus %) - (Codec Text (Mod %)))) + (Format Text (Mod %)))) (implementation (the (injection modular) (let [[_ value] (nominal.representation modular)] @@ -156,7 +156,7 @@ (for_any (_ %) (Exception (Mod %))) (exception.report - (list ["Number" (of (..codec (..modulus it)) injection it)]))) + (list ["Number" (of (..format (..modulus it)) injection it)]))) (the .public (inverse modular) (for_any (_ %) diff --git a/stdlib/source/library/lux/math/number.lux b/stdlib/source/library/lux/math/number.lux index 3af16bb231..07673e077c 100644 --- a/stdlib/source/library/lux/math/number.lux +++ b/stdlib/source/library/lux/math/number.lux @@ -5,7 +5,7 @@ [library [lux (.except) [abstract - [codec (.only Codec)]] + [format (.only Format)]] [control ["[0]" try (.only Try)]] [data @@ -57,9 +57,9 @@ {try.#Success value}]) {try.#Success [state (list [meta {.#Rev value}])]} - (,, (with_template [] + (,, (with_template [] [(^.multi {try.#Failure _} - [(of projection repr) + [(of projection repr) {try.#Success value}]) {try.#Success [state (list [meta {.#Dec value}])]}] diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index 8412e6f5c5..141086c141 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -6,7 +6,7 @@ [lux (.except) [abstract [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] [monad (.only do)]] [control ["<>" projection] @@ -371,8 +371,8 @@ (.text_composite# (of d.decimal injection (its ..#real it)) " " (of d.decimal injection (its ..#imaginary it)) "i")) -(the .public codec - (Codec Text Complex) +(the .public format + (Format Text Complex) (implementation (the injection ..injection) (the (projection it) diff --git a/stdlib/source/library/lux/math/number/dec.lux b/stdlib/source/library/lux/math/number/dec.lux index 02db24124b..e2e5598fff 100644 --- a/stdlib/source/library/lux/math/number/dec.lux +++ b/stdlib/source/library/lux/math/number/dec.lux @@ -8,7 +8,7 @@ [hash (.only Hash)] [monoid (.only Monoid)] [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] [order (.only Order)] [monad (.only do)]] [control @@ -539,7 +539,7 @@ success)])) (the .public decimal - (Codec Text Dec) + (Format Text Dec) (implementation (the (injection it) (when it @@ -599,7 +599,7 @@ "+0.0" ,success "-0.0" ,success - ... else + else {try.#Failure ..cannot_project}) ,success))))))) @@ -745,8 +745,8 @@ (..* exponent) (..* sign))))) -(`` (the (representation_exponent codec representation) - (-> (Codec Text Nat) Text +(`` (the (representation_exponent format representation) + (-> (Format Text Nat) Text (Try [Text Int])) (when [(.text_index# 0 "e+" representation) (.text_index# 0 "E+" representation) @@ -759,7 +759,7 @@ after_length (//nat.- after_offset (.text_size# representation))] exponent (|> representation (.text_clip# after_offset after_length) - (of codec projection))] + (of format projection))] (in [(.text_clip# 0 split_index representation) (//int.* (.int exponent))]))] @@ -774,7 +774,7 @@ (with_template [ ] [(the .public - (Codec Text Dec) + (Format Text Dec) (implementation (the (injection value) (let [bits (..bits value) @@ -849,7 +849,7 @@ (..+ divisor remainder) remainder))) -(with_template [ ] +(with_template [ ] [(the .public (-> Dec Dec) @@ -860,8 +860,8 @@ Dec) (/ )) - (the .public - (Codec Text Dec) + (the .public + (Format Text Dec) (implementation (the injection (|>> diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux index 51b11c551a..a6c9c8d710 100644 --- a/stdlib/source/library/lux/math/number/frac.lux +++ b/stdlib/source/library/lux/math/number/frac.lux @@ -9,7 +9,7 @@ [equivalence (.only Equivalence)] [order (.only Order)] [monoid (.only Monoid)] - [codec (.only Codec)] + [format (.only Format)] [monad (.only do)]] [control ["<>" projection] @@ -166,8 +166,8 @@ (the separator "/") -(the .public codec - (Codec Text Frac) +(the .public format + (Format Text Frac) (implementation (the (injection (open "/[0]")) (all text#composite diff --git a/stdlib/source/library/lux/math/number/int.lux b/stdlib/source/library/lux/math/number/int.lux index 1d04d51f9e..97568e6432 100644 --- a/stdlib/source/library/lux/math/number/int.lux +++ b/stdlib/source/library/lux/math/number/int.lux @@ -10,7 +10,7 @@ [interval (.only Interval)] [monoid (.only Monoid)] [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] ["[0]" order (.only Order)]] [control ["[0]" maybe] @@ -238,14 +238,14 @@ (the -sign "-") (the +sign "+") -(with_template [ ] +(with_template [ ] [(the .public - (Codec Text Int) + (Format Text Int) (implementation (the (injection value) (if (..< +0 value) - (|> value ++ ..opposite .nat ++ (of injection) (.text_composite# ..-sign)) - (|> value .nat (of injection) (.text_composite# ..+sign)))) + (|> value ++ ..opposite .nat ++ (of injection) (.text_composite# ..-sign)) + (|> value .nat (of injection) (.text_composite# ..+sign)))) (the (projection repr) (let [input_size (.text_size# repr)] @@ -254,13 +254,13 @@ ..+sign (|> repr (.text_clip# 1 (-- input_size)) - (of projection) + (of projection) (of try.functor each (|>> .int))) ..-sign (|> repr (.text_clip# 1 (-- input_size)) - (of projection) + (of projection) (of try.functor each (|>> -- .int ..opposite --))) _ diff --git a/stdlib/source/library/lux/math/number/nat.lux b/stdlib/source/library/lux/math/number/nat.lux index 5e93e353dc..0416f78f1e 100644 --- a/stdlib/source/library/lux/math/number/nat.lux +++ b/stdlib/source/library/lux/math/number/nat.lux @@ -10,7 +10,7 @@ [interval (.only Interval)] [monoid (.only Monoid)] [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] ["[0]" order (.only Order)]] [control ["[0]" function] @@ -333,7 +333,7 @@ (with_template [ ] [(the .public - (Codec Text Nat) + (Format Text Nat) (implementation (the injection (let [mask (|> 1 (.i64_left# ) --)] @@ -373,7 +373,7 @@ ) (the .public decimal - (Codec Text Nat) + (Format Text Nat) (implementation (the (injection value) (loop (again [input value @@ -410,18 +410,18 @@ (the equivalence ..equivalence) (the hash function.identity))) -(the .public (padded expected_size codec) - (-> Nat (Codec Text Nat) - (Codec Text Nat)) +(the .public (padded expected_size format) + (-> Nat (Format Text Nat) + (Format Text Nat)) (implementation (the (injection it) - (loop (next [it (of codec injection it)]) + (loop (next [it (of format injection it)]) (if (< expected_size (.text_size# it)) (next (.text_composite# "0" it)) it))) (the projection - (of codec projection)))) + (of format projection)))) (alias [base_02] ..binary) (alias [base_08] ..octal) diff --git a/stdlib/source/library/lux/math/number/rat.lux b/stdlib/source/library/lux/math/number/rat.lux index b65ca43ce5..4b12a0e7ee 100644 --- a/stdlib/source/library/lux/math/number/rat.lux +++ b/stdlib/source/library/lux/math/number/rat.lux @@ -9,7 +9,7 @@ [equivalence (.only Equivalence)] [order (.only Order)] [monoid (.only Monoid)] - [codec (.only Codec)] + [format (.only Format)] [monad (.only do)]] [control ["<>" projection] @@ -166,8 +166,8 @@ (the separator "/") -(the .public codec - (Codec Text Rat) +(the .public format + (Format Text Rat) (implementation (the (injection (open "/[0]")) (all text#composite diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux index 00a22634d2..e5504f2d92 100644 --- a/stdlib/source/library/lux/math/number/rev.lux +++ b/stdlib/source/library/lux/math/number/rev.lux @@ -10,7 +10,7 @@ [interval (.only Interval)] [monoid (.only Monoid)] [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] [order (.only Order)]] [control ["[0]" try]] @@ -253,13 +253,13 @@ Text) (.text_clip# 1 (-- (.text_size# input)) input)) -(with_template [ ] +(with_template [ ] [(with_expansions [ (these {try.#Failure (.text_composite# repr)})] (the .public - (Codec Text Rev) + (Format Text Rev) (implementation (the (injection value) - (let [raw_output (of injection (.nat value)) + (let [raw_output (of injection (.nat value)) max_num_chars (//nat.+ (//nat./ //i64.width) (when (//nat.% //i64.width) 0 0 @@ -281,7 +281,7 @@ (if (//nat.> 1 repr_size) (when (.text_char# 0 repr) (char ".") - (when (of projection (..decimals repr)) + (when (of projection (..decimals repr)) {try.#Success output} {try.#Success (.rev output)} @@ -441,7 +441,7 @@ (digits#-!' idx (..digit idx param) output))))) (the .public decimal - (Codec Text Rev) + (Format Text Rev) (implementation (the (injection input) (when (.nat input) diff --git a/stdlib/source/library/lux/meta/code.lux b/stdlib/source/library/lux/meta/code.lux index 2f759b8d0b..25c2115ec1 100644 --- a/stdlib/source/library/lux/meta/code.lux +++ b/stdlib/source/library/lux/meta/code.lux @@ -96,7 +96,7 @@ [[_ { value}] (of injection value)] - [.#Bit bit.codec] + [.#Bit bit.format] [.#Nat nat.decimal] [.#Int int.decimal] [.#Rev rev.decimal] @@ -132,7 +132,7 @@ [[_ { value}] (of injection value)] - [.#Bit bit.codec] + [.#Bit bit.format] [.#Nat nat.decimal] [.#Int int.decimal] [.#Rev rev.decimal] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/complex.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/complex.lux index 428f7cf244..a6da08655d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/complex.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/complex.lux @@ -3,7 +3,8 @@ (.require [library - [lux (.except Variant Tuple) + [lux (.except Variant Tuple + variant tuple) [abstract ["[0]" monad (.only do)]] [meta diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/runtime.lux index 445c676b29..3edaf693ca 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/runtime.lux @@ -5,7 +5,7 @@ [library [lux (.except Type Declaration Bit I64 F64 Text Variant Tuple - function false true left right) + variant tuple function false true left right) [abstract ["[0]" monad (.only do)]] [data @@ -252,7 +252,7 @@ (-> _.Type _.Expression _.Expression) (|> it - (_.the* ) + (_.its* ) (_.is (type.address of)))) (the .public (simple [tag of] it) @@ -347,7 +347,7 @@ (the .public peek (-> _.Expression _.Expression) - (_.the* )) + (_.its* )) (the tag (_.local )) @@ -536,9 +536,9 @@ it (_.local (..name)) mismatch! (_.return ..null) - actual_lefts (_.the* it) - actual_right? (_.the* it) - actual_value (_.the* it) + actual_lefts (_.its* it) + actual_right? (_.its* it) + actual_value (_.its* it) @loop (_.label (..name)) next! (all _.then @@ -768,7 +768,7 @@ ..value_type (|> it (host_value function_type) - (_.the* ) + (_.its* ) (_.on (list it arguments)))) (_.return output)) {.#Some (all _.then @@ -776,14 +776,14 @@ ..partials_type (|> it (host_value function_type) - (_.the* ))) + (_.its* ))) (partials partiality old_partials current_arity arguments all_arguments) (_.constant output ..value_type (|> it (host_value function_type) - (_.the* ) + (_.its* ) (_.on (list it all_arguments)))) (_.delete_array all_arguments) (_.return output))})))) @@ -799,12 +799,12 @@ ..partials_type (|> it (host_value function_type) - (_.the* ))) + (_.its* ))) (partials partiality old_partials current_arity arguments all_partials) (_.return (|> it (host_value function_type) - (_.the* ) + (_.its* ) (function' actual_arity all_partials expected_arity))) )))) on#over (is (-> _.Local _.Local _.Local @@ -827,7 +827,7 @@ ..partials_type (|> it (host_value function_type) - (_.the* ))) + (_.its* ))) (_.constant cap_arity //type.arity (_.- old_partiality expected_arity)) @@ -840,7 +840,7 @@ ..value_type (|> it (host_value function_type) - (_.the* ) + (_.its* ) (_.on (list it complete_arguments)))) (_.delete_array complete_arguments)) @@ -877,10 +877,10 @@ (all _.then (_.constant partiality //type.arity - (_.the* (host_value function_type it))) + (_.its* (host_value function_type it))) (_.constant expected_arity //type.arity - (_.the* (host_value function_type it))) + (_.its* (host_value function_type it))) (_.constant actual_arity //type.arity (_.+ current_arity partiality)) @@ -919,7 +919,7 @@ (list [it stack]) stack (all _.then - (_.constant bottom stack (_.the* it)) + (_.constant bottom stack (_.its* it)) (_.delete it) (_.return bottom) ))) @@ -953,7 +953,7 @@ (list) (list [it ..value_type]) //type.i64 - (_.return (_.the* it)))) + (_.return (_.its* it)))) (,, (with_template [ ] [(let [it (_.local (..name))] @@ -981,13 +981,13 @@ type.string (all _.then (_.constant value (type.address text_type) (host_value text_type it)) - (_.constant data text_data_type (_.the* value)) + (_.constant data text_data_type (_.its* value)) (_.var_declaration converter converter_type) (_.return (_.do "to_bytes" (list) (list data (_.+ data - (_.the* value))) + (_.its* value))) converter))))) (,, (with_template [ ] @@ -996,7 +996,7 @@ (list) (list [it ..value_type]) - (_.return (_.the* (host_value ..variant_type it)))))] + (_.return (_.its* (host_value ..variant_type it)))))] [ //type.i64] [ //type.bit] @@ -1008,7 +1008,7 @@ (list) (list [it ..value_type]) //type.i64 - (_.return (_.the* (host_value ..tuple_type it))))) + (_.return (_.its* (host_value ..tuple_type it))))) (let [item (_.local (..name)) it (_.local (..name))] @@ -1017,14 +1017,14 @@ (list [item //type.i64] [it ..value_type]) ..value_type - (_.return (_.item item (_.the* (host_value ..tuple_type it)))))) + (_.return (_.item item (_.its* (host_value ..tuple_type it)))))) ))))) (the .public tuple_values (-> _.Expression _.Expression) (|>> (..host_value ..tuple_type) - (_.the* )))) + (_.its* )))) ) (the .public id @@ -1040,4 +1040,4 @@ (registry.resource .true unit.none) product.right) (sequence.sequence [..id {.#None} - (of utf8.codec injection (_.code ..declaration))])]))) + (of utf8.format injection (_.code ..declaration))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux index e2a7c502ea..e7cc7b78ed 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/c++/when.lux @@ -90,7 +90,7 @@ after)))) (the .public (its next archive it) - (runtime.Expression synthesis.The) + (runtime.Expression synthesis.Its) (do phase.monad [source (next archive (.its synthesis.#source it))] (in (list#mix (function (_ side source) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/function.lux index 70603deab5..abb99bf3fa 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/function.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/function.lux @@ -11,7 +11,10 @@ [text ["%" \\injection]] [collection - ["[0]" list (.use "[1]#[0]" functor mix)]]] + ["[0]" list (.use "[1]#[0]" monoid functor mix)]]] + [math + [number + ["n" nat]]] [meta [compiler [target @@ -25,8 +28,8 @@ ["//[1]" /// [analysis (.only Abstraction Reification)] ["[0]" phase (.use "[1]#[0]" monad)] - ["[0]" synthesis] - ["[1][0]" translation] + ["[0]" synthesis (.only Apply)] + ["[0]" translation] ["//[1]" /// [arity (.only Arity)] [reference @@ -38,17 +41,86 @@ [dependency ["[1]" artifact]]]]]]]]) -(the .public (apply expression archive [functionS argsS+]) - (Translator (Reification synthesis.Term)) - (do [! phase.monad] - [functionO (expression archive functionS) - argsO+ (monad.each ! (expression archive) argsS+)] - (in (_.apply functionO argsO+)))) - (the capture (-> Register Var) (|>> (///reference.foreign //reference.system) as_expected)) +(the (procedure_id abstraction_id) + (-> unit.ID + unit.ID) + [unit.#module (unit.module abstraction_id) + unit.#artifact (++ (unit.artifact abstraction_id))]) + +(the (@scope abstraction_id) + (-> unit.ID Text) + (%.message (///reference.artifact abstraction_id) "_scope")) + +(the (procedure environment name arity body) + (-> (List //runtime.Value) unit.ID Arity _.Statement + _.Statement) + (_.function_definition + (_.var (///reference.artifact name)) + (all list#composite + (|> (list.enumeration environment) + (list#each (|>> product.left ..capture))) + (list (//when.register 0)) + (list#each (|>> ++ //when.register) + (list.indices arity)) + ) + (<| (_.with_label (_.label (..@scope name))) + (_.do_while (_.boolean true)) + body))) + +(the (arbitrary_reification' expression archive [abstraction parameters]) + (Translator [//runtime.Value (List synthesis.Term)]) + (do [! phase.monad] + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply abstraction parameters)))) + +(the (arbitrary_reification expression archive [abstraction parameters]) + (Translator Apply) + (do phase.monad + [abstraction (expression archive abstraction)] + (arbitrary_reification' expression archive [abstraction parameters]))) + +(the (exact_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply (_.var (///reference.artifact (..procedure_id abstraction))) + {.#Item (_.var (///reference.artifact abstraction)) + parameters})))) + +(the (successive_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [first (exact_reification expression archive [abstraction arity (list.first arity parameters)])] + (arbitrary_reification' expression archive [first (list.after arity parameters)]))) + +(the .public (apply expression archive [abstraction parameters]) + (Translator Apply) + (when abstraction + (synthesis.constant @ $abstraction) + (do [! phase.monad] + [[@definition |abstraction|] (translation.definition archive $abstraction) + .let [actual_arity (list.size parameters)]] + (when |abstraction| + {.#Some [_ {.#Some [expected_arity @abstraction]}]} + (cond (n.= expected_arity actual_arity) + (exact_reification expression archive [@abstraction expected_arity parameters]) + + (n.< expected_arity actual_arity) + (arbitrary_reification expression archive [abstraction parameters]) + + ... (n.> expected_arity actual_arity) + (successive_reification expression archive [@abstraction expected_arity parameters])) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) + (the (with_closure @self inits body!) (-> Var (List Expression) Statement [Statement Expression]) (when inits @@ -57,10 +129,11 @@ @self] _ - [(_.function_definition @self - (|> (list.enumeration inits) - (list#each (|>> product.left ..capture))) - (_.return (_.function @self (list) body!))) + [(_.function_definition + @self + (|> (list.enumeration inits) + (list#each (|>> product.left ..capture))) + (_.return (_.function @self (list) body!))) (_.apply @self inits)])) (the @curried @@ -72,24 +145,21 @@ (the @@arguments (_.var "arguments")) -(the (@scope function_name) - (-> unit.ID Text) - (%.message (///reference.artifact function_name) "_scope")) - (the .public (function statement expression archive [environment arity bodyS]) (-> Phase! (Translator (Abstraction synthesis.Term))) (do [! phase.monad] [dependencies (cache.dependencies archive bodyS) - [function_name body!] (/////translation.with_new_context archive dependencies - (do ! - [scope (of ! each ..@scope - (/////translation.context archive))] - (/////translation.with_anchor [1 scope] - (statement expression archive bodyS)))) + [abstraction_id procedure_id body!] (<| (translation.with_new_context archive dependencies) + (translation.with_new_context archive dependencies) + (do ! + [scope (of ! each ..@scope + (translation.context archive))] + (translation.with_anchor [1 scope] + (statement expression archive bodyS)))) .let [arityO (|> arity .int _.i32) @num_args (_.var "num_args") - @scope (..@scope function_name) - @self (_.var (///reference.artifact function_name)) + @scope (..@scope procedure_id) + @self (_.var (///reference.artifact abstraction_id)) apply_poly (.function (_ args func) (|> func (_.do "apply" (list _.null args)))) initialize_self! (_.define (//when.register 0) @self) @@ -100,15 +170,19 @@ initialize_self! (list.indices arity))] environment (monad.each ! (expression archive) environment) + _ (do ! + [.let [procedure_definition (..procedure environment procedure_id arity body!)] + _ (translation.execute! procedure_definition)] + (translation.save! (unit.artifact procedure_id) {.#None} procedure_definition)) .let [[definition instantiation] (with_closure @self environment (all _.then (_.define @num_args (_.its "length" @@arguments)) (<| (_.if (|> @num_args (_.= arityO)) (all _.then initialize! - (_.with_label (_.label @scope) - (_.do_while (_.boolean true) - body!)))) + (<| (_.with_label (_.label @scope)) + (_.do_while (_.boolean true)) + body!))) (_.if (|> @num_args (_.> arityO)) (let [arity_inputs (|> (_.array (list)) (_.its "slice") @@ -130,6 +204,6 @@ (_.return (apply_poly (_.do "concat" (list @missing) @curried) @self)))))))) ))] - _ (/////translation.execute! definition) - _ (/////translation.save! (product.right function_name) {.#None} definition)] + _ (translation.execute! definition) + _ (translation.save! (product.right abstraction_id) {.#None} definition)] (in instantiation))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux index 0e21238151..7b7bcfdcb1 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/js/runtime.lux @@ -859,4 +859,4 @@ {.#None} (|> ..full _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux index 458a668330..31eb6a839f 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux @@ -74,7 +74,7 @@ [reference [register (.only Register)]]]]]]) -(the .public (with translate archive @begin class environment arity body) +(the .public (with expression archive @begin class environment arity body) (-> Phase Archive Label External (Environment synthesis.Term) Arity (Bytecode Any) (Operation [(List (Resource Field)) (List (Resource Method)) @@ -94,7 +94,7 @@ (list (/implementation.method classT arity @begin body) (/apply.method classT environment arity @begin 1)))))] (do [! phase.monad] - [environment (monad.each ! (translate archive) environment)] + [environment (monad.each ! (expression archive) environment)] (in [fields methods (/init.instance classT environment arity)])))) (the modifier @@ -114,16 +114,16 @@ reflection.reflection name.internal)) -(the .public (abstraction translate archive [environment arity bodyS]) +(the .public (abstraction expression archive [environment arity bodyS]) (Translator Abstraction) (do phase.monad [dependencies (cache/artifact.dependencies archive bodyS) @begin //runtime.forge_label [function_context bodyG] (<| (translation.with_new_context archive dependencies) (translation.with_anchor [@begin ..this_offset]) - (translate archive bodyS)) + (expression archive bodyS)) .let [function_class (//runtime.class_name function_context)] - [fields methods instance] (..with translate archive @begin function_class environment arity bodyG) + [fields methods instance] (..with expression archive @begin function_class environment arity bodyG) module translation.module class (phase.of_try (class.class version.v6_0 ..modifier @@ -138,13 +138,13 @@ _ (translation.save! (product.right function_context) {.#None} bytecode)] (in instance))) -(the (apply/?' translate archive [abstractionG inputsS]) +(the (arbitrary_reification' expression archive [abstraction parameters]) (Translator [(Bytecode Any) (List synthesis.Term)]) (do [! phase.monad] - [inputsG (monad.each ! (translate archive) inputsS)] + [parameters (monad.each ! (expression archive) parameters)] (in (all _.composite - abstractionG - (|> inputsG + abstraction + (|> parameters (list.sub /arity.maximum) (monad.each _.monad (function (_ batchG) @@ -155,50 +155,50 @@ )))) )))) -(the (apply/? translate archive [abstractionS inputsS]) +(the (arbitrary_reification expression archive [abstraction parameters]) (Translator Apply) (do [! phase.monad] - [abstractionG (translate archive abstractionS)] - (apply/?' translate archive [abstractionG inputsS]))) + [abstraction (expression archive abstraction)] + (arbitrary_reification' expression archive [abstraction parameters]))) -(the (apply/= translate archive [$abstraction @abstraction arity inputsS]) +(the (exact_reification expression archive [$abstraction @abstraction arity parameters]) (Translator [Symbol unit.ID Arity (List synthesis.Term)]) (do [! phase.monad] [.let [:abstraction: (type.class (//runtime.class_name @abstraction) (list))] - abstractionG (//reference.constant archive $abstraction) - inputsG (monad.each ! (translate archive) inputsS)] + abstraction (//reference.constant archive $abstraction) + parameters (monad.each ! (expression archive) parameters)] (in (all _.composite - abstractionG - (monad.all _.monad inputsG) + abstraction + (monad.all _.monad parameters) (/implementation.call :abstraction: arity) )))) -(the (apply/> translate archive [$abstraction @abstraction arity inputsS]) +(the (successive_reification expression archive [$abstraction @abstraction arity parameters]) (Translator [Symbol unit.ID Arity (List synthesis.Term)]) (do [! phase.monad] - [=G (apply/= translate archive [$abstraction @abstraction arity (list.first arity inputsS)])] - (apply/?' translate archive [=G (list.after arity inputsS)]))) + [first (exact_reification expression archive [$abstraction @abstraction arity (list.first arity parameters)])] + (arbitrary_reification' expression archive [first (list.after arity parameters)]))) -(the .public (apply translate archive [abstractionS inputsS]) +(the .public (apply expression archive [abstraction parameters]) (Translator Apply) - (when abstractionS + (when abstraction (synthesis.constant @ $abstraction) (do [! phase.monad] [[@definition |abstraction|] (translation.definition archive $abstraction) - .let [actual_arity (list.size inputsS)]] + .let [actual_arity (list.size parameters)]] (when |abstraction| {.#Some [_ {.#Some [expected_arity @abstraction]}]} - (cond (n.< expected_arity actual_arity) - (apply/? translate archive [abstractionS inputsS]) - - (n.= expected_arity actual_arity) - (apply/= translate archive [$abstraction @abstraction expected_arity inputsS]) + (cond (n.= expected_arity actual_arity) + (exact_reification expression archive [$abstraction @abstraction expected_arity parameters]) + + (n.< expected_arity actual_arity) + (arbitrary_reification expression archive [abstraction parameters]) ... (n.> expected_arity actual_arity) - (apply/> translate archive [$abstraction @abstraction expected_arity inputsS])) + (successive_reification expression archive [$abstraction @abstraction expected_arity parameters])) _ - (apply/? translate archive [abstractionS inputsS]))) + (arbitrary_reification expression archive [abstraction parameters]))) _ - (apply/? translate archive [abstractionS inputsS]))) + (arbitrary_reification expression archive [abstraction parameters]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/function.lux index 0954f409c9..903f0d8cc4 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/function.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/function.lux @@ -3,7 +3,8 @@ (.require [library - [lux (.except Label function) + [lux (.except Label + function) [abstract ["[0]" monad (.only do)]] [data @@ -11,7 +12,10 @@ [text ["%" \\injection]] [collection - ["[0]" list (.use "[1]#[0]" functor mix)]]] + ["[0]" list (.use "[1]#[0]" monoid functor mix)]]] + [math + [number + ["n" nat]]] [meta [compiler [target @@ -24,9 +28,9 @@ ["[1][0]" reference] ["//[1]" /// [analysis (.only Abstraction Reification)] - ["[0]" synthesis] ["[0]" phase (.use "[1]#[0]" monad)] - ["[1][0]" translation] + ["[0]" synthesis (.only Apply)] + ["[0]" translation] ["//[1]" /// [arity (.only Arity)] [meta @@ -38,17 +42,81 @@ [reference [register (.only Register)]]]]]]) -(the .public (apply expression archive [functionS argsS+]) - (Translator (Reification synthesis.Term)) - (do [! phase.monad] - [functionO (expression archive functionS) - argsO+ (monad.each ! (expression archive) argsS+)] - (in (_.apply argsO+ functionO)))) - (the capture (-> Register Var) (|>> (///reference.foreign //reference.system) as_expected)) +(the (procedure_id abstraction_id) + (-> unit.ID + unit.ID) + [unit.#module (unit.module abstraction_id) + unit.#artifact (++ (unit.artifact abstraction_id))]) + +(the (procedure environment name arity @scope body) + (-> (List //runtime.Value) unit.ID Arity Label Statement + Statement) + (_.function (_.var (///reference.artifact name)) + (all list#composite + (|> (list.enumeration environment) + (list#each (|>> product.left ..capture))) + (list (//when.register 0)) + (list#each (|>> ++ //when.register) + (list.indices arity)) + ) + (all _.then + (_.set_label @scope) + body))) + +(the (arbitrary_reification' expression archive [abstraction parameters]) + (Translator [//runtime.Value (List synthesis.Term)]) + (do [! phase.monad] + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply parameters abstraction)))) + +(the (arbitrary_reification expression archive [abstraction parameters]) + (Translator Apply) + (do phase.monad + [abstraction (expression archive abstraction)] + (arbitrary_reification' expression archive [abstraction parameters]))) + +(the (exact_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply {.#Item (_.var (///reference.artifact abstraction)) + parameters} + (_.var (///reference.artifact (..procedure_id abstraction))))))) + +(the (successive_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [first (exact_reification expression archive [abstraction arity (list.first arity parameters)])] + (arbitrary_reification' expression archive [first (list.after arity parameters)]))) + +(the .public (apply expression archive [abstraction parameters]) + (Translator Apply) + (when abstraction + (synthesis.constant @ $abstraction) + (do [! phase.monad] + [[@definition |abstraction|] (translation.definition archive $abstraction) + .let [actual_arity (list.size parameters)]] + (when |abstraction| + {.#Some [_ {.#Some [expected_arity @abstraction]}]} + (cond (n.= expected_arity actual_arity) + (exact_reification expression archive [@abstraction expected_arity parameters]) + + (n.< expected_arity actual_arity) + (arbitrary_reification expression archive [abstraction parameters]) + + ... (n.> expected_arity actual_arity) + (successive_reification expression archive [@abstraction expected_arity parameters])) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) + (the (with_closure inits @self @args body!) (-> (List Expression) Var (List Var) Statement [Statement Expression]) (when inits @@ -68,26 +136,27 @@ (the input (|>> ++ //when.register)) -(the (@scope function_name) +(the (@scope abstraction_id) (-> unit.ID Label) - (_.label (%.message (///reference.artifact function_name) "_scope"))) + (_.label (%.message (///reference.artifact abstraction_id) "_scope"))) (the .public (function statement expression archive [environment arity bodyS]) (-> Phase! (Translator (Abstraction synthesis.Term))) (do [! phase.monad] [dependencies (cache.dependencies archive bodyS) - [function_name body!] (/////translation.with_new_context archive dependencies - (do ! - [@scope (of ! each ..@scope - (/////translation.context archive))] - (/////translation.with_anchor [1 @scope] - (statement expression archive bodyS)))) - closureO+ (monad.each ! (expression archive) environment) + [abstraction_id procedure_id body!] (<| (translation.with_new_context archive dependencies) + (translation.with_new_context archive dependencies) + (do ! + [@scope (of ! each ..@scope + (translation.context archive))] + (translation.with_anchor [1 @scope] + (statement expression archive bodyS)))) + environment (monad.each ! (expression archive) environment) .let [@curried (_.var "curried") arityO (|> arity .int _.int) @num_args (_.var "num_args") - @scope (..@scope function_name) - @self (_.var (///reference.artifact function_name)) + @scope (..@scope procedure_id) + @self (_.var (///reference.artifact abstraction_id)) initialize_self! (_.local/1 (//when.register 0) @self) initialize! (list#mix (.function (_ post pre!) (all _.then @@ -100,7 +169,11 @@ (.function (_ it) (_.apply (list it) (_.var "table.unpack")))) @var_args (_.var "...")] - .let [[definition instantiation] (with_closure closureO+ @self (list @var_args) + _ (do ! + [.let [procedure_definition (..procedure environment procedure_id arity @scope body!)] + _ (translation.execute! procedure_definition)] + (translation.save! (unit.artifact procedure_id) {.#None} procedure_definition)) + .let [[definition instantiation] (with_closure environment @self (list @var_args) (all _.then (_.local/1 @curried (pack @var_args)) (_.local/1 @num_args (_.length @curried)) @@ -143,6 +216,6 @@ (_.var "table.move")))) @self))))))) ))] - _ (/////translation.execute! definition) - _ (/////translation.save! (product.right function_name) {.#None} definition)] + _ (translation.execute! definition) + _ (translation.save! (product.right abstraction_id) {.#None} definition)] (in instantiation))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux index f23349368f..e01960e143 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/lua/runtime.lux @@ -491,4 +491,4 @@ {.#None} (|> ..full _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux index 7d494d1c9c..8a1e3d7e2e 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/php/runtime.lux @@ -635,4 +635,4 @@ (sequence.sequence [..module_id (|> ..runtime _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/function.lux index a6b4793581..5e61916de3 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/function.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/function.lux @@ -9,13 +9,16 @@ [data ["[0]" product] [collection - ["[0]" list (.use "[1]#[0]" functor mix)]]] + ["[0]" list (.use "[1]#[0]" monoid functor mix)]]] + [math + [number + ["n" nat]]] [meta [compiler [target ["_" python (.only SVar Expression Statement)]]]]]] ["[0]" // - [runtime (.only Operation Phase Translator Phase! Translator!)] + ["[1][0]" runtime (.only Operation Phase Translator Phase! Translator!)] ["[1][0]" reference] ["[1][0]" when] ["[1][0]" loop] @@ -23,9 +26,9 @@ ["[1][0]" reference] ["//[1]" /// [analysis (.only Environment Abstraction Reification)] - ["[0]" synthesis] ["[0]" phase] - ["[1][0]" translation] + ["[0]" synthesis (.only Apply)] + ["[0]" translation] ["//[1]" /// [arity (.only Arity)] [reference @@ -33,29 +36,95 @@ [variable (.only Variable)]] [meta [archive (.only Archive) - ["[0]" artifact]] + ["[0]" artifact] + ["[0]" unit]] ["[0]" cache [dependency ["[1]" artifact]]]]]]]]) -(the .public (apply expression archive [functionS argsS+]) - (Translator (Reification synthesis.Term)) +(the .public capture + (-> Register + SVar) + (|>> (///reference.foreign //reference.system) + as_expected)) + +(the (procedure_id abstraction_id) + (-> unit.ID + unit.ID) + [unit.#module (unit.module abstraction_id) + unit.#artifact (++ (unit.artifact abstraction_id))]) + +(the (procedure environment name arity body) + (-> (List //runtime.Value) unit.ID Arity (_.Statement Any) + (_.Statement Any)) + (_.def (_.var (///reference.artifact name)) + (all list#composite + (|> (list.enumeration environment) + (list#each (|>> product.left ..capture))) + (list (//when.register 0)) + (list#each (|>> ++ //when.register) + (list.indices arity)) + ) + (<| //loop.set_scope + body))) + +(the (arbitrary_reification' expression archive [abstraction parameters]) + (Translator [//runtime.Value (List synthesis.Term)]) (do [! phase.monad] - [functionO (expression archive functionS) - argsO+ (monad.each ! (expression archive) argsS+)] - (in (_.apply argsO+ functionO)))) + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply parameters abstraction)))) -(the .public capture - (-> Register SVar) - (|>> (///reference.foreign //reference.system) as_expected)) +(the (arbitrary_reification expression archive [abstraction parameters]) + (Translator Apply) + (do phase.monad + [abstraction (expression archive abstraction)] + (arbitrary_reification' expression archive [abstraction parameters]))) + +(the (exact_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [parameters (monad.each ! (expression archive) parameters)] + (in (_.apply {.#Item (_.var (///reference.artifact abstraction)) + parameters} + (_.var (///reference.artifact (..procedure_id abstraction))))))) + +(the (successive_reification expression archive [abstraction arity parameters]) + (Translator [unit.ID Arity (List synthesis.Term)]) + (do [! phase.monad] + [first (exact_reification expression archive [abstraction arity (list.first arity parameters)])] + (arbitrary_reification' expression archive [first (list.after arity parameters)]))) + +(the .public (apply expression archive [abstraction parameters]) + (Translator Apply) + (when abstraction + (synthesis.constant @ $abstraction) + (do [! phase.monad] + [[@definition |abstraction|] (translation.definition archive $abstraction) + .let [actual_arity (list.size parameters)]] + (when |abstraction| + {.#Some [_ {.#Some [expected_arity @abstraction]}]} + (cond (n.= expected_arity actual_arity) + (exact_reification expression archive [@abstraction expected_arity parameters]) + + (n.< expected_arity actual_arity) + (arbitrary_reification expression archive [abstraction parameters]) + + ... (n.> expected_arity actual_arity) + (successive_reification expression archive [@abstraction expected_arity parameters])) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) + + _ + (arbitrary_reification expression archive [abstraction parameters]))) -(the (with_closure function_id @function inits function_definition) +(the (with_closure abstraction_id @function inits abstraction_definition) (-> artifact.ID SVar (List (Expression Any)) (Statement Any) (Operation (Expression Any))) (when inits {.#End} (do phase.monad - [_ (/////translation.execute! function_definition) - _ (/////translation.save! function_id {.#None} function_definition)] + [_ (translation.execute! abstraction_definition) + _ (translation.save! abstraction_id {.#None} abstraction_definition)] (in @function)) _ @@ -64,10 +133,10 @@ (|> (list.enumeration inits) (list#each (|>> product.left ..capture))) (all _.then - function_definition + abstraction_definition (_.return @function)))] - _ (/////translation.execute! declaration) - _ (/////translation.save! function_id {.#None} declaration)] + _ (translation.execute! declaration) + _ (translation.save! abstraction_id {.#None} declaration)] (in (_.apply inits @function))))) (the input @@ -77,24 +146,31 @@ (-> Phase! (Translator (Abstraction synthesis.Term))) (do [! phase.monad] [dependencies (cache.dependencies archive bodyS) - [[function_module function_artifact] body!] (/////translation.with_new_context archive dependencies - (/////translation.with_anchor 1 - (statement expression archive bodyS))) + [abstraction_id procedure_id body!] (<| (translation.with_new_context archive dependencies) + (translation.with_new_context archive dependencies) + (translation.with_anchor 1) + (statement expression archive) + bodyS) + .let [[abstraction_module abstraction_artifact] abstraction_id] environment (monad.each ! (expression archive) environment) .let [@curried (_.var "curried") arityO (|> arity .int _.int) @num_args (_.var "num_args") - @self (_.var (///reference.artifact [function_module function_artifact])) + @self (_.var (///reference.artifact [abstraction_module abstraction_artifact])) apply_poly (.function (_ args func) - (_.apply (list (_.splat_poly args)) func)) - initialize_self! (_.set (list (//when.register 0)) @self) + (_.apply (list (_.splat_poly args)) func))] + _ (do ! + [.let [procedure_definition (..procedure environment procedure_id arity body!)] + _ (translation.execute! procedure_definition)] + (translation.save! (unit.artifact procedure_id) {.#None} procedure_definition)) + .let [initialize_self! (_.set (list (//when.register 0)) @self) initialize! (list#mix (.function (_ post pre!) (all _.then pre! (_.set (list (..input post)) (_.item (|> post .int _.int) @curried)))) initialize_self! (list.indices arity))]] - (with_closure function_artifact @self environment + (with_closure abstraction_artifact @self environment (_.def @self (list (_.poly @curried)) (all _.then (_.set (list @num_args) (_.len/1 @curried)) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux index 87de4fd314..d18a5b2b90 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/python/runtime.lux @@ -511,4 +511,4 @@ {.#None} (|> ..full_runtime _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux index bc67555b3b..4555e3088a 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/r/runtime.lux @@ -883,4 +883,4 @@ (sequence.sequence [(%.nat ..module_id) (|> ..full_runtime _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux index 7ff7c5eead..677009088d 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/ruby/runtime.lux @@ -632,4 +632,4 @@ {.#None} (|> ..full _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux index be7b5748ff..c1bbc6dd08 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/scheme/runtime.lux @@ -389,4 +389,4 @@ (sequence.sequence [(%.nat ..module_id) (|> ..runtime _.code - (of utf8.codec injection))])]))) + (of utf8.format injection))])]))) diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux index c1cffe70f0..1d8633083c 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux @@ -349,11 +349,11 @@ ) (the !number_output - (template (_ ) + (template (_ ) [(when (|> (!clip ) (text.replaced ..digit_separator "") - (of projection)) + (of projection)) {.#Right output} {.#Right [[(let [[where::file where::line where::column] where] [where::file where::line (!n/+ (!n/- ) where::column)]) @@ -417,16 +417,16 @@ ))))) ) -(with_template [ ] +(with_template [ ] [(inlined ( source_code//size start where offset source_code) (-> Nat Nat Location Offset Text (Either [Source Text] [Source Code])) (loop (again [g!end offset]) - (<| (!with_char+ source_code//size source_code g!end g!char (!number_output source_code start g!end )) + (<| (!with_char+ source_code//size source_code g!end g!char (!number_output source_code start g!end )) (!if_digit?+ g!char (again (!++ g!end)) [] - (!number_output source_code start g!end )))))] + (!number_output source_code start g!end )))))] [nat_projection n.decimal .#Nat] [rev_projection rev.decimal .#Rev] diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux index f94cf1f87e..29377831a1 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/unit.lux @@ -25,6 +25,16 @@ [#module module.ID #artifact artifact.ID])) +(the .public module + (-> ID + module.ID) + (its #module)) + +(the .public artifact + (-> ID + artifact.ID) + (its #artifact)) + (the .public hash (Hash ID) (all product.hash diff --git a/stdlib/source/library/lux/meta/compiler/meta/io/context.lux b/stdlib/source/library/lux/meta/compiler/meta/io/context.lux index fe2967a047..bf6c0c8213 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/io/context.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/io/context.lux @@ -138,7 +138,7 @@ (Async (Try Input))) (do (try.with async.monad) [[path binary] (..find_any_source_file fs importer import contexts partial_host_extension module)] - (when (of utf8.codec projection binary) + (when (of utf8.format projection binary) {try.#Success code} (in [////.#module module ////.#file path diff --git a/stdlib/source/library/lux/meta/compiler/meta/packager/ruby.lux b/stdlib/source/library/lux/meta/compiler/meta/packager/ruby.lux index d78d94b6d2..a4f0e2f5af 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/packager/ruby.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/packager/ruby.lux @@ -65,7 +65,7 @@ [bundle (monad.mix ! (function (_ [artifact custom_name content] so_far) (|> content - (of utf8.codec projection) + (of utf8.format projection) (of ! each (|>> as_expected (is declaration) @@ -99,7 +99,7 @@ (list#mix _.then bundle) (is _.Statement) _.code - (of utf8.codec injection))] + (of utf8.format injection))] (in (list.partial [module_id [(..module_file module_id) entry_content]] sink)))))) @@ -139,7 +139,7 @@ (_.statement (_.string "")))) (is _.Statement) _.code - (of utf8.codec injection))]] + (of utf8.format injection))]] (in (|> entries (list#each product.right) {.#Item [..main_file imports]} diff --git a/stdlib/source/library/lux/meta/compiler/meta/packager/script.lux b/stdlib/source/library/lux/meta/compiler/meta/packager/script.lux index a63940c900..55abe6e9ae 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/packager/script.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/packager/script.lux @@ -51,7 +51,7 @@ (monad.mix try.monad (function (_ content so_far) (|> content - (of utf8.codec projection) + (of utf8.format projection) (of try.monad each (|>> as_expected (is declaration) @@ -78,5 +78,5 @@ (monad.mix ! (..write_module necessary_dependencies sequence) header) (of ! each (|>> scope code - (of utf8.codec injection) + (of utf8.format injection) {.#Left})))))) diff --git a/stdlib/source/library/lux/meta/compiler/target/c++.lux b/stdlib/source/library/lux/meta/compiler/target/c++.lux index 15275bd776..077daed447 100644 --- a/stdlib/source/library/lux/meta/compiler/target/c++.lux +++ b/stdlib/source/library/lux/meta/compiler/target/c++.lux @@ -4,7 +4,7 @@ (.require [library [lux (.except Code Type Global Declaration Definition Label - int as function template local global type also of is if for alias , the not) + int as function template local global type also of is if for alias , its not) [abstract [equivalence (.only Equivalence)]] [control @@ -65,12 +65,12 @@ [(`` (with_template [ *'] [(with_expansions [* (template.spliced *') (template.symbol [ "'"])] - (nominal.every ( *) - Any) - - (.every .public - (for_some (_ *) - ( ( *)))))] + (these (nominal.every ( *) + Any) + + (.every .public + (for_some (_ *) + ( ( *))))))] (,, (template.spliced +))))] @@ -563,8 +563,8 @@ Expression) (<% (%.message (%> owner) field)))] - ["." the] - ["->" the*] + ["." its] + ["->" its*] ) (the .public (item index array) diff --git a/stdlib/source/library/lux/meta/macro/template.lux b/stdlib/source/library/lux/meta/macro/template.lux index ab00918766..67a512c233 100644 --- a/stdlib/source/library/lux/meta/macro/template.lux +++ b/stdlib/source/library/lux/meta/macro/template.lux @@ -11,7 +11,7 @@ ["[0]" try (.only Try)] ["[0]" exception (.only Exception)]] [data - ["[0]" bit (.use "[1]#[0]" codec)] + ["[0]" bit (.use "[1]#[0]" format)] ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" monad)] diff --git a/stdlib/source/library/lux/meta/symbol.lux b/stdlib/source/library/lux/meta/symbol.lux index 3e64774afa..9518ab2330 100644 --- a/stdlib/source/library/lux/meta/symbol.lux +++ b/stdlib/source/library/lux/meta/symbol.lux @@ -8,7 +8,7 @@ [equivalence (.only Equivalence)] [hash (.only Hash)] [order (.only Order)] - [codec (.only Codec)]] + [format (.only Format)]] [data ["[0]" text (.use "[1]#[0]" equivalence monoid)] ["[0]" product]]]]) @@ -47,7 +47,7 @@ ".") (the .public absolute - (Codec Text Symbol) + (Format Text Symbol) (implementation (the (injection [module short]) (when module @@ -70,7 +70,7 @@ (the .public (relative expected) (-> Text - (Codec Text Symbol)) + (Format Text Symbol)) (implementation (the (injection [module short]) (when module diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux index 5e98eb1267..59888c799b 100644 --- a/stdlib/source/library/lux/meta/type.lux +++ b/stdlib/source/library/lux/meta/type.lux @@ -6,7 +6,7 @@ [lux (.except function as let variant tuple only except) [abstract [equivalence (.only Equivalence)] - [codec (.only Codec)] + [format (.only Format)] ["[0]" monad (.only Monad do)]] [control ["?" projection (.use "[1]#[0]" monad)] @@ -86,8 +86,8 @@ [flat_tuple .#Product] ) -(`` (the (injection symbol_codec type) - (-> (Codec Text Symbol) Type +(`` (the (injection symbol_format type) + (-> (Format Text Symbol) Type Text) (when type {.#Nominal name params} @@ -95,7 +95,7 @@ "(Nominal " (text.enclosed' text.double_quote name) (|> params - (list#each (|>> (injection symbol_codec) (text#composite " "))) + (list#each (|>> (injection symbol_format) (text#composite " "))) (list#mix (function.flipped text#composite) "")) ")") @@ -103,7 +103,7 @@ [{ _} (all text#composite (|> ( type) - (list#each (injection symbol_codec)) + (list#each (injection symbol_format)) list.reversed (list.interposed " ") (list#mix text#composite "")) @@ -116,11 +116,11 @@ (.let [[ins out] (flat_function type)] (all text#composite "(-> " (|> ins - (list#each (injection symbol_codec)) + (list#each (injection symbol_format)) list.reversed (list.interposed " ") (list#mix text#composite "")) - " " (injection symbol_codec out) ")")) + " " (injection symbol_format out) ")")) {.#Parameter idx} (n#injection idx) @@ -133,17 +133,17 @@ {.#Apply param fun} (.let [[type_func type_args] (flat_application type)] - (all text#composite "(" (injection symbol_codec type_func) " " (|> type_args (list#each (injection symbol_codec)) list.reversed (list.interposed " ") (list#mix text#composite "")) ")")) + (all text#composite "(" (injection symbol_format type_func) " " (|> type_args (list#each (injection symbol_format)) list.reversed (list.interposed " ") (list#mix text#composite "")) ")")) (,, (with_template [ ] [{ env body} - (all text#composite "(" " {" (|> env (list#each (injection symbol_codec)) (text.interposed " ")) "} " (injection symbol_codec body) ")")] + (all text#composite "(" " {" (|> env (list#each (injection symbol_format)) (text.interposed " ")) "} " (injection symbol_format body) ")")] [.#Universal "All"] [.#Existential "Ex"])) {.#Named name type} - (of symbol_codec injection name) + (of symbol_format injection name) ))) (the .public absolute_injection diff --git a/stdlib/source/library/lux/web/html.lux b/stdlib/source/library/lux/web/html.lux index 276da229f8..10395c29e9 100644 --- a/stdlib/source/library/lux/web/html.lux +++ b/stdlib/source/library/lux/web/html.lux @@ -250,7 +250,7 @@ (-> Attributes XML Element) (|> content - (of xml.codec injection) + (of xml.format injection) (..raw tag.svg attributes))) (every .public Coord diff --git a/stdlib/source/library/lux/world/net/http/request.lux b/stdlib/source/library/lux/world/net/http/request.lux index a6caf79b1a..bb4e95fdab 100644 --- a/stdlib/source/library/lux/world/net/http/request.lux +++ b/stdlib/source/library/lux/world/net/http/request.lux @@ -12,9 +12,9 @@ ["[0]" binary (.only Binary)] [text [encoding - ["[0]" utf8 (.use "[1]#[0]" codec)]]] + ["[0]" utf8 (.use "[1]#[0]" format)]]] [format - ["[0]" json (.only JSON) (.use "[1]#[0]" codec)]]]]] + ["[0]" json (.only JSON) (.use "[1]#[0]" format)]]]]] ["[0]" // (.only Method Body) ["[0]" version (.only Version)] ["[0]" header (.only Header)] @@ -22,7 +22,7 @@ ["[0]" mime] [uri (.only URI) ["[0]" scheme (.only Scheme)] - ["[0]" query (.only Query) (.use "[1]#[0]" codec)]]]]) + ["[0]" query (.only Query) (.use "[1]#[0]" format)]]]]) (every .public Identification (Record diff --git a/stdlib/source/library/lux/world/net/http/response.lux b/stdlib/source/library/lux/world/net/http/response.lux index 61e4e1caad..20eba5ec86 100644 --- a/stdlib/source/library/lux/world/net/http/response.lux +++ b/stdlib/source/library/lux/world/net/http/response.lux @@ -16,7 +16,7 @@ [encoding ["[0]" utf8]]] [format - ["[0]" json (.only JSON) (.use "[1]#[0]" codec)]]] + ["[0]" json (.only JSON) (.use "[1]#[0]" format)]]] [web ["[0]" html] ["[0]" css (.only CSS)]]]] @@ -41,7 +41,7 @@ (header.has header.content_length 0) (header.has header.content_type mime.utf_8)) //.#body (function (_ _) - (of ! in {try.#Success [0 (of utf8.codec injection "")]}))]])) + (of ! in {try.#Success [0 (of utf8.format injection "")]}))]])) (the .public (temporary_redirect ! to) (for_any (_ !) @@ -73,7 +73,7 @@ (for_any (_ !) (-> (Monad !) Text (Response !))) - (|>> (of utf8.codec injection) + (|>> (of utf8.format injection) (content ! status.bad_request mime.utf_8))) (the .public (ok !) @@ -88,7 +88,7 @@ (-> (Monad !) (Response !))) (|>>
-          (of utf8.codec injection)
+          (of utf8.format injection)
           (..ok ! )))]
 
   [text Text          mime.utf_8 (<|)]
diff --git a/stdlib/source/library/lux/world/net/http/server.lux b/stdlib/source/library/lux/world/net/http/server.lux
index 941282baa2..46f0a027c7 100644
--- a/stdlib/source/library/lux/world/net/http/server.lux
+++ b/stdlib/source/library/lux/world/net/http/server.lux
@@ -13,12 +13,12 @@
    [data
     ["[0]" text (.only)
      [encoding
-      ["[0]" utf8 (.use "[1]#[0]" codec)]]]
+      ["[0]" utf8 (.use "[1]#[0]" format)]]]
     [collection
      ["[0]" list (.use "[1]#[0]" functor mix)]
      ["[0]" dictionary]]
     [format
-     ["[0]" json (.only JSON) (.use "[1]#[0]" codec)
+     ["[0]" json (.only JSON) (.use "[1]#[0]" format)
       ["?[1]" \\projection]]]]
    [math
     [number
@@ -37,7 +37,7 @@
   [//
    [uri (.only URI)
     ["[0]" scheme (.use "[1]#[0]" equivalence)]
-    ["[0]" query (.use "[1]#[0]" codec)]]]])
+    ["[0]" query (.use "[1]#[0]" format)]]]])
 
 (every .public (Server !)
   (-> (Monad !) (Request !)
diff --git a/stdlib/source/library/lux/world/net/uri.lux b/stdlib/source/library/lux/world/net/uri.lux
index 6d4549675a..cc1a24d39f 100644
--- a/stdlib/source/library/lux/world/net/uri.lux
+++ b/stdlib/source/library/lux/world/net/uri.lux
@@ -11,7 +11,7 @@
   [port (.only Port)]
   [path (.only Path)]
   ["[0]" scheme (.only Scheme)]
-  ["[0]" query (.only Query) (.use "[1]#[0]" codec)]]
+  ["[0]" query (.only Query) (.use "[1]#[0]" format)]]
  ["[0]" // (.only Host)])
 
 (the .public (user_info name password)
diff --git a/stdlib/source/library/lux/world/net/uri/query.lux b/stdlib/source/library/lux/world/net/uri/query.lux
index 2f94a5530a..040a505e7f 100644
--- a/stdlib/source/library/lux/world/net/uri/query.lux
+++ b/stdlib/source/library/lux/world/net/uri/query.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [equivalence (.only Equivalence)]]
    [control
     ["?" projection]
@@ -54,7 +54,7 @@
             (do !
               [_ (?text.this "%")
                code (|> (?text.exactly 2 ?text.hexadecimal)
-                        (?.codec nat.hex)
+                        (?.format nat.hex)
                         (of ! each text.of_char))
                tail component]
               (in (%.message head code tail))))))))
@@ -102,8 +102,8 @@
   (-> Text (Try Query))
   (?text.value (..form ..empty)))
 
-(the .public codec
-  (Codec Text Query)
+(the .public format
+  (Format Text Query)
   (implementation
    (the injection ..injection)
    (the projection ..query)))
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index e6c02ecd56..05e043f97a 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -264,7 +264,7 @@
                                                       [fail jvm_error]
                                                       ))
                                                 (the (write message)
-                                                  (java/io/OutputStream::write [(of utf8.codec injection message)]
+                                                  (java/io/OutputStream::write [(of utf8.format injection message)]
                                                                                jvm_output))
                                                 (,, (with_template [ ]
                                                       [(the ( _)
diff --git a/stdlib/source/library/lux/world/time.lux b/stdlib/source/library/lux/world/time.lux
index 03d79192d8..938ec20ebe 100644
--- a/stdlib/source/library/lux/world/time.lux
+++ b/stdlib/source/library/lux/world/time.lux
@@ -8,7 +8,7 @@
     [equivalence (.only Equivalence)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [monad (.only Monad
                   do)]]
    [control
@@ -53,12 +53,12 @@
 
 (the section_projection
   (Projection Nat)
-  (<>.codec n.decimal (.exactly 2 .decimal)))
+  (<>.format n.decimal (.exactly 2 .decimal)))
 
 (the millis_projection
   (Projection Nat)
   (<>.either (|> (.at_most 3 .decimal)
-                 (<>.codec n.decimal)
+                 (<>.format n.decimal)
                  (<>.after (.this ".")))
              (of <>.monad in 0)))
 
@@ -215,8 +215,8 @@
          (..millis_injection _#milli_second)
          )))
 
-(the .public codec
-  (Codec Text Time)
+(the .public format
+  (Format Text Time)
   (implementation
    (the injection ..injection)
    (the projection (.value ..projection))))
diff --git a/stdlib/source/library/lux/world/time/date.lux b/stdlib/source/library/lux/world/time/date.lux
index 0b15c83ad1..22c26ca647 100644
--- a/stdlib/source/library/lux/world/time/date.lux
+++ b/stdlib/source/library/lux/world/time/date.lux
@@ -8,7 +8,7 @@
     [equivalence (.only Equivalence)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [monad (.only do)]]
    [control
     ["<>" projection (.only)]
@@ -59,7 +59,7 @@
    (list ["Value" (n#injection day)]
          ["Minimum" (n#injection ..minimum_day)]
          ["Maximum" (n#injection (..month_days year month))]
-         ["Year" (of //year.codec injection year)]
+         ["Year" (of //year.format injection year)]
          ["Month" (n#injection (//month.number month))])))
 
 (the separator
@@ -140,12 +140,12 @@
 
 (the section_projection
   (Projection Nat)
-  (<>.codec n.decimal (.exactly 2 .decimal)))
+  (<>.format n.decimal (.exactly 2 .decimal)))
 
 (the millis_projection
   (Projection Nat)
   (<>.either (|> (.at_most 3 .decimal)
-                 (<>.codec n.decimal)
+                 (<>.format n.decimal)
                  (<>.after (.this ".")))
              (of <>.monad in 0)))
 
@@ -184,12 +184,12 @@
   (-> Date Text)
   (let [segment (of (n.padded 2 n.decimal) injection)]
     (all text#composite
-         (of //year.codec injection (..year value))
+         (of //year.format injection (..year value))
          ..separator (segment (|> value ..month //month.number))
          ..separator (segment (..day_of_month value)))))
 
-(the .public codec
-  (Codec Text Date)
+(the .public format
+  (Format Text Date)
   (implementation
    (the injection ..injection)
    (the projection (.value ..projection))))
diff --git a/stdlib/source/library/lux/world/time/day.lux b/stdlib/source/library/lux/world/time/day.lux
index e829a5f7e8..c6f9f7e2a1 100644
--- a/stdlib/source/library/lux/world/time/day.lux
+++ b/stdlib/source/library/lux/world/time/day.lux
@@ -9,7 +9,7 @@
     [hash (.only Hash)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]]
+    [format (.only Format)]]
    [control
     ["[0]" try (.only Try)]
     ["[0]" exception (.only Exception)]]
@@ -103,8 +103,8 @@
   (exception.report
    (list ["Value" (text.injection value)])))
 
-(the .public codec
-  (Codec Text Day)
+(the .public format
+  (Format Text Day)
   (implementation
    (the (injection value)
      (when value
diff --git a/stdlib/source/library/lux/world/time/duration.lux b/stdlib/source/library/lux/world/time/duration.lux
index 3680fb9786..30d41e8b5e 100644
--- a/stdlib/source/library/lux/world/time/duration.lux
+++ b/stdlib/source/library/lux/world/time/duration.lux
@@ -8,7 +8,7 @@
     [equivalence (.only Equivalence)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [monoid (.only Monoid)]
     [monad (.only do)]]
    [control
@@ -175,7 +175,7 @@
   (let [section (is (-> Text Text (Projection Nat))
                     (function (_ suffix false_suffix)
                       (|> (.many .decimal)
-                          (<>.codec nat.decimal)
+                          (<>.format nat.decimal)
                           (<>.before (when false_suffix
                                        "" (.this suffix)
                                        _ (<>.after (<>.not (.this false_suffix))
@@ -199,8 +199,8 @@
             {.#Left _} (..inverse span)
             {.#Right _} span)))))
 
-(the .public codec
-  (Codec Text Duration)
+(the .public format
+  (Format Text Duration)
   (implementation
    (the injection ..injection)
    (the projection (.value ..projection))))
diff --git a/stdlib/source/library/lux/world/time/instant.lux b/stdlib/source/library/lux/world/time/instant.lux
index 2f1ed932fc..c0ee8a8c55 100644
--- a/stdlib/source/library/lux/world/time/instant.lux
+++ b/stdlib/source/library/lux/world/time/instant.lux
@@ -8,7 +8,7 @@
     [equivalence (.only Equivalence)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [monad (.only Monad do)]
     [hash (.only Hash)]]
    [control
@@ -172,8 +172,8 @@
   (let [[date time] (..date_time instant)
         time (..clock_time time)]
     (all text#composite
-         (of date.codec injection date) ..date_suffix
-         (of //.codec injection time) ..time_suffix)))
+         (of date.format injection date) ..date_suffix
+         (of //.format injection time) ..time_suffix)))
 
 (the .public projection
   (Projection Instant)
@@ -190,8 +190,8 @@
             (duration.composite (duration.up time duration.milli_second))
             ..absolute))))
 
-(the .public codec
-  (Codec Text Instant)
+(the .public format
+  (Format Text Instant)
   (implementation
    (the injection ..injection)
    (the projection (.value ..projection))))
diff --git a/stdlib/source/library/lux/world/time/month.lux b/stdlib/source/library/lux/world/time/month.lux
index efe4ac1d47..6cdf562d34 100644
--- a/stdlib/source/library/lux/world/time/month.lux
+++ b/stdlib/source/library/lux/world/time/month.lux
@@ -9,7 +9,7 @@
     [hash (.only Hash)]
     [order (.only Order)]
     [enum (.only Enum)]
-    [codec (.only Codec)]]
+    [format (.only Format)]]
    [control
     ["[0]" try (.only Try)]
     ["[0]" exception (.only Exception)]]
@@ -216,8 +216,8 @@
   (exception.report
    (list ["Value" (text.injection value)])))
 
-(the .public codec
-  (Codec Text Month)
+(the .public format
+  (Format Text Month)
   (implementation
    (the (injection value)
      (when value
diff --git a/stdlib/source/library/lux/world/time/year.lux b/stdlib/source/library/lux/world/time/year.lux
index 8a4d093e2e..4020e88f39 100644
--- a/stdlib/source/library/lux/world/time/year.lux
+++ b/stdlib/source/library/lux/world/time/year.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    [codec (.only Codec)]
+    [format (.only Format)]
     [equivalence (.only Equivalence)]
     [order (.only Order)]]
    [control
@@ -121,13 +121,13 @@
   (do [! <>.monad]
     [sign (<>.or (.this "-") (in []))
      digits (.many .decimal)
-     raw_year (<>.codec i.decimal (in (text#composite "+" digits)))]
+     raw_year (<>.format i.decimal (in (text#composite "+" digits)))]
     (<>.of_try (..year (when sign
                          {.#Left _}  (i.* -1 raw_year)
                          {.#Right _} raw_year)))))
 
-(the .public codec
-  (Codec Text Year)
+(the .public format
+  (Format Text Year)
   (implementation
    (the injection ..injection)
    (the projection (.value ..projection))))
diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux
index f45c9aa74c..fb3072f896 100644
--- a/stdlib/source/polytypic/lux/data/format/json.lux
+++ b/stdlib/source/polytypic/lux/data/format/json.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    ["[0]" codec]]
+    ["[0]" format]]
    [control
     ["[0]" try]]
    [data
@@ -25,35 +25,35 @@
  [\\library
   ["[0]" /]])
 
-(the .public codec
+(the .public format
   (polytypic
-    (` (codec.Codec /.JSON))
-    [poly.#sum (poly.composite (` /.sum))
-     poly.#product (poly.composite (` /.product))
-     poly.#function poly.not_applicable
-     poly.#apply {.#None}
-     poly.#recursive (function (_ code ['*self body])
-                       (do try.monad
-                         ['body (code body)]
-                         (in (` (/.recursive
-                                 (.function ((,* '*self) (,* '*self))
-                                   (, 'body)))))))
-     poly.#recursion {.#None}
-     poly.#any {.#Some (` /.any)}
-     poly.#polymorphic {.#None}
-     poly.#parameter {.#None}]
-    (list [Bit (` /.bit)]
-          [Nat (` /.nat)]
-          [Int (` /.int)]
-          [Rev (` /.rev)]
-          [Dec (` /.dec)]
-          [Text (` /.text)]
-          [duration.Duration (` /.duration)]
-          [instant.Instant (` /.instant)]
-          [date.Date (` /.date)]
-          [day.Day (` /.day)]
-          [month.Month (` /.month)]
+   (` (format.Format /.JSON))
+   [poly.#sum (poly.composite (` /.sum))
+    poly.#product (poly.composite (` /.product))
+    poly.#function poly.not_applicable
+    poly.#apply {.#None}
+    poly.#recursive (function (_ code ['*self body])
+                      (do try.monad
+                        ['body (code body)]
+                        (in (` (/.recursive
+                                (.function ((,* '*self) (,* '*self))
+                                  (, 'body)))))))
+    poly.#recursion {.#None}
+    poly.#any {.#Some (` /.any)}
+    poly.#polymorphic {.#None}
+    poly.#parameter {.#None}]
+   (list [Bit (` /.bit)]
+         [Nat (` /.nat)]
+         [Int (` /.int)]
+         [Rev (` /.rev)]
+         [Dec (` /.dec)]
+         [Text (` /.text)]
+         [duration.Duration (` /.duration)]
+         [instant.Instant (` /.instant)]
+         [date.Date (` /.date)]
+         [day.Day (` /.day)]
+         [month.Month (` /.month)]
 
-          [(type (Dictionary Text)) (` /.dictionary)]
-          [List (` /.list)]
-          )))
+         [(type (Dictionary Text)) (` /.dictionary)]
+         [List (` /.list)]
+         )))
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux
index 78f6523c45..aefaa63987 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux
@@ -41,5 +41,5 @@
 (the .public projection
   (Projection Build)
   (<| (.node ..tag)
-      (.then (<>.codec nat.decimal (.many .decimal)))
+      (.then (<>.format nat.decimal (.many .decimal)))
       .text))
diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux
index 7f8c4e2e39..0dc5193ad0 100644
--- a/stdlib/source/program/aedifex/artifact/time/date.lux
+++ b/stdlib/source/program/aedifex/artifact/time/date.lux
@@ -79,10 +79,10 @@
   (the .public projection
     (Projection Date)
     (do <>.monad
-      [year (<>.codec n.decimal (.exactly 4 .decimal))
+      [year (<>.format n.decimal (.exactly 4 .decimal))
        year (<>.of_try (year.year (.int year)))
-       month (<>.codec n.decimal (.exactly 2 .decimal))
+       month (<>.format n.decimal (.exactly 2 .decimal))
        month (<>.of_try (month.by_number month))
-       day_of_month (<>.codec n.decimal (.exactly 2 .decimal))
+       day_of_month (<>.format n.decimal (.exactly 2 .decimal))
        date (<>.of_try (date.date year month day_of_month))]
       (in (nominal.abstraction date)))))
diff --git a/stdlib/source/program/aedifex/artifact/time/time.lux b/stdlib/source/program/aedifex/artifact/time/time.lux
index 3a524a1cfe..c8e72e3439 100644
--- a/stdlib/source/program/aedifex/artifact/time/time.lux
+++ b/stdlib/source/program/aedifex/artifact/time/time.lux
@@ -33,9 +33,9 @@
 (the .public projection
   (.Projection Time)
   (do <>.monad
-    [hour (<>.codec n.decimal (.exactly 2 .decimal))
-     minute (<>.codec n.decimal (.exactly 2 .decimal))
-     second (<>.codec n.decimal (.exactly 2 .decimal))]
+    [hour (<>.format n.decimal (.exactly 2 .decimal))
+     minute (<>.format n.decimal (.exactly 2 .decimal))
+     second (<>.format n.decimal (.exactly 2 .decimal))]
     (<>.of_try (time.time
                 [time.#hour hour
                  time.#minute minute
diff --git a/stdlib/source/program/aedifex/command/deploy/release.lux b/stdlib/source/program/aedifex/command/deploy/release.lux
index 10eeae4dd4..8abcebee8b 100644
--- a/stdlib/source/program/aedifex/command/deploy/release.lux
+++ b/stdlib/source/program/aedifex/command/deploy/release.lux
@@ -143,13 +143,13 @@
     [it (..release_unsigned_artifact! local remote artifact)
      _ (|> it
            ////hash.md5
-           (of ////hash.md5_codec injection)
-           (of utf8.codec injection)
+           (of ////hash.md5_format injection)
+           (of utf8.format injection)
            (of remote upload (..md5 artifact)))
      _ (|> it
            ////hash.sha1
-           (of ////hash.sha1_codec injection)
-           (of utf8.codec injection)
+           (of ////hash.sha1_format injection)
+           (of utf8.format injection)
            (of remote upload (..sha1 artifact)))
      _ (..release_unsigned_artifact! local remote signature)]
     (in [])))
diff --git a/stdlib/source/program/aedifex/command/deploy/snapshot.lux b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
index 84b1a8ba03..3f78269f20 100644
--- a/stdlib/source/program/aedifex/command/deploy/snapshot.lux
+++ b/stdlib/source/program/aedifex/command/deploy/snapshot.lux
@@ -61,8 +61,8 @@
         remote
         [artifact ////artifact/type.lux_library]
         (let [pom_data (|> pom
-                           (of xml.codec injection)
-                           (of utf8.codec injection))]
+                           (of xml.format injection)
+                           (of utf8.format injection))]
           [////package.#origin {////repository/origin.#Remote ""}
            ////package.#library [library
                                  (////dependency/status.verified library)]
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index 1d5ceb709f..0af9789221 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -68,8 +68,8 @@
        _ (///dependency/deployment.one local
                                        [identity ///artifact/type.lux_library]
                                        (let [pom_data (|> pom
-                                                          (of xml.codec injection)
-                                                          (of utf8.codec injection))]
+                                                          (of xml.format injection)
+                                                          (of utf8.format injection))]
                                          [///package.#origin {///origin.#Local ""}
                                           ///package.#library (let [library (binary.value tar.injection package)]
                                                                 [library (///dependency/status.verified library)])
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
index 7b447a59fc..74c9525ec9 100644
--- a/stdlib/source/program/aedifex/command/pom.lux
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -32,8 +32,8 @@
   (-> (Console Async) (file.System Async) (Command Any))
   (do ///action.monad
     [content (|> (///pom.write profile)
-                 (try#each (|>> (of xml.codec injection)
-                                (of utf8.codec injection)))
+                 (try#each (|>> (of xml.format injection)
+                                (of utf8.format injection)))
                  async#in)
      _ (of fs write ///pom.file content)]
     (is (Async (Try Any))
diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux
index aec6169ed1..c7f8dbffb8 100644
--- a/stdlib/source/program/aedifex/dependency/deployment.lux
+++ b/stdlib/source/program/aedifex/dependency/deployment.lux
@@ -5,7 +5,7 @@
  [library
   [lux (.except all)
    [abstract
-    [codec (.only Codec)]
+    [format (.only Format)]
     ["[0]" monad (.only do)]]
    [control
     ["[0]" try (.only Try)]
@@ -49,12 +49,12 @@
   (let [artifact (%.message (///artifact.uri version_template artifact)
                             (///artifact/extension.extension type))
         deploy_hash (is (for_any (_ h)
-                          (-> (Codec Text (Hash h)) Extension (Hash h)
+                          (-> (Format Text (Hash h)) Extension (Hash h)
                               (Async (Try Any))))
-                        (function (_ codec extension hash)
+                        (function (_ format extension hash)
                           (|> hash
-                              (of codec injection)
-                              (of utf8.codec injection)
+                              (of format injection)
+                              (of utf8.format injection)
                               (of repository upload (%.message artifact extension)))))]
     (do [! (try.with async.monad)]
       [_ (of repository upload artifact data)]
@@ -65,15 +65,15 @@
         {///dependency/status.#Partial partial}
         (when partial
           {.#Left sha1}
-          (deploy_hash ///hash.sha1_codec ///artifact/extension.sha1 sha1)
+          (deploy_hash ///hash.sha1_format ///artifact/extension.sha1 sha1)
           
           {.#Right md5}
-          (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5))
+          (deploy_hash ///hash.md5_format ///artifact/extension.md5 md5))
         
         {///dependency/status.#Verified sha1 md5}
         (do !
-          [_ (deploy_hash ///hash.sha1_codec ///artifact/extension.sha1 sha1)]
-          (deploy_hash ///hash.md5_codec ///artifact/extension.md5 md5))))))
+          [_ (deploy_hash ///hash.sha1_format ///artifact/extension.sha1 sha1)]
+          (deploy_hash ///hash.md5_format ///artifact/extension.md5 md5))))))
 
 (the (artifacts type status)
   (-> ///artifact/type.Type Status (List ///artifact/type.Type))
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux
index 0cb369eb1e..c985ec7948 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -8,7 +8,7 @@
    ["[0]" debug]
    ["[0]" ffi (.only import)]
    [abstract
-    [codec (.only Codec)]
+    [format (.only Format)]
     [equivalence (.only Equivalence)]
     [monad (.only do)]]
    [control
@@ -77,10 +77,10 @@
   "[1]::[0]"
   (trim [] java/lang/String))
 
-(the (verified_hash library repository version_template artifact extension hash codec exception)
+(the (verified_hash library repository version_template artifact extension hash format exception)
   (for_any (_ h)
     (-> Binary (Repository Async) Version Artifact Extension
-        (-> Binary (Hash h)) (Codec Text (Hash h))
+        (-> Binary (Hash h)) (Format Text (Hash h))
         (Exception [Artifact Extension Text])
         (Async (Try (Maybe (Hash h))))))
   (do async.monad
@@ -89,12 +89,12 @@
       {try.#Success actual}
       (in (do [! try.monad]
             [output (of ! each (|>> ffi.as_string java/lang/String::trim ffi.of_string)
-                        (of utf8.codec projection actual))
+                        (of utf8.format projection actual))
              actual (|> output
                         (text.all_split_by " ")
                         list.head
                         (maybe.else output)
-                        (of codec projection))
+                        (of format projection))
              _ (exception.assertion exception [artifact extension output]
                                     (of ///hash.equivalence = (hash library) actual))]
             (in {.#Some actual})))
@@ -108,10 +108,10 @@
     [data (of repository download (///repository/remote.uri version_template artifact extension))
      ?sha1 (..verified_hash data
                             repository version_template artifact (%.message extension ///artifact/extension.sha1)
-                            ///hash.sha1 ///hash.sha1_codec ..sha1_does_not_match)
+                            ///hash.sha1 ///hash.sha1_format ..sha1_does_not_match)
      ?md5 (..verified_hash data
                            repository version_template artifact (%.message extension ///artifact/extension.md5)
-                           ///hash.md5 ///hash.md5_codec ..md5_does_not_match)]
+                           ///hash.md5 ///hash.md5_format ..md5_does_not_match)]
     (in [data (when [?sha1 ?md5]
                 [{.#Some sha1} {.#Some md5}]
                 {//status.#Verified sha1 md5}
@@ -139,8 +139,8 @@
        library_&_status (..hashed repository version_template artifact extension)]
       (of async.monad in
           (do try.monad
-            [pom (of utf8.codec projection pom_data)
-             pom (of xml.codec projection pom)
+            [pom (of utf8.format projection pom_data)
+             pom (of xml.format projection pom)
              profile (.value ///pom.projection (list pom))]
             (in [///package.#origin {///repository/origin.#Remote ""}
                  ///package.#library library_&_status
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index dc07235690..0cabc47a30 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    ["[0]" ffi (.only import)]
    [abstract
-    [codec (.only Codec)]
+    [format (.only Format)]
     [equivalence (.only Equivalence)]
     [monad (.only do)]]
    [control
@@ -154,15 +154,15 @@
                 _ (exception.except ..not_a_hash [(..encoding_size size) injection])))))
         (exception.except ..not_a_hash [(..encoding_size size) injection]))))
 
-  (with_template [   ]
-    [(the .public 
-       (Codec Text (Hash ))
+  (with_template [   ]
+    [(the .public 
+       (Format Text (Hash ))
        (implementation
         (the injection (|>> nominal.representation ..injection))
         (the projection (..projection  ))))]
 
-    [sha1_codec SHA1 ..sha1::size ..as_sha1]
-    [md5_codec MD5 ..md5::size ..as_md5]
+    [sha1_format SHA1 ..sha1::size ..as_sha1]
+    [md5_format MD5 ..md5::size ..as_md5]
     )
 
   (the .public equivalence
diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux
index 624f573dd6..2383f02bf6 100644
--- a/stdlib/source/program/aedifex/input.lux
+++ b/stdlib/source/program/aedifex/input.lux
@@ -49,7 +49,7 @@
 (the project_projection
   (-> Binary (Try Project))
   (|>> (pipe.do try.monad
-         [(of utf8.codec projection)]
+         [(of utf8.format projection)]
          [..lux_projection]
          [(list) (.value //projection.project)])))
 
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux
index 7f438fbafd..733dba6148 100644
--- a/stdlib/source/program/aedifex/metadata/artifact.lux
+++ b/stdlib/source/program/aedifex/metadata/artifact.lux
@@ -118,19 +118,19 @@
 (the date_projection
   (.Projection Date)
   (do <>.monad
-    [year (<>.codec n.decimal (.exactly 4 .decimal))
+    [year (<>.format n.decimal (.exactly 4 .decimal))
      year (<>.of_try (year.year (.int year)))
-     month (<>.codec n.decimal (.exactly 2 .decimal))
+     month (<>.format n.decimal (.exactly 2 .decimal))
      month (<>.of_try (month.by_number month))
-     day_of_month (<>.codec n.decimal (.exactly 2 .decimal))]
+     day_of_month (<>.format n.decimal (.exactly 2 .decimal))]
     (<>.of_try (date.date year month day_of_month))))
 
 (the time_projection
   (.Projection Time)
   (do <>.monad
-    [hour (<>.codec n.decimal (.exactly 2 .decimal))
-     minute (<>.codec n.decimal (.exactly 2 .decimal))
-     second (<>.codec n.decimal (.exactly 2 .decimal))]
+    [hour (<>.format n.decimal (.exactly 2 .decimal))
+     minute (<>.format n.decimal (.exactly 2 .decimal))
+     second (<>.format n.decimal (.exactly 2 .decimal))]
     (<>.of_try (time.time
                 [time.#hour hour
                  time.#minute minute
@@ -186,8 +186,8 @@
       {try.#Success binary_metadata}
       (in (|> binary_metadata
               (pipe.do try.monad
-                [(of utf8.codec projection)]
-                [(of xml.codec projection)]
+                [(of utf8.format projection)]
+                [(of xml.format projection)]
                 [list (.value ..projection)])))
       
       {try.#Failure error}
@@ -202,6 +202,6 @@
   (-> (Repository Async) Artifact Metadata (Async (Try Any)))
   (|> metadata
       ..injection
-      (of xml.codec injection)
-      (of utf8.codec injection)
+      (of xml.format injection)
+      (of utf8.format injection)
       (of repository upload (..uri artifact))))
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 9ad57ed394..cb769dc741 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -134,8 +134,8 @@
       {try.#Success project}
       (in (|> project
               (pipe.do try.monad
-                [(of utf8.codec projection)]
-                [(of xml.codec projection)]
+                [(of utf8.format projection)]
+                [(of xml.format projection)]
                 [list (.value ..projection)])))
       
       {try.#Failure error}
@@ -147,6 +147,6 @@
   (-> (Repository Async) Artifact Metadata (Async (Try Any)))
   (|> metadata
       ..injection
-      (of xml.codec injection)
-      (of utf8.codec injection)
+      (of xml.format injection)
+      (of utf8.format injection)
       (of repository upload (..uri artifact))))
diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux
index a2a24a32d4..f096abf9c8 100644
--- a/stdlib/source/program/aedifex/package.lux
+++ b/stdlib/source/program/aedifex/package.lux
@@ -56,7 +56,9 @@
    #library [library
              {//status.#Verified (//hash.sha1 library)
                                  (//hash.md5 library)}]
-   #pom (let [binary_pom (|> pom (of xml.codec injection) (of utf8.codec injection))]
+   #pom (let [binary_pom (|> pom
+                             (of xml.format injection)
+                             (of utf8.format injection))]
           [pom
            binary_pom
            {//status.#Verified (//hash.sha1 binary_pom)
diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux
index cc4ee16e26..3a97632c0b 100644
--- a/stdlib/source/program/aedifex/repository/identity.lux
+++ b/stdlib/source/program/aedifex/repository/identity.lux
@@ -42,7 +42,7 @@
 
 (the .public (basic_auth user password)
   (-> User Password Text)
-  (let [credentials (of utf8.codec injection (%.message user ":" password))]
+  (let [credentials (of utf8.format injection (%.message user ":" password))]
     (|> (java/util/Base64::getEncoder)
         (java/util/Base64$Encoder::encodeToString credentials)
         ffi.of_string
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux
index c6c4ff401b..9f32c405a9 100644
--- a/stdlib/source/program/compositor.lux
+++ b/stdlib/source/program/compositor.lux
@@ -277,7 +277,7 @@
 
                {try.#Success tar}
                (do [! (try.with !)]
-                 [tar (async#in (of tar.codec projection tar))
+                 [tar (async#in (of tar.format projection tar))
                   _ (sequence#mix (function (_ entry then)
                                     (when entry
                                       {tar.#Normal [path instant mode ownership content]}
@@ -303,7 +303,7 @@
              [cache (cache_tar context (its platform.#file_system platform))]
              (of original_fs write
                  (cache_path original_fs context)
-                 (of tar.codec injection cache))))
+                 (of tar.format injection cache))))
 
          (the (with_caching it)
            (for_any (_ )
diff --git a/stdlib/source/projection/lux/data/binary.lux b/stdlib/source/projection/lux/data/binary.lux
index a1355ef2da..83e54ef6c2 100644
--- a/stdlib/source/projection/lux/data/binary.lux
+++ b/stdlib/source/projection/lux/data/binary.lux
@@ -222,7 +222,7 @@
          (Projection Text)
          (do //.monad
            [utf8 ]
-           (//.of_try (of utf8.codec projection utf8)))))]
+           (//.of_try (of utf8.format projection utf8)))))]
 
   [08 utf8_8  ..binary_8]
   [16 utf8_16 ..binary_16]
diff --git a/stdlib/source/projection/lux/data/format/xml.lux b/stdlib/source/projection/lux/data/format/xml.lux
index 5e4398cfb9..30ff723e20 100644
--- a/stdlib/source/projection/lux/data/format/xml.lux
+++ b/stdlib/source/projection/lux/data/format/xml.lux
@@ -42,7 +42,7 @@
 (exception.the .public (unconsumed_inputs inputs)
   (Exception (List XML))
   (exception.report
-   (list ["Inputs" (exception.listing (of /.codec injection) inputs)])))
+   (list ["Inputs" (exception.listing (of /.format injection) inputs)])))
 
 (the (value' projection attrs documents)
   (for_any (_ of)
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 0b8eb9acc8..841708bd13 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -62,7 +62,7 @@
          (if (n.= expected_runs actual_runs)
            (in {try.#Failure end_signal})
            (do (try.with !)
-             [_ (of fs write dummy_file (of utf8.codec injection (%.nat actual_runs)))
+             [_ (of fs write dummy_file (of utf8.format injection (%.nat actual_runs)))
               _ (of fs modify dummy_file (|> actual_runs .int instant.of_millis))]
              (in [shell.normal []])))))]))
 
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 2fba504d0d..4374f1d76e 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -134,13 +134,13 @@
                           actual_sha1 (of remote download (///repository/remote.uri (its ///artifact.#version artifact) artifact (%.message ///artifact/extension.lux_library ///artifact/extension.sha1)))
                           actual_sha1 (of async.monad in
                                           (do try.monad
-                                            [actual_sha1 (of utf8.codec projection actual_sha1)]
-                                            (of ///hash.sha1_codec projection actual_sha1)))
+                                            [actual_sha1 (of utf8.format projection actual_sha1)]
+                                            (of ///hash.sha1_format projection actual_sha1)))
                           actual_md5 (of remote download (///repository/remote.uri (its ///artifact.#version artifact) artifact (%.message ///artifact/extension.lux_library ///artifact/extension.md5)))
                           actual_md5 (of async.monad in
                                          (do try.monad
-                                           [actual_md5 (of utf8.codec projection actual_md5)]
-                                           (of ///hash.md5_codec projection actual_md5)))
+                                           [actual_md5 (of utf8.format projection actual_md5)]
+                                           (of ///hash.md5_format projection actual_md5)))
 
                           .let [succeeded!
                                 (and (text#= //install.success locally_installed!)
@@ -151,7 +151,7 @@
                                           actual_library)
 
                                 deployed_pom!
-                                (binary#= (|> expected_pom (of xml.codec injection) (of utf8.codec injection))
+                                (binary#= (|> expected_pom (of xml.format injection) (of utf8.format injection))
                                           actual_pom)
 
                                 deployed_sha1!
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 54a9285188..cf8d787701 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -90,12 +90,12 @@
                dependee_package (|> dependee_package
                                     (has ///package.#origin {///repository/origin.#Remote ""})
                                     (has ///package.#pom [dependee_pom
-                                                          (|> dependee_pom (of xml.codec injection) (of utf8.codec injection))
+                                                          (|> dependee_pom (of xml.format injection) (of utf8.format injection))
                                                           {///dependency/status.#Unverified}]))
                depender_package (|> depender_package
                                     (has ///package.#origin {///repository/origin.#Remote ""})
                                     (has ///package.#pom [depender_pom
-                                                          (|> depender_pom (of xml.codec injection) (of utf8.codec injection))
+                                                          (|> depender_pom (of xml.format injection) (of utf8.format injection))
                                                           {///dependency/status.#Unverified}]))
 
                fs (file.mock (of file.default separator))
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 11f8ef9ed6..176958c15f 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -49,8 +49,8 @@
                 (do !
                   [verdict (do ///action.monad
                              [expected (|> (///pom.write sample)
-                                           (try#each (|>> (of xml.codec injection)
-                                                          (of utf8.codec injection)))
+                                           (try#each (|>> (of xml.format injection)
+                                                          (of utf8.format injection)))
                                            (of ! in))
                               actual (of fs read ///pom.file)
 
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index c293d631f2..a2719b5c81 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -83,14 +83,14 @@
 (the sha1
   (-> Binary Binary)
   (|>> ///hash.sha1
-       (of ///hash.sha1_codec injection)
-       (of utf8.codec injection)))
+       (of ///hash.sha1_format injection)
+       (of utf8.format injection)))
 
 (the md5
   (-> Binary Binary)
   (|>> ///hash.md5
-       (of ///hash.md5_codec injection)
-       (of utf8.codec injection)))
+       (of ///hash.md5_format injection)
+       (of utf8.format injection)))
 
 (the .public nope
   (Mock Any)
@@ -118,8 +118,8 @@
                        (|> package
                            (its ///package.#pom)
                            product.left
-                           (of xml.codec injection)
-                           (of utf8.codec injection)))]
+                           (of xml.format injection)
+                           (of utf8.format injection)))]
            (cond (text.ends_with? ///artifact/extension.lux_library uri)
                  {try.#Success [state library]}
 
@@ -172,23 +172,23 @@
              {try.#Success [state (|> expected_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection))]}
+                                      (of xml.format injection)
+                                      (of utf8.format injection))]}
 
              (text.ends_with? ..pom_sha1 uri)
              {try.#Success [state (|> dummy_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection)
+                                      (of xml.format injection)
+                                      (of utf8.format injection)
                                       ..sha1)]}
 
              (text.ends_with? ..pom_md5 uri)
              {try.#Success [state (|> expected_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection)
+                                      (of xml.format injection)
+                                      (of utf8.format injection)
                                       ..md5)]}
 
              ... else
@@ -225,23 +225,23 @@
              {try.#Success [state (|> expected_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection))]}
+                                      (of xml.format injection)
+                                      (of utf8.format injection))]}
 
              (text.ends_with? ..pom_sha1 uri)
              {try.#Success [state (|> expected_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection)
+                                      (of xml.format injection)
+                                      (of utf8.format injection)
                                       ..sha1)]}
 
              (text.ends_with? ..pom_md5 uri)
              {try.#Success [state (|> dummy_package
                                       (its ///package.#pom)
                                       product.left
-                                      (of xml.codec injection)
-                                      (of utf8.codec injection)
+                                      (of xml.format injection)
+                                      (of utf8.format injection)
                                       ..md5)]}
 
              ... else
@@ -387,17 +387,17 @@
 
            dependee_package (has ///package.#pom
                                  [dependee_pom
-                                  (|> dependee_pom (of xml.codec injection) (of utf8.codec injection))
+                                  (|> dependee_pom (of xml.format injection) (of utf8.format injection))
                                   {///dependency/status.#Unverified}]
                                  dependee_package)
            depender_package (has ///package.#pom
                                  [depender_pom
-                                  (|> depender_pom (of xml.codec injection) (of utf8.codec injection))
+                                  (|> depender_pom (of xml.format injection) (of utf8.format injection))
                                   {///dependency/status.#Unverified}]
                                  depender_package)
            ignored_package (has ///package.#pom
                                 [ignored_pom
-                                 (|> ignored_pom (of xml.codec injection) (of utf8.codec injection))
+                                 (|> ignored_pom (of xml.format injection) (of utf8.format injection))
                                  {///dependency/status.#Unverified}]
                                 ignored_package)]]
     (in [[dependee depender ignored]
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 87a4361d36..34d64acb09 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" equivalence
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]]
    [control
     ["[0]" try]
@@ -72,21 +72,21 @@
                                  [/.sha1 /.as_sha1 /.not_a_sha1]
                                  [/.md5 /.as_md5 /.not_a_md5]
                                  ))))
-               (,, (with_template [ ]
-                     [(_.for []
-                             (codecT.spec /.equivalence  (..random )))]
+               (,, (with_template [ ]
+                     [(_.for []
+                             (formatT.spec /.equivalence  (..random )))]
                      
-                     [/.sha1_codec /.sha1]
-                     [/.md5_codec /.md5]
+                     [/.sha1_format /.sha1]
+                     [/.md5_format /.md5]
                      ))
                (_.for [/.not_a_hash]
                       (all _.and
-                           (,, (with_template [ ]
+                           (,, (with_template [ ]
                                  [(do random.monad
                                     [expected (..random )]
-                                    (_.coverage []
-                                      (when (of  projection
-                                                (%.message (of  injection expected)
+                                    (_.coverage []
+                                      (when (of  projection
+                                                (%.message (of  injection expected)
                                                            "AABBCC"))
                                         {try.#Success actual}
                                         false
@@ -94,7 +94,7 @@
                                         {try.#Failure error}
                                         (exception.is? /.not_a_hash error))))]
 
-                                 [/.sha1_codec /.sha1]
-                                 [/.md5_codec /.md5]
+                                 [/.sha1_format /.sha1]
+                                 [/.md5_format /.md5]
                                  ))))
                ))))
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 55ea1ef864..1a026acbf9 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -64,7 +64,7 @@
                                             (//project.project //.default)
                                             //injection.project
                                             %.code
-                                            (of utf8.codec injection))]
+                                            (of utf8.format injection))]
                           _ (of fs write //project.file profile)
                           actual (is (Async (Try Profile))
                                      (/.read async.monad fs (list)))]
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 9518955c9b..988fc909a9 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -93,8 +93,8 @@
                             expected_md5 (//hash.md5 binary_pom)]
                         (and (same? expected_pom actual_pom)
                              (|> (do try.monad
-                                   [xml_pom (of utf8.codec projection binary_pom)
-                                    decoded_pom (of xml.codec projection xml_pom)]
+                                   [xml_pom (of utf8.format projection binary_pom)
+                                    decoded_pom (of xml.format projection xml_pom)]
                                    (in (of xml.equivalence = actual_pom decoded_pom)))
                                  (try.else false))
                              (when pom_status
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index 0ae62016dd..d1e535d65c 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -40,7 +40,7 @@
                repo (/.repository program fs)]
 
          uri (random.lower_cased 10)
-         expected (of ! each (of utf8.codec injection)
+         expected (of ! each (of utf8.format injection)
                       (random.lower_cased 10))]
         (all _.and
              (in (do async.monad
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 31a06c5370..80f344959f 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -37,7 +37,7 @@
 
 (the (url_body url)
   (-> URL (@http.Body IO))
-  (let [url (of utf8.codec injection url)]
+  (let [url (of utf8.format injection url)]
     (function (_ _)
       (io.io {try.#Success [(binary.size url) url]}))))
 
@@ -94,7 +94,7 @@
          user (random.lower_cased 10)
          password (random.lower_cased 10)
 
-         content (of ! each (of utf8.codec injection)
+         content (of ! each (of utf8.format injection)
                      (random.lower_cased 10))]
         (all _.and
              (_.coverage [/.repository /.user_agent /.Address]
@@ -104,7 +104,7 @@
                                         address)]
                  (and (|> (of repo download uri)
                           io.run!
-                          (try#each (of utf8.codec projection))
+                          (try#each (of utf8.format projection))
                           try#conjoint
                           (try#each (text#= (%.message address uri)))
                           (try.else false))
diff --git a/stdlib/source/test/lux/abstract.lux b/stdlib/source/test/lux/abstract.lux
index 60ebda4f2c..50bc57ac92 100644
--- a/stdlib/source/test/lux/abstract.lux
+++ b/stdlib/source/test/lux/abstract.lux
@@ -8,7 +8,7 @@
     ["_" property (.only Test)]]]]
  ["[0]" /
   ["[1][0]" apply]
-  ["[1][0]" codec]
+  ["[1][0]" format]
   ["[1][0]" comonad (.only)
    ["[1]/[0]" free]]
   ["[1][0]" enum]
@@ -39,7 +39,7 @@
   Test
   (all _.and
        /apply.test
-       /codec.test
+       /format.test
        /enum.test
        /equivalence.test
        /hash.test
diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/format.lux
similarity index 84%
rename from stdlib/source/test/lux/abstract/codec.lux
rename to stdlib/source/test/lux/abstract/format.lux
index 268a5226cf..00f3c162ad 100644
--- a/stdlib/source/test/lux/abstract/codec.lux
+++ b/stdlib/source/test/lux/abstract/format.lux
@@ -17,12 +17,12 @@
    [test
     ["_" property (.only Test)]]]]
  [\\library
-  ["[0]" / (.only Codec)
+  ["[0]" / (.only Format)
    [//
     [equivalence (.only Equivalence)]]]])
 
 (the json
-  (Codec JSON Bit)
+  (Format JSON Bit)
   (let [field "value"]
     (implementation
      (the injection
@@ -33,9 +33,9 @@
      (the projection
        (json.boolean_field field)))))
 
-(the codec
-  (Codec Text Bit)
-  (/.composite json.codec ..json))
+(the format
+  (Format Text Bit)
+  (/.composite json.format ..json))
 
 (the .public test
   Test
@@ -43,7 +43,7 @@
     [expected random.bit]
     (<| (_.covering /._)
         (_.coverage [/.composite]
-          (when (|> expected (of ..codec injection) (of ..codec projection))
+          (when (|> expected (of ..format injection) (of ..format projection))
             {try.#Success actual}
             (bit#= expected actual)
             
@@ -52,11 +52,11 @@
 
 (the .public (spec (open "/#[0]") (open "/#[0]") generator)
   (for_any (_ m a)
-    (-> (Equivalence a) (/.Codec m a) (Random a)
+    (-> (Equivalence a) (/.Format m a) (Random a)
         Test))
   (do random.monad
     [expected generator]
-    (_.for [/.Codec]
+    (_.for [/.Format]
            (_.coverage [/.injection /.projection]
              (when (|> expected /#injection /#projection)
                {try.#Success actual}
diff --git a/stdlib/source/test/lux/control/projection.lux b/stdlib/source/test/lux/control/projection.lux
index c9cedcac5a..5d67c79ce2 100644
--- a/stdlib/source/test/lux/control/projection.lux
+++ b/stdlib/source/test/lux/control/projection.lux
@@ -318,8 +318,8 @@
                      fails?)]
              (and happy_path!
                   sad_path!)))
-         (_.coverage [/.codec]
-           (|> (/.value (/.codec n.decimal .text)
+         (_.coverage [/.format]
+           (|> (/.value (/.format n.decimal .text)
                         (list (code.text (%.nat expected))))
                (match actual (n.= expected actual))))
          )))
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 74b47cf1da..c8fb8756d2 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -73,8 +73,8 @@
 (the (utf8_conversion_does_not_alter? value)
   (Predicate Text)
   (|> value
-      (of utf8.codec injection)
-      (of utf8.codec projection)
+      (of utf8.format injection)
+      (of utf8.format projection)
       (pipe.when
         {try.#Success converted}
         (text#= value converted)
@@ -166,7 +166,7 @@
   (`` (all _.and
            (,, (with_template [ ]
                  [(do [! random.monad]
-                    [expected (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                    [expected (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                     (_.coverage [ ]
                       (|> (\\injection.value  expected)
                           (\\projection.value )
@@ -349,14 +349,14 @@
                      (\\projection.value \\projection.any)
                      (!expect {try.#Success _})))
                (do [! random.monad]
-                 [data (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                 [data (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                  (_.coverage [\\projection.binary_was_not_fully_read]
                    (|> data
                        (\\projection.value \\projection.any)
                        (!expect (^.multi {try.#Failure error}
                                          (exception.is? \\projection.binary_was_not_fully_read error))))))
                (do [! random.monad]
-                 [expected (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                 [expected (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                  (_.coverage [\\projection.segment \\injection.segment \\injection.value]
                    (|> expected
                        (\\injection.value (\\injection.segment ..segment_size))
@@ -364,7 +364,7 @@
                        (!expect (^.multi {try.#Success actual}
                                          (of /.equivalence = expected actual))))))
                (do [! random.monad]
-                 [data (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                 [data (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                  (_.coverage [\\projection.end?]
                    (|> data
                        (\\projection.value (do <>.monad
@@ -376,7 +376,7 @@
                        (!expect {try.#Success .true}))))
                (do [! random.monad]
                  [to_read (of ! each (n.% (++ ..segment_size)) random.nat)
-                  data (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                  data (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                  (_.coverage [\\projection.Offset \\projection.offset]
                    (|> data
                        (\\projection.value (do <>.monad
@@ -391,7 +391,7 @@
                        (!expect {try.#Success .true}))))
                (do [! random.monad]
                  [to_read (of ! each (n.% (++ ..segment_size)) random.nat)
-                  data (of ! each (of utf8.codec injection) (random.ascii ..segment_size))]
+                  data (of ! each (of utf8.format injection) (random.ascii ..segment_size))]
                  (_.coverage [\\projection.remaining]
                    (|> data
                        (\\projection.value (do <>.monad
diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux
index 1bf07d1d89..d924e2d705 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -10,7 +10,7 @@
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" monoid
      ["[1]T" \\test]]]
@@ -37,8 +37,8 @@
                     (monoidT.spec /.equivalence /.disjunction random.bit))
              (_.for [/.conjunction]
                     (monoidT.spec /.equivalence /.conjunction random.bit))
-             (_.for [/.codec]
-                    (codecT.spec /.equivalence /.codec random.bit))
+             (_.for [/.format]
+                    (formatT.spec /.equivalence /.format random.bit))
              
              (_.coverage [/.no /.yes]
                (and (of /.equivalence = false /.no)
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index b6624d9c38..de3a9ca001 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -6,12 +6,12 @@
   [lux (.except Variant Record
                 #Bit #Text #Dec)
    [abstract
-    [codec (.except)]
+    [format (.except)]
     [monad (.only do)]
     ["[0]" equivalence (.only Equivalence)
      ["[0]/[1]" \\polytypic]
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]]
    [control
     ["<>" projection]
@@ -231,16 +231,16 @@
               (Equivalence Record)
               (\\polytypic/equivalence.equivalence Record))
 
-            (the codec
-              (Codec JSON Record)
-              (\\polytypic.codec Record))))
+            (the format
+              (Format JSON Record)
+              (\\polytypic.format Record))))
 
 (the \\polytypic
   Test
   (<| (_.covering \\polytypic._)
-      (_.for [\\polytypic.codec]
+      (_.for [\\polytypic.format]
              (for .old (_.test "PLACEHOLDER" true)
-                  (codecT.spec ..equivalence ..codec ..gen_record)))))
+                  (formatT.spec ..equivalence ..format ..gen_record)))))
 
 (the .public random
   (Random /.JSON)
@@ -320,92 +320,92 @@
                       (equivalenceT.spec /.equivalence ..random))
                (_.for [/.any]
                       (all _.and
-                           (codecT.spec any.equivalence /.any (random#in []))
-                           (codecT.spec any.equivalence (\\polytypic.codec Any) (random#in []))
+                           (formatT.spec any.equivalence /.any (random#in []))
+                           (formatT.spec any.equivalence (\\polytypic.format Any) (random#in []))
                            ))
                (_.for [/.bit]
                       (all _.and
-                           (codecT.spec bit.equivalence /.bit random.bit)
-                           (codecT.spec bit.equivalence (\\polytypic.codec Bit) random.bit)
+                           (formatT.spec bit.equivalence /.bit random.bit)
+                           (formatT.spec bit.equivalence (\\polytypic.format Bit) random.bit)
                            ))
                (_.for [/.nat]
                       (all _.and
-                           (codecT.spec nat.equivalence /.nat random.nat)
-                           (codecT.spec nat.equivalence (\\polytypic.codec Nat) random.nat)
+                           (formatT.spec nat.equivalence /.nat random.nat)
+                           (formatT.spec nat.equivalence (\\polytypic.format Nat) random.nat)
                            ))
                (_.for [/.int]
                       (all _.and
-                           (codecT.spec int.equivalence /.int random.int)
-                           (codecT.spec int.equivalence (\\polytypic.codec Int) random.int)
+                           (formatT.spec int.equivalence /.int random.int)
+                           (formatT.spec int.equivalence (\\polytypic.format Int) random.int)
                            ))
                (_.for [/.rev]
                       (all _.and
-                           (codecT.spec rev.equivalence /.rev random.rev)
-                           (codecT.spec rev.equivalence (\\polytypic.codec Rev) random.rev)
+                           (formatT.spec rev.equivalence /.rev random.rev)
+                           (formatT.spec rev.equivalence (\\polytypic.format Rev) random.rev)
                            ))
                (_.for [/.dec]
                       (all _.and
-                           (codecT.spec dec.equivalence /.dec random.dec)
-                           (codecT.spec dec.equivalence (\\polytypic.codec Dec) random.safe_dec)
+                           (formatT.spec dec.equivalence /.dec random.dec)
+                           (formatT.spec dec.equivalence (\\polytypic.format Dec) random.safe_dec)
                            ))
                (_.for [/.text]
                       (all _.and
-                           (codecT.spec text.equivalence /.text (random.unicode 2))
-                           (codecT.spec text.equivalence (\\polytypic.codec Text) (random.unicode 2))
+                           (formatT.spec text.equivalence /.text (random.unicode 2))
+                           (formatT.spec text.equivalence (\\polytypic.format Text) (random.unicode 2))
                            ))
                (_.for [/.instant]
                       (all _.and
-                           (codecT.spec instant.equivalence /.instant random.instant)
-                           (codecT.spec instant.equivalence (\\polytypic.codec instant.Instant) random.instant)
+                           (formatT.spec instant.equivalence /.instant random.instant)
+                           (formatT.spec instant.equivalence (\\polytypic.format instant.Instant) random.instant)
                            ))
                (_.for [/.duration]
                       (all _.and
-                           (codecT.spec duration.equivalence /.duration random.duration)
-                           (codecT.spec duration.equivalence (\\polytypic.codec duration.Duration) random.duration)
+                           (formatT.spec duration.equivalence /.duration random.duration)
+                           (formatT.spec duration.equivalence (\\polytypic.format duration.Duration) random.duration)
                            ))
                (_.for [/.date]
                       (all _.and
-                           (codecT.spec date.equivalence /.date random.date)
-                           (codecT.spec date.equivalence (\\polytypic.codec date.Date) random.date)
+                           (formatT.spec date.equivalence /.date random.date)
+                           (formatT.spec date.equivalence (\\polytypic.format date.Date) random.date)
                            ))
                (_.for [/.list]
                       (let [equivalence (list.equivalence nat.equivalence)
                             random (random.list 2 random.nat)]
                         (all _.and
-                             (codecT.spec equivalence (/.list /.nat) random)
-                             (codecT.spec equivalence (\\polytypic.codec (type (List Nat))) random)
+                             (formatT.spec equivalence (/.list /.nat) random)
+                             (formatT.spec equivalence (\\polytypic.format (type (List Nat))) random)
                              )))
                (_.for [/.dictionary]
                       (let [equivalence (dictionary.equivalence nat.equivalence)
                             random (random.dictionary text.hash 2 (random.unicode 2) random.nat)]
                         (all _.and
-                             (codecT.spec equivalence (/.dictionary /.nat) random)
-                             (codecT.spec equivalence (\\polytypic.codec (type (Dictionary Text Nat))) random)
+                             (formatT.spec equivalence (/.dictionary /.nat) random)
+                             (formatT.spec equivalence (\\polytypic.format (type (Dictionary Text Nat))) random)
                              )))
                (_.for [/.sum]
                       (let [equivalence (all equivalence.sum bit.equivalence text.equivalence dec.equivalence)
                             random (all random.or random.bit (random.unicode 2) random.safe_dec)]
                         (all _.and
-                             (codecT.spec equivalence (all /.sum /.bit /.text /.dec) random)
-                             (codecT.spec equivalence (\\polytypic.codec Variant) random)
+                             (formatT.spec equivalence (all /.sum /.bit /.text /.dec) random)
+                             (formatT.spec equivalence (\\polytypic.format Variant) random)
                              )))
                ... (_.for [/.product]
                ...        (let [equivalence (all equivalence.product bit.equivalence text.equivalence dec.equivalence)
                ...              random (all random.or random.bit (random.unicode 2) random.safe_dec)]
                ...          (all _.and
-               ...               (codecT.spec equivalence (all /.product /.bit /.text /.dec) random)
-               ...               (codecT.spec equivalence (\\polytypic.codec (type [Bit Text Dec])) random)
+               ...               (formatT.spec equivalence (all /.product /.bit /.text /.dec) random)
+               ...               (formatT.spec equivalence (\\polytypic.format (type [Bit Text Dec])) random)
                ...               )))
-               (_.for [/.codec]
+               (_.for [/.format]
                       (all _.and
-                           (codecT.spec /.equivalence /.codec ..random)
+                           (formatT.spec /.equivalence /.format ..random)
                            (do random.monad
                              [key (random.alphabetic 1)
                               [expected escaped] any_string]
                              (_.coverage [/.#String]
                                (|> {/.#String escaped}
-                                   (of /.codec injection)
-                                   (of /.codec projection)
+                                   (of /.format injection)
+                                   (of /.format projection)
                                    (try#each (of /.equivalence = {/.#String expected}))
                                    (try.else false))))
                            ))
@@ -423,7 +423,7 @@
                  (_.coverage [/.injection]
                    (|> expected
                        /.injection
-                       (of /.codec projection)
+                       (of /.format projection)
                        (try#each (/#= expected))
                        (try.else false))))
                (do random.monad
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 8a1ee9ddc2..d0c6304767 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -168,7 +168,7 @@
      .let [content (|> chunk
                        (list.repeated chunks)
                        text.together
-                       (of utf8.codec injection))]]
+                       (of utf8.format injection))]]
     (`` (all _.and
              (,, (with_template [ ]
                    [(_.coverage []
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index f338d03510..1f57a47fc9 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" equivalence
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]]
    [control
     ["<>" projection (.use "[1]#[0]" monad)]
@@ -236,8 +236,8 @@
       (all _.and
            (_.for [/.equivalence]
                   (equivalenceT.spec /.equivalence ..random))
-           (_.for [/.codec]
-                  (codecT.spec /.equivalence /.codec ..random))
+           (_.for [/.format]
+                  (formatT.spec /.equivalence /.format ..random))
 
            (do [! random.monad]
              [(^.let symbol [namespace name]) ..symbol]
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 0669ef70af..ade6eb1da5 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -109,31 +109,31 @@
        (random#in [\\injection.dec random.dec])
        ))
 
-(the codec
+(the format
   Test
   (`` (all _.and
-           (,, (with_template [  ]
+           (,, (with_template [  ]
                  [(do random.monad
                     [sample ]
                     (_.coverage []
-                      (/#= (of  injection sample)
+                      (/#= (of  injection sample)
                            ( sample))))]
 
-                 [\\injection.bit bit.codec random.bit]
+                 [\\injection.bit bit.format random.bit]
                  [\\injection.nat nat.decimal random.nat]
                  [\\injection.int int.decimal random.int]
                  [\\injection.rev rev.decimal random.rev]
                  [\\injection.dec dec.decimal random.dec]
-                 [\\injection.frac frac.codec random.frac]
+                 [\\injection.frac frac.format random.frac]
                  [\\injection.symbol symbol.absolute ($//symbol.random 5 5)]
-                 [\\injection.xml xml.codec $//xml.random]
-                 [\\injection.json json.codec $//json.random]
-                 [\\injection.day day.codec random.day]
-                 [\\injection.month month.codec random.month]
-                 [\\injection.instant instant.codec random.instant]
-                 [\\injection.duration duration.codec random.duration]
-                 [\\injection.date date.codec random.date]
-                 [\\injection.time time.codec random.time]
+                 [\\injection.xml xml.format $//xml.random]
+                 [\\injection.json json.format $//json.random]
+                 [\\injection.day day.format random.day]
+                 [\\injection.month month.format random.month]
+                 [\\injection.instant instant.format random.instant]
+                 [\\injection.duration duration.format random.duration]
+                 [\\injection.date date.format random.date]
+                 [\\injection.time time.format random.time]
                  
                  [\\injection.int_2 int.binary random.int]
                  [\\injection.int_8 int.octal random.int]
@@ -150,7 +150,7 @@
                  [\\injection.dec_10 dec.decimal random.dec]
                  [\\injection.dec_16 dec.hex random.dec]
                  ))
-           (,, (with_template [  ]
+           (,, (with_template [  ]
                  [(do [! random.monad]
                     [sample 
                      .let [limit (|> (of nat.interval top)
@@ -159,7 +159,7 @@
                                      ++)]
                      expected_size (of ! each (nat.% limit) random.nat)]
                     (_.coverage [ \\injection.padded]
-                      (/#= (of (nat.padded expected_size ) injection sample)
+                      (/#= (of (nat.padded expected_size ) injection sample)
                            (\\injection.padded expected_size  sample))))]
 
                  [\\injection.nat_2 nat.binary random.nat]
@@ -205,7 +205,7 @@
                  (_.coverage [\\injection.message]
                    (/#= (\\injection.message left mid right)
                         (.text_composite# left mid right))))
-               ..codec
+               ..format
                (,, (with_template [  ]
                      [(do random.monad
                         [sample ]
@@ -248,7 +248,7 @@
                   sample (of ! each (modular.modular modulus)
                              random.int)]
                  (_.coverage [\\injection.mod]
-                   (/#= (of (modular.codec modulus) injection sample)
+                   (/#= (of (modular.format modulus) injection sample)
                         (\\injection.mod sample))))
                ))))
 
diff --git a/stdlib/source/test/lux/data/text/encoding/utf8.lux b/stdlib/source/test/lux/data/text/encoding/utf8.lux
index 039532b81f..249ea17196 100644
--- a/stdlib/source/test/lux/data/text/encoding/utf8.lux
+++ b/stdlib/source/test/lux/data/text/encoding/utf8.lux
@@ -5,7 +5,7 @@
  [library
   [lux (.except)
    [abstract
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]]
    [data
     ["[0]" text]]
@@ -19,5 +19,5 @@
 (the .public test
   Test
   (<| (_.covering /._)
-      (_.for [/.codec]
-             (codecT.spec text.equivalence /.codec (random.unicode 5)))))
+      (_.for [/.format]
+             (formatT.spec text.equivalence /.format (random.unicode 5)))))
diff --git a/stdlib/source/test/lux/math/arithmetic/modular.lux b/stdlib/source/test/lux/math/arithmetic/modular.lux
index c96daaba5a..a8cf32ebb8 100644
--- a/stdlib/source/test/lux/math/arithmetic/modular.lux
+++ b/stdlib/source/test/lux/math/arithmetic/modular.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -70,13 +70,13 @@
                        [/.+ /.addition]
                        [/.* /.multiplication]
                        ))
-                 (_.for [/.codec]
-                        (codecT.spec /.equivalence (/.codec subject::%) (..random subject::%)))
+                 (_.for [/.format]
+                        (formatT.spec /.equivalence (/.format subject::%) (..random subject::%)))
 
                  (_.coverage [/.incorrect_modulus]
                    (when (|> param
-                             (of (/.codec param::%) injection)
-                             (of (/.codec subject::%) projection))
+                             (of (/.format param::%) injection)
+                             (of (/.format subject::%) projection))
                      {try.#Failure error}
                      (exception.is? /.incorrect_modulus error)
                      
diff --git a/stdlib/source/test/lux/math/number.lux b/stdlib/source/test/lux/math/number.lux
index f89c379378..135590e243 100644
--- a/stdlib/source/test/lux/math/number.lux
+++ b/stdlib/source/test/lux/math/number.lux
@@ -61,23 +61,23 @@
                (,, (with_template [ ]
                      [(_.coverage [ ]
                         (`` (and (,, (with_template [<=> ]
-                                       [(with_expansions [ (template.symbol [<=>] [])]
-                                          (and (with_expansions [ (static.literal (|>> (of  injection)
+                                       [(with_expansions [ (template.symbol [<=>] [])]
+                                          (and (with_expansions [ (static.literal (|>> (of  injection)
                                                                                            code.text)
                                                                                       )]
-                                                 (when (of  projection )
+                                                 (when (of  projection )
                                                    {try.#Success actual}
                                                    (and (<=> ( ) actual)
                                                         (<=> ( ) ))
 
                                                    {try.#Failure error}
                                                    false))
-                                               (with_expansions [ (static.literal (|>> (of  injection)
+                                               (with_expansions [ (static.literal (|>> (of  injection)
                                                                                            ..with_commas
                                                                                            (text.suffix ",")
                                                                                            code.text)
                                                                                       )]
-                                                 (when (of  projection (..without_commas ))
+                                                 (when (of  projection (..without_commas ))
                                                    {try.#Success actual}
                                                    (and (<=> ( ) actual)
                                                         (<=> ( ) ))
@@ -106,22 +106,22 @@
                (_.coverage [/.base_16]
                  (same? /.hex /.base_16))
                (_.coverage [/.dec /.decimal]
-                 (and (,, (with_template []
-                            [(and (with_expansions [ (static.literal (|>> (of  injection)
+                 (and (,, (with_template []
+                            [(and (with_expansions [ (static.literal (|>> (of  injection)
                                                                               code.text)
                                                                          )]
-                                    (when (of  projection )
+                                    (when (of  projection )
                                       {try.#Success actual}
                                       (and (d.approximately? +0.0000000000001 (/.dec ) actual)
                                            (d.approximately? +0.0000000000001 (/.dec ) ))
 
                                       {try.#Failure error}
                                       false))
-                                  (with_expansions [ (static.literal (|>> (of  injection)
+                                  (with_expansions [ (static.literal (|>> (of  injection)
                                                                               ..with_commas
                                                                               code.text)
                                                                          )]
-                                    (when (of  projection (..without_commas ))
+                                    (when (of  projection (..without_commas ))
                                       {try.#Success actual}
                                       (and (d.approximately? +0.0000000000001 (/.dec ) actual)
                                            (d.approximately? +0.0000000000001 (/.dec ) ))
diff --git a/stdlib/source/test/lux/math/number/dec.lux b/stdlib/source/test/lux/math/number/dec.lux
index f7d750431c..d429bb0e17 100644
--- a/stdlib/source/test/lux/math/number/dec.lux
+++ b/stdlib/source/test/lux/math/number/dec.lux
@@ -9,7 +9,7 @@
     [monad (.only do)]
     ["[0]" hash
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -122,15 +122,15 @@
                  [/.min /.minimum]
                  [/.max /.maximum]
                  ))
-           (,, (with_template []
-                 [(_.for []
-                         (codecT.spec /.equivalence  random.safe_dec))]
+           (,, (with_template []
+                 [(_.for []
+                         (formatT.spec /.equivalence  random.safe_dec))]
 
                  [/.binary] [/.octal] [/.decimal] [/.hex]
                  ))
-           (,, (with_template []
-                 [(_.for []
-                         (codecT.spec (/.approximately? +0.0000000000001)  random.safe_dec))]
+           (,, (with_template []
+                 [(_.for []
+                         (formatT.spec (/.approximately? +0.0000000000001)  random.safe_dec))]
 
                  [/.degree] [/.percentage] [/.permille] [/.permyriad]
                  ))
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 42c45a20da..291f4aac1b 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -74,8 +74,8 @@
                      [/.+ /.addition]
                      [/.* /.multiplication]
                      ))
-               (_.for [/.codec]
-                      (codecT.spec /.equivalence /.codec ..random))
+               (_.for [/.format]
+                      (formatT.spec /.equivalence /.format ..random))
                (_.for [/.arithmetic]
                       (arithmeticT.spec /.equivalence /.arithmetic ..random))
 
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index e097eb470c..e425cb4501 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -12,7 +12,7 @@
      ["[1]T" \\test]]
     ["[0]" interval
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -58,9 +58,9 @@
                  [/.minimum]
                  [/.maximum]
                  ))
-           (,, (with_template []
-                 [(_.for []
-                         (codecT.spec /.equivalence  random.int))]
+           (,, (with_template []
+                 [(_.for []
+                         (formatT.spec /.equivalence  random.int))]
 
                  [/.binary] [/.octal] [/.decimal] [/.hex]
                  ))
diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index 4bcb1a543e..a42a94e800 100644
--- a/stdlib/source/test/lux/math/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -12,7 +12,7 @@
      ["[1]T" \\test]]
     ["[0]" interval
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -57,17 +57,17 @@
                  [/.min /.minimum]
                  [/.max /.maximum]
                  ))
-           (,, (with_template []
+           (,, (with_template []
                  [(do [! random.monad]
                     [.let [limit (|> (of /.interval top)
-                                     (of  injection)
+                                     (of  injection)
                                      text.size
                                      ++)]
                      expected_size (of ! each (/.% limit) random.nat)]
-                    (_.for [ /.padded]
+                    (_.for [ /.padded]
                            (all _.and
-                                (codecT.spec /.equivalence  random.nat)
-                                (codecT.spec /.equivalence (/.padded expected_size ) random.nat)
+                                (formatT.spec /.equivalence  random.nat)
+                                (formatT.spec /.equivalence (/.padded expected_size ) random.nat)
                                 )))]
 
                  [/.binary] [/.octal] [/.decimal] [/.hex]
diff --git a/stdlib/source/test/lux/math/number/rat.lux b/stdlib/source/test/lux/math/number/rat.lux
index c69f12ab59..e9d1bb1def 100644
--- a/stdlib/source/test/lux/math/number/rat.lux
+++ b/stdlib/source/test/lux/math/number/rat.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -71,8 +71,8 @@
                      [/.+ /.addition]
                      [/.* /.multiplication]
                      ))
-               (_.for [/.codec]
-                      (codecT.spec /.equivalence /.codec ..random))
+               (_.for [/.format]
+                      (formatT.spec /.equivalence /.format ..random))
                (_.for [/.arithmetic]
                       (arithmeticT.spec /.equivalence /.arithmetic ..random))
 
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index d6f22838ce..25be6a00d2 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -12,7 +12,7 @@
      ["[1]T" \\test]]
     ["[0]" interval
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -55,9 +55,9 @@
                  [/.min /.minimum]
                  [/.max /.maximum]
                  ))
-           (,, (with_template []
-                 [(_.for []
-                         (codecT.spec /.equivalence  random.rev))]
+           (,, (with_template []
+                 [(_.for []
+                         (formatT.spec /.equivalence  random.rev))]
 
                  [/.binary] [/.octal] [/.decimal] [/.hex]
                  ))
diff --git a/stdlib/source/test/lux/meta/compiler/meta/export.lux b/stdlib/source/test/lux/meta/compiler/meta/export.lux
index 0a3da067ef..b78b03de5c 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/export.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/export.lux
@@ -58,7 +58,7 @@
          .let [file/1 (%.message source/1 / file/1')]
          
          .let [random_content (is (Random Binary)
-                                  (of ! each (|>> %.nat (of utf8.codec injection)) random.nat))]
+                                  (of ! each (|>> %.nat (of utf8.format injection)) random.nat))]
          content/0 random_content
          content/1 random_content]
         (all _.and
diff --git a/stdlib/source/test/lux/meta/compiler/meta/import.lux b/stdlib/source/test/lux/meta/compiler/meta/import.lux
index 0d262bf922..b138c9a422 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/import.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/import.lux
@@ -60,7 +60,7 @@
          file/1 (of ! each (|>> (%.message dir/0 /)) random_file)
          
          .let [random_content (is (Random Binary)
-                                  (of ! each (|>> %.nat (of utf8.codec injection)) random.nat))]
+                                  (of ! each (|>> %.nat (of utf8.format injection)) random.nat))]
          now random.instant
          content/0 random_content
          content/1 random_content
diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux
index aadc58e344..6f73f73d99 100644
--- a/stdlib/source/test/lux/meta/symbol.lux
+++ b/stdlib/source/test/lux/meta/symbol.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" hash
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -83,9 +83,9 @@
                     (_.for [/.order]
                            (orderT.spec /.order (..random sizeM1 sizeS1)))
                     (_.for [/.absolute]
-                           (codecT.spec /.equivalence /.absolute (..relative module1 sizeS1)))
+                           (formatT.spec /.equivalence /.absolute (..relative module1 sizeS1)))
                     (_.for [/.relative]
-                           (codecT.spec /.equivalence (/.relative module1) (..relative module1 sizeS1)))
+                           (formatT.spec /.equivalence (/.relative module1) (..relative module1 sizeS1)))
 
                     (_.coverage [/.separator]
                       (let [it (of /.absolute injection symbol1)]
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index bfeb3f1c19..1fe7db0e21 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -21,7 +21,7 @@
      ["$[1]" \\test]]
     ["[0]" text (.use "[1]#[0]" equivalence)
      [encoding
-      ["[0]" utf8 (.use "[1]#[0]" codec)]]]
+      ["[0]" utf8 (.use "[1]#[0]" format)]]]
     [collection
      ["[0]" dictionary (.only Dictionary)]
      ["[0]" list]]]
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 6c834ddc97..6f48082cd8 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -5,7 +5,8 @@
  [library
   [lux (.except)
    [abstract
-    [monad (.only Monad do)]]
+    [monad (.only Monad
+                  do)]]
    [control
     ["[0]" pipe]
     ["[0]" io (.only IO)]
@@ -49,7 +50,7 @@
           (function.on {.#None})
           (of ! each (|>> (pipe.do try.monad
                             []
-                            [product.right (of utf8.codec projection)]
+                            [product.right (of utf8.format projection)]
                             [(of nat.decimal projection)]
                             [(nat.= expected) in])
                           (try.else false))))
@@ -88,7 +89,7 @@
                                                 {//.#Trace} on_trace)
                                         data (|> value
                                                  (of nat.decimal injection)
-                                                 (of utf8.codec injection))]
+                                                 (of utf8.format injection))]
                                     {try.#Success [//status.ok
                                                    [//.#headers headers
                                                     //.#body (function (_ ?wanted_bytes)
diff --git a/stdlib/source/test/lux/world/net/http/request.lux b/stdlib/source/test/lux/world/net/http/request.lux
index 261396f4a3..93c7b3ab94 100644
--- a/stdlib/source/test/lux/world/net/http/request.lux
+++ b/stdlib/source/test/lux/world/net/http/request.lux
@@ -14,9 +14,9 @@
     ["[0]" binary (.use "[1]#[0]" equivalence)]
     [text
      [encoding
-      ["[0]" utf8 (.use "[1]#[0]" codec)]]]
+      ["[0]" utf8 (.use "[1]#[0]" format)]]]
     [format
-     ["[0]" json (.use "[1]#[0]" codec)
+     ["[0]" json (.use "[1]#[0]" format)
       ["[1]T" \\test]]]]
    [math
     ["[0]" random (.only Random)]
@@ -32,7 +32,7 @@
      ["[0]" mime (.use "[1]#[0]" equivalence)]
      [uri
       ["[0]" scheme (.use "[1]#[0]" equivalence)]
-      ["[0]" query (.use "[1]#[0]" codec)
+      ["[0]" query (.use "[1]#[0]" format)
        ["[1]T" \\test]]]]]]])
 
 (the .public test
diff --git a/stdlib/source/test/lux/world/net/http/response.lux b/stdlib/source/test/lux/world/net/http/response.lux
index 8e069d3001..6c3813ffe5 100644
--- a/stdlib/source/test/lux/world/net/http/response.lux
+++ b/stdlib/source/test/lux/world/net/http/response.lux
@@ -18,9 +18,9 @@
       ["[1]T" \\test]]]
     ["[0]" text (.use "[1]#[0]" equivalence)
      [encoding
-      ["[0]" utf8 (.use "[1]#[0]" codec)]]]
+      ["[0]" utf8 (.use "[1]#[0]" format)]]]
     [format
-     ["[0]" json (.use "[1]#[0]" codec)
+     ["[0]" json (.use "[1]#[0]" format)
       ["[1]T" \\test]]]]
    [math
     ["[0]" random (.only Random)]
diff --git a/stdlib/source/test/lux/world/net/http/server.lux b/stdlib/source/test/lux/world/net/http/server.lux
index 3dec84d99d..eb0a98b64a 100644
--- a/stdlib/source/test/lux/world/net/http/server.lux
+++ b/stdlib/source/test/lux/world/net/http/server.lux
@@ -15,13 +15,13 @@
     ["[0]" text (.use "[1]#[0]" equivalence)
      ["%" \\injection]
      [encoding
-      ["[0]" utf8 (.use "[1]#[0]" codec)]]]
+      ["[0]" utf8 (.use "[1]#[0]" format)]]]
     ["[0]" binary (.only Binary) (.use "[1]#[0]" equivalence)
      ["[1]T" \\test]]
     [collection
      ["[0]" dictionary]]
     [format
-     ["[0]" json (.use "[1]#[0]" equivalence codec)
+     ["[0]" json (.use "[1]#[0]" equivalence format)
       ["?[1]" \\projection]
       ["[1]T" \\test]]]]
    [math
diff --git a/stdlib/source/test/lux/world/net/uri.lux b/stdlib/source/test/lux/world/net/uri.lux
index e486dc54ae..89af84f5cc 100644
--- a/stdlib/source/test/lux/world/net/uri.lux
+++ b/stdlib/source/test/lux/world/net/uri.lux
@@ -16,7 +16,7 @@
  [\\library
   ["[0]" / (.only)
    ["[0]" scheme]
-   ["[0]" query (.use "[1]#[0]" codec)]]]
+   ["[0]" query (.use "[1]#[0]" format)]]]
  ["[0]" /
   ["[1][0]" encoding]
   ["[1][0]" scheme]
diff --git a/stdlib/source/test/lux/world/net/uri/query.lux b/stdlib/source/test/lux/world/net/uri/query.lux
index 24756074c5..7b45cbd482 100644
--- a/stdlib/source/test/lux/world/net/uri/query.lux
+++ b/stdlib/source/test/lux/world/net/uri/query.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" equivalence
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]]
    [data
     [collection
@@ -39,8 +39,8 @@
       (all _.and
            (_.for [/.equivalence]
                   (equivalenceT.spec /.equivalence (..random 2)))
-           (_.for [/.codec]
-                  (codecT.spec /.equivalence /.codec (..random 3)))
+           (_.for [/.format]
+                  (formatT.spec /.equivalence /.format (..random 3)))
 
            (_.coverage [/.empty]
              (dictionary.empty? /.empty))
diff --git a/stdlib/source/test/lux/world/time.lux b/stdlib/source/test/lux/world/time.lux
index bfc3deb0c5..843fbc0814 100644
--- a/stdlib/source/test/lux/world/time.lux
+++ b/stdlib/source/test/lux/world/time.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -50,8 +50,8 @@
               (orderT.spec /.order random.time))
        (_.for [/.enum]
               (enumT.spec /.enum random.time))
-       (_.for [/.codec]
-              (codecT.spec /.equivalence /.codec random.time))))
+       (_.for [/.format]
+              (formatT.spec /.equivalence /.format random.time))))
 
 (the for_clock
   Test
@@ -96,7 +96,7 @@
                                 %.nat
                                 (text.prefix )
                                 (text.suffix )
-                                (of /.codec projection)
+                                (of /.format projection)
                                 (pipe.when
                                   {try.#Success _} true
                                   {try.#Failure error} false))
@@ -106,7 +106,7 @@
                                 %.nat
                                 (text.prefix )
                                 (text.suffix )
-                                (of /.codec projection)
+                                (of /.format projection)
                                 (pipe.when
                                   {try.#Success _}
                                   false
@@ -124,7 +124,7 @@
                (|> valid_milli_second
                    %.nat
                    (%.message "00:00:00.")
-                   (of /.codec projection)
+                   (of /.format projection)
                    (pipe.when
                      {try.#Success _} true
                      {try.#Failure error} false)))
@@ -162,7 +162,7 @@
                        (n.= 0)))
                  (_.coverage [/.projection]
                    (|> expected
-                       (of /.codec injection)
+                       (of /.format injection)
                        (.value /.projection)
                        (try#each (of /.equivalence = expected))
                        (try.else false)))
diff --git a/stdlib/source/test/lux/world/time/date.lux b/stdlib/source/test/lux/world/time/date.lux
index ce8377bd4e..545205618c 100644
--- a/stdlib/source/test/lux/world/time/date.lux
+++ b/stdlib/source/test/lux/world/time/date.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -42,8 +42,8 @@
                   (orderT.spec /.order random.date))
            (_.for [/.enum]
                   (enumT.spec /.enum random.date))
-           (_.for [/.codec]
-                  (codecT.spec /.equivalence /.codec random.date))
+           (_.for [/.format]
+                  (formatT.spec /.equivalence /.format random.date))
 
            (do random.monad
              [expected random.date]
@@ -78,7 +78,7 @@
            (do random.monad
              [expected random.date]
              (_.coverage [/.projection]
-               (|> (of /.codec injection expected)
+               (|> (of /.format injection expected)
                    (.value /.projection)
                    (try#each (of /.equivalence = expected))
                    (try.else false))))
diff --git a/stdlib/source/test/lux/world/time/day.lux b/stdlib/source/test/lux/world/time/day.lux
index eeb6e3068d..901c53af66 100644
--- a/stdlib/source/test/lux/world/time/day.lux
+++ b/stdlib/source/test/lux/world/time/day.lux
@@ -10,7 +10,7 @@
      ["[1]T" \\test]]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -62,8 +62,8 @@
                       (orderT.spec /.order ..random))
                (_.for [/.enum]
                       (enumT.spec /.enum ..random))
-               (_.for [/.codec]
-                      (codecT.spec /.equivalence /.codec ..random))
+               (_.for [/.format]
+                      (formatT.spec /.equivalence /.format ..random))
 
                (,, (with_template [  ]
                      [(_.coverage []
@@ -81,7 +81,7 @@
                (do random.monad
                  [not_a_day (random.upper_cased 1)]
                  (_.coverage [/.not_a_day_of_the_week]
-                   (when (of /.codec projection not_a_day)
+                   (when (of /.format projection not_a_day)
                      {try.#Failure error}
                      (exception.is? /.not_a_day_of_the_week error)
                      
diff --git a/stdlib/source/test/lux/world/time/duration.lux b/stdlib/source/test/lux/world/time/duration.lux
index eaacc91d75..25caabf81c 100644
--- a/stdlib/source/test/lux/world/time/duration.lux
+++ b/stdlib/source/test/lux/world/time/duration.lux
@@ -8,7 +8,7 @@
     [monad (.only do)]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -41,8 +41,8 @@
                   (enumT.spec /.enum random.duration))
            (_.for [/.monoid]
                   (monoidT.spec /.equivalence /.monoid random.duration))
-           (_.for [/.codec]
-                  (codecT.spec /.equivalence /.codec random.duration))
+           (_.for [/.format]
+                  (formatT.spec /.equivalence /.format random.duration))
 
            (do random.monad
              [duration random.duration]
diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux
index efc32cce13..8929259695 100644
--- a/stdlib/source/test/lux/world/time/instant.lux
+++ b/stdlib/source/test/lux/world/time/instant.lux
@@ -10,7 +10,7 @@
      ["[1]T" \\test]]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -48,8 +48,8 @@
                   (orderT.spec /.order random.instant))
            (_.for [/.enum]
                   (enumT.spec /.enum random.instant))
-           (_.for [/.codec]
-                  (codecT.spec /.equivalence /.codec random.instant))
+           (_.for [/.format]
+                  (formatT.spec /.equivalence /.format random.instant))
 
            (do random.monad
              [.let [(open "/#[0]") /.equivalence]
diff --git a/stdlib/source/test/lux/world/time/month.lux b/stdlib/source/test/lux/world/time/month.lux
index 7d03379c5d..70ca4db9bd 100644
--- a/stdlib/source/test/lux/world/time/month.lux
+++ b/stdlib/source/test/lux/world/time/month.lux
@@ -10,7 +10,7 @@
      ["[1]T" \\test]]
     ["[0]" enum
      ["[1]T" \\test]]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -56,8 +56,8 @@
                       (orderT.spec /.order ..random))
                (_.for [/.enum]
                       (enumT.spec /.enum ..random))
-               (_.for [/.codec]
-                      (codecT.spec /.equivalence /.codec ..random))
+               (_.for [/.format]
+                      (formatT.spec /.equivalence /.format ..random))
 
                (,, (with_template [  ]
                      [(_.coverage []
@@ -118,7 +118,7 @@
                       (do random.monad
                         [not_a_month (random.upper_cased 1)]
                         (_.coverage [/.not_a_month_of_the_year]
-                          (when (of /.codec projection not_a_month)
+                          (when (of /.format projection not_a_month)
                             {try.#Failure error}
                             (exception.is? /.not_a_month_of_the_year error)
                             
diff --git a/stdlib/source/test/lux/world/time/year.lux b/stdlib/source/test/lux/world/time/year.lux
index 9e083a24b7..5e99d3f702 100644
--- a/stdlib/source/test/lux/world/time/year.lux
+++ b/stdlib/source/test/lux/world/time/year.lux
@@ -6,7 +6,7 @@
   [lux (.except)
    [abstract
     [monad (.only do)]
-    ["[0]" codec
+    ["[0]" format
      ["[1]T" \\test]]
     ["[0]" equivalence
      ["[1]T" \\test]]
@@ -44,8 +44,8 @@
                   (equivalenceT.spec /.equivalence ..random))
            (_.for [/.order]
                   (orderT.spec /.order ..random))
-           (_.for [/.codec /.projection]
-                  (codecT.spec /.equivalence /.codec ..random))
+           (_.for [/.format /.projection]
+                  (formatT.spec /.equivalence /.format ..random))
            
            (do random.monad
              [expected random.int]
diff --git a/to_do.md b/to_do.md
index aa1629e4fb..1f28b51152 100644
--- a/to_do.md
+++ b/to_do.md
@@ -31,15 +31,16 @@
    * `a/b * b/c = a/c` && `a/b * c/a = c/b` && `a/b * c/d = ac/bd`.
    * The above rule can make `a/0 * 0/b = a/b` and `0/a * b/0 = b/a`, bypassing any possibility for `0/0`.
    * It may also make the de-normalized zeroes and infinities carry useful information, instead of losing it through normalization.
-0. Re-name `Codec` to `Embedding`. Alternatively, re-name to `Format`.
-   * [Embedding](https://en.wikipedia.org/wiki/Embedding)
-   * [Format](https://en.wikipedia.org/wiki/Content_format)
 0. Make type-normalization no longer confuse local type parameters with globally-defined types/macros. Remove instances of `(.except left right)`.
 0. Unify the handling of globals between extensions, analysis & declaration.
+0. Favor partial calls over successive calls when compiling function application.
 
 ## Done
 
-0. Get rid of `library/lux/world/db`.
+0. Re-name `Codec` to `Embedding`. Alternatively, re-name to `Format`.
+   * [Embedding](https://en.wikipedia.org/wiki/Embedding)
+   * [Format](https://en.wikipedia.org/wiki/Content_format)
+0. [(Commit)](https://github.com/LuxLang/lux/commit/b32652a350e543d9343d8b6c859773937474ae7b) Get rid of `library/lux/world/db`.
 0. [(Commit)](https://github.com/LuxLang/lux/commit/ddbbca49f87ab84d8ee8cf8568d38c27542a6e67) Replace uses of `All` with `for_all` or `for_any`. Do the same for `Ex`.
 0. [(Commit)](https://github.com/LuxLang/lux/commit/ddbbca49f87ab84d8ee8cf8568d38c27542a6e67) Get rid of `licentia`.
 0. [(Commit)](https://github.com/LuxLang/lux/commit/31dacc61d04fad87f0e0c6e67220f4fc83dee9cb) Add extensions for pattern-matching and function definition, instead of having custom syntax for both.