aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2022-06-26 18:37:05 -0400
committerEduardo Julian2022-06-26 18:37:05 -0400
commit9f6505491e8a5c8a159ce094fe0af6f4fef0c5cf (patch)
treed497c163e477406a388460eedea80fdd6ee9748a /stdlib/source/library
parent3053fd79bc6ae42415298ee056a268dc2c9b690c (diff)
Re-named "format/lux/data/binary.Writer" to "Format".
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux140
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute.lux24
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/code.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/code/exception.lux14
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/constant.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux6
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/address.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux10
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux14
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/instruction.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/jump.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/class.lux40
-rw-r--r--stdlib/source/library/lux/target/jvm/constant.lux76
-rw-r--r--stdlib/source/library/lux/target/jvm/constant/pool.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/constant/tag.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/signed.lux16
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/unsigned.lux16
-rw-r--r--stdlib/source/library/lux/target/jvm/field.lux18
-rw-r--r--stdlib/source/library/lux/target/jvm/index.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/magic.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/method.lux18
-rw-r--r--stdlib/source/library/lux/target/jvm/modifier.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/version.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux54
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/export.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux2
42 files changed, 351 insertions, 351 deletions
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index f40e0c4ab..07c493b97 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -13,10 +13,10 @@
["[0]" product]
["[0]" binary (.only Binary)
["[1]!" \\unsafe]
- ["[0]" \\format (.only Writer) (.use "[1]#[0]" monoid)]
+ ["[0]" \\format (.only Format) (.use "[1]#[0]" monoid)]
["<[1]>" \\parser (.only Parser)]]
["[0]" text (.only Char)
- ["%" \\format (.only format)]
+ ["%" \\format]
[encoding
["[0]" utf8]]]
[collection
@@ -52,7 +52,7 @@
padding (|> "0"
(list.repeated padding_size)
text.together)]
- (format padding number)))
+ (%.format padding number)))
(def blank " ")
(def null text.null)
@@ -61,7 +61,7 @@
(def big_size Size 11)
(with_template [<exception> <limit> <size>
- <type> <in> <out> <writer> <suffix>
+ <type> <in> <out> <format> <suffix>
<coercion>]
[(def .public <limit>
Nat
@@ -88,8 +88,8 @@
(-> <type> Nat)
(|>> representation))
- (def <writer>
- (Writer <type>)
+ (def <format>
+ (Format <type>)
(let [suffix <suffix>
padded_size (n.+ (text.size suffix) <size>)]
(|>> representation
@@ -107,11 +107,11 @@
[not_a_small_number small_limit ..small_size
Small small from_small
- small_writer (format ..blank ..null)
+ small_format (%.format ..blank ..null)
as_small]
[not_a_big_number big_limit ..big_size
Big big from_big
- big_writer ..blank
+ big_format ..blank
as_big]
)
@@ -172,7 +172,7 @@
(abstraction " "))
(def checksum_suffix
- (format ..blank ..null))
+ (%.format ..blank ..null))
(def checksum
(-> Binary Nat)
@@ -194,8 +194,8 @@
(text.suffix ..checksum_suffix)
abstraction))
- (def checksum_writer
- (Writer Checksum)
+ (def checksum_format
+ (Format Checksum)
(let [padded_size (n.+ (text.size ..checksum_suffix)
..small_size)]
(|>> representation
@@ -211,7 +211,7 @@
value (<>.lifted
(at n.octal decoded digits))]
(in [value
- (abstraction (format digits ..checksum_suffix))])))
+ (abstraction (%.format digits ..checksum_suffix))])))
)
(def last_ascii
@@ -248,7 +248,7 @@
_
(binary!.slice 0 (++ end) string))))))))
-(with_template [<type> <representation> <size> <exception> <in> <out> <writer> <parser> <none>]
+(with_template [<type> <representation> <size> <exception> <in> <out> <format> <parser> <none>]
[(primitive .public <type>
<representation>
@@ -273,8 +273,8 @@
(-> <type> <representation>)
(|>> representation))
- (def <writer>
- (Writer <type>)
+ (def <format>
+ (Format <type>)
(let [suffix ..null
padded_size (n.+ (text.size suffix) <size>)]
(|>> representation
@@ -300,8 +300,8 @@
(try.trusted (<in> "")))
)]
- [Name Text ..name_size name_is_too_long name from_name name_writer name_parser anonymous]
- [Path file.Path ..path_size path_is_too_long path from_path path_writer path_parser no_path]
+ [Name Text ..name_size name_is_too_long name from_name name_format name_parser anonymous]
+ [Path file.Path ..path_size path_is_too_long path from_path path_format path_parser no_path]
)
(def magic_size Size 7)
@@ -316,8 +316,8 @@
(-> Magic Text)
(|>> representation))
- (def magic_writer
- (Writer Magic)
+ (def magic_format
+ (Format Magic)
(let [padded_size (n.+ (text.size ..null)
..magic_size)]
(|>> representation
@@ -400,8 +400,8 @@
(-> Link_Flag Char)
(|>> representation))
- (def link_flag_writer
- (Writer Link_Flag)
+ (def link_flag_format
+ (Format Link_Flag)
(|>> representation
\\format.bits_8))
@@ -454,12 +454,12 @@
(i64.or (representation left)
(representation right))))
- (def mode_writer
- (Writer Mode)
+ (def mode_format
+ (Format Mode)
(|>> representation
..small
try.trusted
- ..small_writer))
+ ..small_format))
(exception .public (invalid_mode [value Nat])
(exception.report
@@ -619,34 +619,34 @@
#major_device Device
#minor_device Device]))
-(def header_writer'
- (Writer Header)
+(def header_format'
+ (Format Header)
(all \\format.and
- ..path_writer
- ..mode_writer
- ..small_writer
- ..small_writer
- ..big_writer
- ..big_writer
- ..checksum_writer
- ..link_flag_writer
- ..path_writer
- ..magic_writer
- ..name_writer
- ..name_writer
- ..small_writer
- ..small_writer
+ ..path_format
+ ..mode_format
+ ..small_format
+ ..small_format
+ ..big_format
+ ..big_format
+ ..checksum_format
+ ..link_flag_format
+ ..path_format
+ ..magic_format
+ ..name_format
+ ..name_format
+ ..small_format
+ ..small_format
))
-(def (header_writer header)
- (Writer Header)
+(def (header_format header)
+ (Format Header)
(let [checksum (|> header
(has #checksum ..dummy_checksum)
- (\\format.result ..header_writer')
+ (\\format.result ..header_format')
..checksum_code)]
(|> header
(has #checksum checksum)
- (\\format.result ..header_writer')
+ (\\format.result ..header_format')
(\\format.segment ..block_size))))
(def modification_time
@@ -656,14 +656,14 @@
.nat
..as_big))
-(def (file_writer link_flag)
- (-> Link_Flag (Writer File))
+(def (file_format link_flag)
+ (-> Link_Flag (Format File))
(function (_ [path modification_time mode ownership content])
(let [[size content] (..from_content content)
- writer (all \\format.and
- ..header_writer
+ format (all \\format.and
+ ..header_format
(\\format.segment (..rounded_content_size size)))]
- (writer [[#path path
+ (format [[#path path
#mode mode
#user_id (the [#user #id] ownership)
#group_id (the [#group #id] ownership)
@@ -679,17 +679,17 @@
#minor_device ..no_device]
content]))))
-(def normal_file_writer
- (Writer File)
- (..file_writer ..normal))
+(def normal_file_format
+ (Format File)
+ (..file_format ..normal))
-(def contiguous_file_writer
- (Writer File)
- (..file_writer ..contiguous))
+(def contiguous_file_format
+ (Format File)
+ (..file_format ..contiguous))
-(def (symbolic_link_writer path)
- (Writer Path)
- (..header_writer
+(def (symbolic_link_format path)
+ (Format Path)
+ (..header_format
[#path ..no_path
#mode ..none
#user_id ..no_id
@@ -705,9 +705,9 @@
#major_device ..no_device
#minor_device ..no_device]))
-(def (directory_writer path)
- (Writer Path)
- (..header_writer
+(def (directory_format path)
+ (Format Path)
+ (..header_format
[#path path
#mode ..none
#user_id ..no_id
@@ -723,24 +723,24 @@
#major_device ..no_device
#minor_device ..no_device]))
-(def entry_writer
- (Writer Entry)
+(def entry_format
+ (Format Entry)
(|>> (pipe.case
- {#Normal value} (..normal_file_writer value)
- {#Symbolic_Link value} (..symbolic_link_writer value)
- {#Directory value} (..directory_writer value)
- {#Contiguous value} (..contiguous_file_writer value))))
+ {#Normal value} (..normal_file_format value)
+ {#Symbolic_Link value} (..symbolic_link_format value)
+ {#Directory value} (..directory_format value)
+ {#Contiguous value} (..contiguous_file_format value))))
(def end_of_archive_size
Size
(n.* 2 ..block_size))
-(def .public writer
- (Writer Tar)
+(def .public format
+ (Format Tar)
(let [end_of_archive (binary!.empty ..end_of_archive_size)]
(function (_ tar)
(\\format#composite (sequence#mix (function (_ next total)
- (\\format#composite total (..entry_writer next)))
+ (\\format#composite total (..entry_format next)))
\\format#identity
tar)
(\\format.segment ..end_of_archive_size end_of_archive)))))
diff --git a/stdlib/source/library/lux/target/jvm/attribute.lux b/stdlib/source/library/lux/target/jvm/attribute.lux
index 3ecaa7321..3167f2516 100644
--- a/stdlib/source/library/lux/target/jvm/attribute.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute.lux
@@ -10,7 +10,7 @@
["[0]" sum]
["[0]" product]
["[0]" binary
- ["[1]F" \\format (.only Writer)]]]
+ ["[1]F" \\format (.only Format)]]]
[macro
["^" pattern]]
[math
@@ -43,14 +43,14 @@
//unsigned.equivalence
Equivalence<about>))
-(def (info_writer writer)
+(def (info_format format)
(All (_ about)
- (-> (Writer about)
- (Writer (Info about))))
+ (-> (Format about)
+ (Format (Info about))))
(function (_ [name length info])
- (let [[nameS nameT] (//index.writer name)
- [lengthS lengthT] (//unsigned.writer/4 length)
- [infoS infoT] (writer info)]
+ (let [[nameS nameT] (//index.format name)
+ [lengthS lengthT] (//unsigned.format/4 length)
+ [infoS infoT] (format info)]
[(all n.+ nameS lengthS infoS)
(|>> nameT lengthT infoT)])))
@@ -136,14 +136,14 @@
[it (|> it //signature.signature //pool.utf8)]
(at ! each (signature' it) (//pool.utf8 "Signature"))))
-(def .public (writer it)
- (Writer Attribute)
+(def .public (format it)
+ (Format Attribute)
(case it
{#Constant it}
- ((info_writer /constant.writer) it)
+ ((info_format /constant.format) it)
{#Code it}
- ((info_writer (/code.writer writer)) it)
+ ((info_format (/code.format format)) it)
{#Signature it}
- ((info_writer //index.writer) it)))
+ ((info_format //index.format) it)))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/code.lux b/stdlib/source/library/lux/target/jvm/attribute/code.lux
index face35c64..a350fde0f 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/code.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/code.lux
@@ -7,7 +7,7 @@
["[0]" product]
["[0]" binary (.only Binary)]
["[0]" binary
- ["[1]F" \\format (.only Writer) (.use "[1]#[0]" monoid)]]
+ ["[1]F" \\format (.only Format) (.use "[1]#[0]" monoid)]]
[collection
["[0]" sequence (.only Sequence) (.use "[1]#[0]" functor mix)]]]
[math
@@ -65,19 +65,19 @@
))
... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3
-(def .public (writer writer code)
- (All (_ Attribute) (-> (Writer Attribute) (Writer (Code Attribute))))
+(def .public (format format code)
+ (All (_ Attribute) (-> (Format Attribute) (Format (Code Attribute))))
(all binaryF#composite
... u2 max_stack;
... u2 max_locals;
- (///limit.writer (the #limit code))
+ (///limit.format (the #limit code))
... u4 code_length;
... u1 code[code_length];
(binaryF.binary_32 (the #code code))
... u2 exception_table_length;
... exception_table[exception_table_length];
- ((binaryF.sequence_16 /exception.writer) (the #exception_table code))
+ ((binaryF.sequence_16 /exception.format) (the #exception_table code))
... u2 attributes_count;
... attribute_info attributes[attributes_count];
- ((binaryF.sequence_16 writer) (the #attributes code))
+ ((binaryF.sequence_16 format) (the #attributes code))
))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
index a125c1282..08c7cc129 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/code/exception.lux
@@ -6,7 +6,7 @@
[data
["[0]" product]
[binary
- ["[0]" \\format (.only Writer)]]]
+ ["[0]" \\format (.only Format)]]]
[math
[number
["n" nat]]]]]
@@ -49,11 +49,11 @@
////unsigned.bytes/2
))
-(def .public writer
- (Writer Exception)
+(def .public format
+ (Format Exception)
(all \\format.and
- ////address.writer
- ////address.writer
- ////address.writer
- ////index.writer
+ ////address.format
+ ////address.format
+ ////address.format
+ ////index.format
))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/constant.lux b/stdlib/source/library/lux/target/jvm/attribute/constant.lux
index 3a31f2c70..830632337 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/constant.lux
@@ -5,7 +5,7 @@
[equivalence (.only Equivalence)]]
[data
[binary
- [\\format (.only Writer)]]]]]
+ [\\format (.only Format)]]]]]
["[0]" ///
[constant (.only Value)]
["[1][0]" index (.only Index)]
@@ -22,6 +22,6 @@
(def .public length
///index.length)
-(def .public writer
- (All (_ a) (Writer (Constant a)))
- ///index.writer)
+(def .public format
+ (All (_ a) (Format (Constant a)))
+ ///index.format)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index f6a439799..5d407ac59 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -140,9 +140,9 @@
(exception.report
"Instruction" (%.symbol instruction)
"Label" (%.nat label)
- "Address" (/address.format address)
- "Expected" (/stack.format expected)
- "Actual" (/stack.format actual)))
+ "Address" (/address.text address)
+ "Expected" (/stack.text expected)
+ "Actual" (/stack.text actual)))
(def .public (set? label)
(-> Label (Bytecode (Maybe [Stack Address])))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/target/jvm/bytecode/address.lux
index 58a9d411e..f1b07aa77 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/address.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/address.lux
@@ -8,9 +8,9 @@
["[0]" try (.only Try)]]
[data
[binary
- [\\format (.only Writer)]]
+ [\\format (.only Format)]]
[text
- ["%" \\format (.only Format)]]]
+ ["%" \\format]]]
[math
[number
["n" nat]]]
@@ -64,11 +64,11 @@
(representation reference)
(representation subject)))))
- (def .public writer
- (Writer Address)
- (|>> representation ///unsigned.writer/2))
-
(def .public format
(Format Address)
+ (|>> representation ///unsigned.format/2))
+
+ (def .public text
+ (%.Format Address)
(|>> representation ///unsigned.value %.nat))
)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
index 82f6f0937..fcb4540c7 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
@@ -67,8 +67,8 @@
(exception .public (mismatched_stacks [expected Stack
actual Stack])
(exception.report
- "Expected" (/stack.format expected)
- "Actual" (/stack.format actual)))
+ "Expected" (/stack.text expected)
+ "Actual" (/stack.text actual)))
(def .public (continue expected environment)
(-> Stack Environment (Try [Stack Environment]))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
index ce98e3228..ce5801345 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
@@ -9,7 +9,7 @@
[data
["[0]" product]
[binary
- ["[0]" \\format (.only Writer) (.use "[1]#[0]" monoid)]]]
+ ["[0]" \\format (.only Format) (.use "[1]#[0]" monoid)]]]
[math
[number
["n" nat]]]]]
@@ -51,9 +51,9 @@
/registry.equivalence
))
-(def .public (writer limit)
- (Writer Limit)
+(def .public (format limit)
+ (Format Limit)
(all \\format#composite
- (/stack.writer (the #stack limit))
- (/registry.writer (the #registry limit))
+ (/stack.format (the #stack limit))
+ (/registry.format (the #registry limit))
))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
index cc989ed02..f1cc6058d 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
@@ -7,7 +7,7 @@
["[0]" try (.only Try) (.use "[1]#[0]" functor)]]
[data
[binary
- [\\format (.only Writer)]]
+ [\\format (.only Format)]]
[collection
["[0]" list (.use "[1]#[0]" functor mix)]]]
[math
@@ -64,9 +64,9 @@
(|>> representation)
/////unsigned.equivalence))
- (def .public writer
- (Writer Registry)
- (|>> representation /////unsigned.writer/2))
+ (def .public format
+ (Format Registry)
+ (|>> representation /////unsigned.format/2))
(def .public (has needed)
(-> Registry Registry Registry)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
index 5d485efb2..daf9da304 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
@@ -8,9 +8,9 @@
["[0]" try (.only Try)]]
[data
[text
- ["%" \\format (.only Format)]]
+ ["%" \\format]]
[binary
- [\\format (.only Writer)]]]
+ [\\format (.only Format)]]]
[type
[primitive (.except)]]]]
["[0]" /////
@@ -35,9 +35,9 @@
(|>> representation)
/////unsigned.equivalence))
- (def .public writer
- (Writer Stack)
- (|>> representation /////unsigned.writer/2))
+ (def .public format
+ (Format Stack)
+ (|>> representation /////unsigned.format/2))
(def stack
(-> U2 Stack)
@@ -60,8 +60,8 @@
(/////unsigned.max/2 (representation left)
(representation right))))
- (def .public format
- (Format Stack)
+ (def .public text
+ (%.Format Stack)
(|>> representation /////unsigned.value %.nat))
)
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
index fa61fa2fc..1c654dae9 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
@@ -100,7 +100,7 @@
[size/4 ..big_jump_size]
)
-(with_template [<shift> <name> <inputT> <writer> <unwrap>]
+(with_template [<shift> <name> <inputT> <format> <unwrap>]
[(with_expansions [<private> (template.symbol ["'" <name>])]
(def (<private> opcode input0)
(-> Opcode <inputT> Mutation)
@@ -108,7 +108,7 @@
[(n.+ (///unsigned.value <shift>) offset)
(|> binary
(binary.has_8! offset opcode)
- (<writer> (n.+ (///unsigned.value ..opcode_size) offset)
+ (<format> (n.+ (///unsigned.value ..opcode_size) offset)
(<unwrap> input0)))]))
(def <name>
@@ -124,7 +124,7 @@
[..size/4 jump/4 Big_Jump binary.has_32! ///signed.value]
)
-(with_template [<shift> <name> <inputT> <writer>]
+(with_template [<shift> <name> <inputT> <format>]
[(with_expansions [<private> (template.symbol ["'" <name>])]
(def (<private> opcode input0)
(-> Opcode <inputT> Mutation)
@@ -132,7 +132,7 @@
[(n.+ (///unsigned.value <shift>) offset)
(|> binary
(binary.has_8! offset opcode)
- (<writer> (n.+ (///unsigned.value ..opcode_size) offset)
+ (<format> (n.+ (///unsigned.value ..opcode_size) offset)
(///signed.value input0)))]))
(def <name>
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/jump.lux b/stdlib/source/library/lux/target/jvm/bytecode/jump.lux
index 8274d3855..13c5f8f07 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/jump.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/jump.lux
@@ -5,7 +5,7 @@
[equivalence (.only Equivalence)]]
[data
[binary
- [\\format (.only Writer)]]]]]
+ [\\format (.only Format)]]]]]
["[0]" ///
[encoding
["[1][0]" signed (.only S2 S4)]]])
@@ -17,9 +17,9 @@
(Equivalence Jump)
///signed.equivalence)
-(def .public writer
- (Writer Jump)
- ///signed.writer/2)
+(def .public format
+ (Format Jump)
+ ///signed.format/2)
(type .public Big_Jump
S4)
diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux
index 08ef0790a..d018f832f 100644
--- a/stdlib/source/library/lux/target/jvm/class.lux
+++ b/stdlib/source/library/lux/target/jvm/class.lux
@@ -10,7 +10,7 @@
[data
["[0]" product]
["[0]" binary
- ["[1]F" \\format (.only Writer) (.use "[1]#[0]" monoid)]]
+ ["[1]F" \\format (.only Format) (.use "[1]#[0]" monoid)]]
[collection
["[0]" sequence (.only Sequence)]]]]]
["[0]" //
@@ -88,8 +88,8 @@
(in [@this @super @interfaces])))
(def .public (class version modifier
- this signature super interfaces
- fields methods attributes)
+ this signature super interfaces
+ fields methods attributes)
(-> Major (Modifier Class)
Internal (Maybe (Signature Inheritance)) Internal (List Internal)
(List (Resource Field))
@@ -127,25 +127,25 @@
{.#None}
attributes)])))
-(def .public (writer class)
- (Writer Class)
+(def .public (format class)
+ (Format Class)
(`` (all binaryF#composite
- (~~ (with_template [<writer> <slot>]
- [(<writer> (the <slot> class))]
+ (~~ (with_template [<format> <slot>]
+ [(<format> (the <slot> class))]
- [//magic.writer #magic]
- [//version.writer #minor_version]
- [//version.writer #major_version]
- [//pool.writer #constant_pool]
- [//modifier.writer #modifier]
- [//index.writer #this]
- [//index.writer #super]))
- (~~ (with_template [<writer> <slot>]
- [((binaryF.sequence_16 <writer>) (the <slot> class))]
+ [//magic.format #magic]
+ [//version.format #minor_version]
+ [//version.format #major_version]
+ [//pool.format #constant_pool]
+ [//modifier.format #modifier]
+ [//index.format #this]
+ [//index.format #super]))
+ (~~ (with_template [<format> <slot>]
+ [((binaryF.sequence_16 <format>) (the <slot> class))]
- [//index.writer #interfaces]
- [//field.writer #fields]
- [//method.writer #methods]
- [//attribute.writer #attributes]
+ [//index.format #interfaces]
+ [//field.format #fields]
+ [//method.format #methods]
+ [//attribute.format #attributes]
))
)))
diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux
index f404694ea..516930b9d 100644
--- a/stdlib/source/library/lux/target/jvm/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/constant.lux
@@ -11,7 +11,7 @@
["[0]" product]
["[0]" text]
["[0]" binary
- ["[1]F" \\format (.only Writer) (.use "[1]#[0]" monoid)]]]
+ ["[1]F" \\format (.only Format) (.use "[1]#[0]" monoid)]]]
[macro
["^" pattern]
["[0]" template]]
@@ -36,8 +36,8 @@
(type .public UTF8
Text)
-(def utf8_writer
- (Writer UTF8)
+(def utf8_format
+ (Format UTF8)
binaryF.utf8_16)
(primitive .public Class
@@ -57,9 +57,9 @@
..index
//index.equivalence))
- (def class_writer
- (Writer Class)
- (|>> representation //index.writer))
+ (def class_format
+ (Format Class)
+ (|>> representation //index.format))
)
(import java/lang/Float
@@ -112,18 +112,18 @@
[string String (Index UTF8)]
)
- (with_template [<writer_name> <type> <write> <writer>]
- [(def <writer_name>
- (Writer <type>)
+ (with_template [<format_name> <type> <write> <format>]
+ [(def <format_name>
+ (Format <type>)
(`` (|>> representation
(~~ (template.spliced <write>))
- (~~ (template.spliced <writer>)))))]
+ (~~ (template.spliced <format>)))))]
- [integer_writer Integer [] [binaryF.bits_32]]
- [float_writer Float [java/lang/Float::floatToRawIntBits ffi.of_int .i64] [i32.i32 binaryF.bits_32]]
- [long_writer Long [] [binaryF.bits_64]]
- [double_writer Double [java/lang/Double::doubleToRawLongBits ffi.of_long] [binaryF.bits_64]]
- [string_writer String [] [//index.writer]]
+ [integer_format Integer [] [binaryF.bits_32]]
+ [float_format Float [java/lang/Float::floatToRawIntBits ffi.of_int .i64] [i32.i32 binaryF.bits_32]]
+ [long_format Long [] [binaryF.bits_64]]
+ [double_format Double [java/lang/Double::doubleToRawLongBits ffi.of_long] [binaryF.bits_64]]
+ [string_format String [] [//index.format]]
)
)
@@ -137,21 +137,21 @@
[#class (Index Class)
#name_and_type (Index (Name_And_Type of))]))
-(with_template [<type> <equivalence> <writer>]
+(with_template [<type> <equivalence> <format>]
[(def .public <equivalence>
(Equivalence (<type> Any))
(all product.equivalence
//index.equivalence
//index.equivalence))
- (def <writer>
- (Writer (<type> Any))
+ (def <format>
+ (Format (<type> Any))
(all binaryF.and
- //index.writer
- //index.writer))]
+ //index.format
+ //index.format))]
- [Name_And_Type name_and_type_equivalence name_and_type_writer]
- [Reference reference_equivalence reference_writer]
+ [Name_And_Type name_and_type_equivalence name_and_type_format]
+ [Reference reference_equivalence reference_format]
)
(type .public Constant
@@ -223,28 +223,28 @@
... )
)
-(def .public writer
- (Writer Constant)
- (with_expansions [<constants> (these [#UTF8 /tag.utf8 ..utf8_writer]
- [#Integer /tag.integer ..integer_writer]
- [#Float /tag.float ..float_writer]
- [#Long /tag.long ..long_writer]
- [#Double /tag.double ..double_writer]
- [#Class /tag.class ..class_writer]
- [#String /tag.string ..string_writer]
- [#Field /tag.field ..reference_writer]
- [#Method /tag.method ..reference_writer]
- [#Interface_Method /tag.interface_method ..reference_writer]
- [#Name_And_Type /tag.name_and_type ..name_and_type_writer]
+(def .public format
+ (Format Constant)
+ (with_expansions [<constants> (these [#UTF8 /tag.utf8 ..utf8_format]
+ [#Integer /tag.integer ..integer_format]
+ [#Float /tag.float ..float_format]
+ [#Long /tag.long ..long_format]
+ [#Double /tag.double ..double_format]
+ [#Class /tag.class ..class_format]
+ [#String /tag.string ..string_format]
+ [#Field /tag.field ..reference_format]
+ [#Method /tag.method ..reference_format]
+ [#Interface_Method /tag.interface_method ..reference_format]
+ [#Name_And_Type /tag.name_and_type ..name_and_type_format]
... TODO: Method_Handle
... TODO: Method_Type
... TODO: Invoke_Dynamic
)]
(function (_ value)
(case value
- (^.with_template [<case> <tag> <writer>]
+ (^.with_template [<case> <tag> <format>]
[{<case> value}
- (binaryF#composite (/tag.writer <tag>)
- (<writer> value))])
+ (binaryF#composite (/tag.format <tag>)
+ (<format> value))])
(<constants>)
))))
diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux
index ad82d4686..d3a8c2546 100644
--- a/stdlib/source/library/lux/target/jvm/constant/pool.lux
+++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux
@@ -14,7 +14,7 @@
["[0]" product]
["[0]" text]
[binary
- ["[0]" \\format (.only Writer) (.use "specification#[0]" monoid)]]
+ ["[0]" \\format (.only Format) (.use "specification#[0]" monoid)]]
[collection
["[0]" sequence (.only Sequence) (.use "[1]#[0]" mix)]]]
[math
@@ -203,11 +203,11 @@
(template (_ <index>)
[(|> <index> //index.value //unsigned.value)]))
-(def .public writer
- (Writer Pool)
+(def .public format
+ (Format Pool)
(function (_ [next pool])
(sequence#mix (function (_ [_index post] pre)
- (specification#composite pre (//.writer post)))
+ (specification#composite pre (//.format post)))
(\\format.bits_16 (!index next))
pool)))
diff --git a/stdlib/source/library/lux/target/jvm/constant/tag.lux b/stdlib/source/library/lux/target/jvm/constant/tag.lux
index 060628096..2b12af966 100644
--- a/stdlib/source/library/lux/target/jvm/constant/tag.lux
+++ b/stdlib/source/library/lux/target/jvm/constant/tag.lux
@@ -7,7 +7,7 @@
["[0]" try]]
[data
[binary
- [\\format (.only Writer)]]]
+ [\\format (.only Format)]]]
[type
[primitive (.except)]]]]
["[0]" ///
@@ -45,7 +45,7 @@
[18 invoke_dynamic]
)
- (def .public writer
- (Writer Tag)
- (|>> representation ///unsigned.writer/1))
+ (def .public format
+ (Format Tag)
+ (|>> representation ///unsigned.format/1))
)
diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
index c786ae13d..30ec9a567 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
@@ -11,7 +11,7 @@
[text
["%" \\format (.only format)]]
[binary
- ["[0]" \\format (.only Writer)]]]
+ ["[0]" \\format (.only Format)]]]
[macro
["[0]" template]]
[math
@@ -101,13 +101,13 @@
[lifted/4 S2 S4]
)
- (with_template [<writer_name> <type> <writer>]
- [(def .public <writer_name>
- (Writer <type>)
- (|>> representation <writer>))]
+ (with_template [<format_name> <type> <format>]
+ [(def .public <format_name>
+ (Format <type>)
+ (|>> representation <format>))]
- [writer/1 S1 \\format.bits_8]
- [writer/2 S2 \\format.bits_16]
- [writer/4 S4 \\format.bits_32]
+ [format/1 S1 \\format.bits_8]
+ [format/2 S2 \\format.bits_16]
+ [format/4 S4 \\format.bits_32]
)
)
diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
index a3c89b40b..eee130b27 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
@@ -11,7 +11,7 @@
[text
["%" \\format (.only format)]]
[binary
- ["[0]" \\format (.only Writer)]]]
+ ["[0]" \\format (.only Format)]]]
[macro
["[0]" template]]
[math
@@ -110,13 +110,13 @@
[lifted/4 U2 U4]
)
- (with_template [<writer_name> <type> <writer>]
- [(def .public <writer_name>
- (Writer <type>)
- (|>> representation <writer>))]
+ (with_template [<format_name> <type> <format>]
+ [(def .public <format_name>
+ (Format <type>)
+ (|>> representation <format>))]
- [writer/1 U1 \\format.bits_8]
- [writer/2 U2 \\format.bits_16]
- [writer/4 U4 \\format.bits_32]
+ [format/1 U1 \\format.bits_8]
+ [format/2 U2 \\format.bits_16]
+ [format/4 U4 \\format.bits_32]
)
)
diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux
index ab9f3ea6e..44cbaee15 100644
--- a/stdlib/source/library/lux/target/jvm/field.lux
+++ b/stdlib/source/library/lux/target/jvm/field.lux
@@ -7,7 +7,7 @@
[data
["[0]" product]
["[0]" binary
- ["[1]F" \\format (.only Writer) (.use "[1]#[0]" monoid)]]
+ ["[1]F" \\format (.only Format) (.use "[1]#[0]" monoid)]]
[collection
["[0]" sequence (.only Sequence)]]]]]
["[0]" //
@@ -49,16 +49,16 @@
//index.equivalence
(sequence.equivalence //attribute.equivalence)))
-(def .public (writer field)
- (Writer Field)
+(def .public (format field)
+ (Format Field)
(`` (all binaryF#composite
- (~~ (with_template [<writer> <slot>]
- [(<writer> (the <slot> field))]
+ (~~ (with_template [<format> <slot>]
+ [(<format> (the <slot> field))]
- [modifier.writer #modifier]
- [//index.writer #name]
- [//index.writer #descriptor]
- [(binaryF.sequence_16 //attribute.writer) #attributes]))
+ [modifier.format #modifier]
+ [//index.format #name]
+ [//index.format #descriptor]
+ [(binaryF.sequence_16 //attribute.format) #attributes]))
)))
(def .public (field modifier name with_signature? type attributes)
diff --git a/stdlib/source/library/lux/target/jvm/index.lux b/stdlib/source/library/lux/target/jvm/index.lux
index e54447e78..1bae3b814 100644
--- a/stdlib/source/library/lux/target/jvm/index.lux
+++ b/stdlib/source/library/lux/target/jvm/index.lux
@@ -5,7 +5,7 @@
["[0]" equivalence (.only Equivalence)]]
[data
[binary
- [\\format (.only Writer)]]]
+ [\\format (.only Format)]]]
[type
[primitive (.except)]]]]
["[0]" //
@@ -32,7 +32,7 @@
..value
//unsigned.equivalence))
- (def .public writer
- (All (_ kind) (Writer (Index kind)))
- (|>> representation //unsigned.writer/2))
+ (def .public format
+ (All (_ kind) (Format (Index kind)))
+ (|>> representation //unsigned.format/2))
)
diff --git a/stdlib/source/library/lux/target/jvm/magic.lux b/stdlib/source/library/lux/target/jvm/magic.lux
index 3aab60bec..e5fc0a09d 100644
--- a/stdlib/source/library/lux/target/jvm/magic.lux
+++ b/stdlib/source/library/lux/target/jvm/magic.lux
@@ -18,5 +18,5 @@
//unsigned.u4
try.trusted))
-(def .public writer
- //unsigned.writer/4)
+(def .public format
+ //unsigned.format/4)
diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux
index 4468f152d..7fe3c2d7b 100644
--- a/stdlib/source/library/lux/target/jvm/method.lux
+++ b/stdlib/source/library/lux/target/jvm/method.lux
@@ -9,7 +9,7 @@
[data
["[0]" product]
[binary
- ["[0]" \\format (.only Writer) (.use "[1]#[0]" monoid)]]
+ ["[0]" \\format (.only Format) (.use "[1]#[0]" monoid)]]
[collection
["[0]" sequence (.only Sequence)]
["[0]" list]]]]]
@@ -98,14 +98,14 @@
(sequence.equivalence //attribute.equivalence)
))
-(def .public (writer field)
- (Writer Method)
+(def .public (format field)
+ (Format Method)
(`` (all \\format#composite
- (~~ (with_template [<writer> <slot>]
- [(<writer> (the <slot> field))]
+ (~~ (with_template [<format> <slot>]
+ [(<format> (the <slot> field))]
- [//modifier.writer #modifier]
- [//index.writer #name]
- [//index.writer #descriptor]
- [(\\format.sequence_16 //attribute.writer) #attributes]))
+ [//modifier.format #modifier]
+ [//index.format #name]
+ [//index.format #descriptor]
+ [(\\format.sequence_16 //attribute.format) #attributes]))
)))
diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux
index ac45136d6..05df8f292 100644
--- a/stdlib/source/library/lux/target/jvm/modifier.lux
+++ b/stdlib/source/library/lux/target/jvm/modifier.lux
@@ -9,7 +9,7 @@
["[0]" try]]
[data
["[0]" binary
- ["[1]F" \\format (.only Writer)]]]
+ ["[1]F" \\format (.only Format)]]]
[macro (.only with_symbols)
[syntax (.only syntax)]
["[0]" code (.only)
@@ -71,9 +71,9 @@
Modifier
(at ..monoid identity))
- (def .public writer
- (All (_ of) (Writer (Modifier of)))
- (|>> representation //unsigned.writer/2))
+ (def .public format
+ (All (_ of) (Format (Modifier of)))
+ (|>> representation //unsigned.format/2))
(def modifier
(-> Nat Modifier)
diff --git a/stdlib/source/library/lux/target/jvm/version.lux b/stdlib/source/library/lux/target/jvm/version.lux
index 9e50f90bf..8e8b82dcc 100644
--- a/stdlib/source/library/lux/target/jvm/version.lux
+++ b/stdlib/source/library/lux/target/jvm/version.lux
@@ -38,5 +38,5 @@
[56 v12]
)
-(def .public writer
- //unsigned.writer/2)
+(def .public format
+ //unsigned.format/2)
diff --git a/stdlib/source/library/lux/tool/compiler.lux b/stdlib/source/library/lux/tool/compiler.lux
index 8d34b580c..1d46450a2 100644
--- a/stdlib/source/library/lux/tool/compiler.lux
+++ b/stdlib/source/library/lux/tool/compiler.lux
@@ -8,7 +8,7 @@
[data
["[0]" text]
["[0]" binary (.only Binary)
- [\\format (.only Writer)]
+ [\\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]]
[world
["[0]" file (.only Path)]]]]
@@ -47,7 +47,7 @@
(Ex (_ state document object)
[state
(Key document)
- (Writer document)
+ (Format document)
(Parser document)
(-> Input (Try (Compilation state document object)))]))
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index d20ddcc8a..0f893a1dc 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -18,7 +18,7 @@
["[0]" bit]
["[0]" product]
["[0]" binary (.only Binary)
- ["_" \\format (.only Writer)]]
+ ["_" \\format (.only Format)]]
["[0]" text (.use "[1]#[0]" equivalence)
["%" \\format (.only format)]]
[collection
@@ -95,21 +95,21 @@
<State+> (these (///directive.State+ <type_vars>))
<Bundle> (these (///generation.Bundle <type_vars>))]
- (def (writer //)
+ (def (format //)
(All (_ a)
- (-> (Writer a)
- (Writer [(module.Module a) Registry])))
+ (-> (Format a)
+ (Format [(module.Module a) Registry])))
(all _.and
(all _.and
_.nat
- descriptor.writer
- (document.writer //))
- registry.writer
+ descriptor.format
+ (document.format //))
+ registry.format
))
(def (cache_module context platform @module key format entry)
(All (_ <type_vars> document)
- (-> context.Context <Platform> module.ID (Key document) (Writer document) (archive.Entry document)
+ (-> context.Context <Platform> module.ID (Key document) (Format document) (archive.Entry document)
(Async (Try Any))))
(let [system (the #file_system platform)
write_artifact! (is (-> [artifact.ID (Maybe Text) Binary] (Action Any))
@@ -137,7 +137,7 @@
(the archive.#module)
(has module.#document document))
(the archive.#registry entry)]
- (_.result (..writer format))
+ (_.result (..format format))
(cache/module.cache! system context @module))))))
... TODO: Inline ASAP
@@ -295,7 +295,7 @@
[[state [archive payload]] (|> (..process_runtime archive platform)
(///phase.result' state)
async#in)
- _ (..cache_module context platform 0 $.key $.writer payload)
+ _ (..cache_module context platform 0 $.key $.format payload)
[phase_wrapper state] (with_missing_extensions platform program state)]
(in [state archive phase_wrapper])))))
@@ -705,7 +705,7 @@
(All (_ <type_vars>
state document object)
(-> Import context.Context <Platform> (List _io.Context) (///.Compiler <State+> .Module Any)
- (Key document) (Writer document) (///.Compilation state document object)
+ (Key document) (Format document) (///.Compilation state document object)
(-> (List ///.Custom) descriptor.Module Lux_Importer module.ID (..Context state) descriptor.Module (..Return state))))
(function (_ customs importer import! @module [archive state] module)
(loop (again [[archive state] [archive state]
@@ -780,7 +780,7 @@
(console.write_line report console)))
<else>)))
.let [entry (has [archive.#module module.#descriptor descriptor.#references] all_dependencies entry)]
- _ (..cache_module context platform @module $.key $.writer (as (archive.Entry .Module) entry))]
+ _ (..cache_module context platform @module $.key $.format (as (archive.Entry .Module) entry))]
(async#in (do try.monad
[archive (archive.has module entry archive)]
(in [archive
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index b9d334818..14adeb6d6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -5,7 +5,7 @@
["<>" parser]]
[data
["[0]" binary
- ["_" \\format (.only Writer)]
+ ["_" \\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]]
[meta
["[0]" version]]]]
@@ -20,20 +20,20 @@
... TODO: Remove #module_hash, #imports & #module_state ASAP.
... TODO: Not just from this parser, but from the lux.Module type.
-(def .public writer
- (Writer .Module)
- (let [definition (is (Writer Definition)
+(def .public format
+ (Format .Module)
+ (let [definition (is (Format Definition)
(all _.and _.bit _.type _.any))
- labels (is (Writer [Text (List Text)])
+ labels (is (Format [Text (List Text)])
(_.and _.text (_.list _.text)))
- global_type (is (Writer [Bit Type (Either [Text (List Text)]
+ global_type (is (Format [Bit Type (Either [Text (List Text)]
[Text (List Text)])])
(all _.and _.bit _.type (_.or labels labels)))
- global_label (is (Writer .Label)
+ global_label (is (Format .Label)
(all _.and _.bit _.type (_.list _.text) _.nat))
- alias (is (Writer Alias)
+ alias (is (Format Alias)
(_.and _.text _.text))
- global (is (Writer Global)
+ global (is (Format Global)
(all _.or
definition
global_type
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
index 16cb9e777..4696b3104 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -2468,7 +2468,7 @@
(let [signature (signature.inheritance (list#each jvm.signature parameters)
(jvm.signature super)
(list#each jvm.signature interfaces))]
- (try#each (|>> (\\format.result class.writer)
+ (try#each (|>> (\\format.result class.format)
[name])
(class.class version.v6_0
(all modifier#composite
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
index 05da344e7..39104d42d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
@@ -687,7 +687,7 @@
(let [signature (signature.inheritance (list#each type.signature parameters)
(type.signature super)
(list#each type.signature interfaces))]
- (try#each (|>> (\\format.result class.writer)
+ (try#each (|>> (\\format.result class.format)
[name])
(class.class version.v6_0
(all modifier#composite
@@ -904,7 +904,7 @@
(the [directive.#generation directive.#phase] state)])
methods)
.let [all_dependencies (cache.all (list#each product.left methods))]
- bytecode (<| (at ! each (\\format.result class.writer))
+ bytecode (<| (at ! each (\\format.result class.format))
phase.lifted
(class.class version.v6_0
(all modifier#composite
@@ -943,7 +943,7 @@
(function (_ extension_name phase archive [[name parameters] supers annotations method_declarations])
(directive.lifted_generation
(do [! phase.monad]
- [bytecode (<| (at ! each (\\format.result class.writer))
+ [bytecode (<| (at ! each (\\format.result class.format))
phase.lifted
(class.class version.v6_0
(all modifier#composite
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
index 2cebcc690..73c27d038 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -1350,7 +1350,7 @@
methods! (|> overriden_methods
(list#each (normalized_method global_mapping))
(monad.each ! (method_definition generate archive artifact_id)))
- bytecode (<| (at ! each (\\format.result class.writer))
+ bytecode (<| (at ! each (\\format.result class.format))
//////.lifted
(class.class version.v6_0 (all modifier#composite class.public class.final)
(name.internal anonymous_class_name)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
index 3f2474f4e..200b4db2e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
@@ -115,14 +115,14 @@
.let [function_class (//runtime.class_name function_context)]
[fields methods instance] (..with generate archive @begin function_class environment arity bodyG)
class (phase.lifted (class.class version.v6_0
- ..modifier
- (name.internal function_class)
- {.#None}
- (..internal /abstract.class) (list)
- fields
- methods
- (sequence.sequence)))
- .let [bytecode [function_class (\\format.result class.writer class)]]
+ ..modifier
+ (name.internal function_class)
+ {.#None}
+ (..internal /abstract.class) (list)
+ fields
+ methods
+ (sequence.sequence)))
+ .let [bytecode [function_class (\\format.result class.format class)]]
_ (generation.execute! bytecode)
_ (generation.save! (product.right function_context) {.#None} bytecode)]
(in instance)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
index 61bd54986..9e33db858 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
@@ -131,7 +131,7 @@
_.return)}))
(sequence.sequence))]
(io.run! (do [! (try.with io.monad)]
- [bytecode (at ! each (\\format.result class.writer)
+ [bytecode (at ! each (\\format.result class.format)
(io.io bytecode))
_ (loader.store eval_class bytecode library)
class (loader.load eval_class loader)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
index 2a89c066d..f902c5261 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
@@ -155,14 +155,14 @@
_.return)})
class (artifact_name context)]
[class
- (<| (\\format.result class.writer)
+ (<| (\\format.result class.format)
try.trusted
(class.class version.v6_0
- ..program::modifier
- (name.internal class)
- {.#None}
- super_class
- (list)
- (list)
- (list main)
- (sequence.sequence)))]))
+ ..program::modifier
+ (name.internal class)
+ {.#None}
+ super_class
+ (list)
+ (list)
+ (list main)
+ (sequence.sequence)))]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
index a182ed733..7f11b6f25 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
@@ -545,27 +545,27 @@
(all modifier#composite
class.public
class.final))
- bytecode (<| (\\format.result class.writer)
+ bytecode (<| (\\format.result class.format)
try.trusted
(class.class jvm/version.v6_0
- modifier
- (name.internal class)
- {.#None}
- (name.internal (..reflection ^Object)) (list)
- (list)
- (let [[left_projection::method right_projection::method] projection::method2]
- (list ..decode_frac::method
- ..variant::method
-
- ..pm_failure::method
-
- ..push::method
- ..case::method
- left_projection::method
- right_projection::method
-
- ..try::method))
- sequence.empty))]
+ modifier
+ (name.internal class)
+ {.#None}
+ (name.internal (..reflection ^Object)) (list)
+ (list)
+ (let [[left_projection::method right_projection::method] projection::method2]
+ (list ..decode_frac::method
+ ..variant::method
+
+ ..pm_failure::method
+
+ ..push::method
+ ..case::method
+ left_projection::method
+ right_projection::method
+
+ ..try::method))
+ sequence.empty))]
(do ////.monad
[_ (generation.execute! [class bytecode])
_ (generation.save! ..artifact_id {.#None} [class bytecode])]
@@ -618,16 +618,16 @@
//function/count.field
#0 //function/count.type
sequence.empty))
- bytecode (<| (\\format.result class.writer)
+ bytecode (<| (\\format.result class.format)
try.trusted
(class.class jvm/version.v6_0
- modifier
- (name.internal class)
- {.#None}
- (name.internal (..reflection ^Object)) (list)
- (list partial_count)
- (list.partial <init>::method apply::method+)
- sequence.empty))]
+ modifier
+ (name.internal class)
+ {.#None}
+ (name.internal (..reflection ^Object)) (list)
+ (list partial_count)
+ (list.partial <init>::method apply::method+)
+ sequence.empty))]
(do ////.monad
[_ (generation.execute! [class bytecode])
... _ (generation.save! //function.artifact_id {.#None} [class bytecode])
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
index 0b4e012cc..fd8a0c817 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
@@ -13,10 +13,10 @@
[data
["[0]" product]
["[0]" binary (.only Binary)
- ["[0]" \\format (.only Writer)]
+ ["[0]" \\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]
["[0]" text (.only)
- ["%" \\format (.only format)]]
+ ["%" \\format]]
[collection
["[0]" list (.use "[1]#[0]" functor mix)]
["[0]" dictionary (.only Dictionary)]
@@ -226,8 +226,8 @@
<binary>.nat
(<binary>.list (<>.and <binary>.text <binary>.nat))))
- (def writer
- (Writer ..Frozen)
+ (def format
+ (Format ..Frozen)
(all \\format.and
\\format.nat
\\format.nat
@@ -243,7 +243,7 @@
{.#Some _} {.#Some [module id]}
{.#None} {.#None})))
[version /#next]
- (\\format.result ..writer))))
+ (\\format.result ..format))))
(exception .public (version_mismatch [expected Version
actual Version])
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
index c67c50d15..b3e186b92 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
@@ -9,7 +9,7 @@
["[0]" product]
["[0]" text]
["[0]" binary
- ["[0]" \\format (.only Writer)]
+ ["[0]" \\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]
[collection
["[0]" set (.only Set)]]]
@@ -61,8 +61,8 @@
set.equivalence
))
-(def .public writer
- (Writer Descriptor)
+(def .public format
+ (Format Descriptor)
(all \\format.and
\\format.text
\\format.text
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
index 4653591a7..64fae1ab4 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
@@ -12,7 +12,7 @@
["[0]" dictionary (.only Dictionary)]]
["[0]" binary
[\\parser (.only Parser)]
- ["[1]" \\format (.only Writer)]]]
+ ["[1]" \\format (.only Format)]]]
[type (.only sharing)
[primitive (.except)]]]]
[///
@@ -59,12 +59,12 @@
(-> (Document Any) Signature)
(|>> representation (the #signature)))
- (def .public (writer content)
- (All (_ d) (-> (Writer d) (Writer (Document d))))
- (let [writer (all binary.and
- signature.writer
+ (def .public (format content)
+ (All (_ d) (-> (Format d) (Format (Document d))))
+ (let [format (all binary.and
+ signature.format
content)]
- (|>> representation writer)))
+ (|>> representation format)))
(def .public (parser key it)
(All (_ d) (-> (Key d) (Parser d) (Parser (Document d))))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
index 9c889fada..f93624fbc 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
@@ -11,10 +11,10 @@
[data
["[0]" product]
["[0]" binary
- ["[1]" \\format (.only Writer)]
+ ["[1]" \\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]
["[0]" text (.only)
- ["%" \\format (.only format)]]
+ ["%" \\format]]
[collection
[set (.only Set)]
["[0]" list]
@@ -104,9 +104,9 @@
(-> Text Registry (Maybe ID))
(maybe#each product.left (find_definition name registry)))
- (def .public writer
- (Writer Registry)
- (let [definition (is (Writer //category.Definition)
+ (def .public format
+ (Format Registry)
+ (let [definition (is (Format //category.Definition)
(all binary.and
binary.text
(binary.maybe
@@ -116,12 +116,12 @@
binary.nat
))
))
- category (is (Writer Category)
+ category (is (Format Category)
(function (_ value)
(case value
- (^.with_template [<nat> <tag> <writer>]
+ (^.with_template [<nat> <tag> <format>]
[{<tag> value}
- ((binary.and binary.nat <writer>) [<nat> value])])
+ ((binary.and binary.nat <format>) [<nat> value])])
([0 //category.#Anonymous binary.any]
[1 //category.#Definition definition]
[2 //category.#Analyser binary.text]
@@ -130,11 +130,11 @@
[5 //category.#Directive binary.text]
[6 //category.#Custom binary.text]))))
mandatory? binary.bit
- dependency (is (Writer unit.ID)
+ dependency (is (Format unit.ID)
(binary.and binary.nat binary.nat))
- dependencies (is (Writer (Set unit.ID))
+ dependencies (is (Format (Set unit.ID))
(binary.set dependency))
- artifacts (is (Writer (Sequence [Category Bit (Set unit.ID)]))
+ artifacts (is (Format (Sequence [Category Bit (Set unit.ID)]))
(binary.sequence_64 (all binary.and category mandatory? dependencies)))]
(|>> representation
(the #artifacts)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
index 086b11c12..e9220d028 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
@@ -8,10 +8,10 @@
[data
["[0]" product]
["[0]" binary
- ["[1]" \\format (.only Writer)]
+ ["[1]" \\format (.only Format)]
["<[1]>" \\parser (.only Parser)]]
["[0]" text (.only)
- ["%" \\format (.only format)]]]
+ ["%" \\format]]]
[math
[number
["[0]" nat]]]
@@ -33,10 +33,10 @@
(def .public (description signature)
(-> Signature Text)
- (format (%.symbol (the #name signature)) " " (version.format (the #version signature))))
+ (%.format (%.symbol (the #name signature)) " " (version.format (the #version signature))))
-(def .public writer
- (Writer Signature)
+(def .public format
+ (Format Signature)
(all binary.and
(binary.and binary.text binary.text)
binary.nat))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/export.lux b/stdlib/source/library/lux/tool/compiler/meta/export.lux
index 4b0621fb9..942391568 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/export.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/export.lux
@@ -70,6 +70,6 @@
(do [! (try.with async.monad)]
[tar (|> sources
(..library fs)
- (at ! each (binary.result tar.writer)))
+ (at ! each (binary.result tar.format)))
.let [/ (at fs separator)]]
(at fs write (format target / ..file) tar)))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
index 48ba3ea69..86960acb0 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
@@ -128,4 +128,4 @@
entries (monad.each ! (..write_module now mapping) order)]
(in (|> entries
sequence.of_list
- (binary.result tar.writer))))))
+ (binary.result tar.format))))))