From b0093a3849baaeb5e12692b2cf6ac65ba74bbd54 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 15 Mar 2022 22:45:49 -0400 Subject: Leaner syntax for library/lux/control/exception.report --- .../library/lux/control/concurrency/semaphore.lux | 2 +- stdlib/source/library/lux/control/exception.lux | 2 +- .../library/lux/control/function/contract.lux | 32 ++++----- .../source/library/lux/control/parser/analysis.lux | 4 +- .../source/library/lux/control/parser/binary.lux | 12 ++-- .../library/lux/control/parser/environment.lux | 26 +++---- stdlib/source/library/lux/control/parser/json.lux | 8 +-- .../library/lux/control/parser/synthesis.lux | 10 +-- stdlib/source/library/lux/control/parser/text.lux | 18 ++--- stdlib/source/library/lux/control/parser/type.lux | 12 ++-- stdlib/source/library/lux/control/parser/xml.lux | 46 ++++++------- stdlib/source/library/lux/control/remember.lux | 58 ++++++++-------- stdlib/source/library/lux/data/binary.lux | 16 ++--- .../library/lux/data/collection/sequence.lux | 5 +- stdlib/source/library/lux/data/format/tar.lux | 24 +++---- stdlib/source/library/lux/data/text/escape.lux | 14 ++-- stdlib/source/library/lux/data/text/regex.lux | 4 +- stdlib/source/library/lux/debug.lux | 31 +++++---- stdlib/source/library/lux/documentation.lux | 2 +- stdlib/source/library/lux/ffi.jvm.lux | 16 ++--- stdlib/source/library/lux/macro/local.lux | 6 +- .../source/library/lux/macro/syntax/definition.lux | 2 +- stdlib/source/library/lux/macro/template.lux | 4 +- stdlib/source/library/lux/math/modular.lux | 62 ++++++++--------- stdlib/source/library/lux/target/jvm/bytecode.lux | 31 +++++---- .../lux/target/jvm/bytecode/environment.lux | 4 +- .../library/lux/target/jvm/encoding/signed.lux | 48 ++++++------- .../library/lux/target/jvm/encoding/unsigned.lux | 54 +++++++-------- stdlib/source/library/lux/target/jvm/loader.lux | 8 +-- .../source/library/lux/target/jvm/reflection.lux | 30 ++++---- stdlib/source/library/lux/target/jvm/type/lux.lux | 60 ++++++++-------- stdlib/source/library/lux/test.lux | 26 +++---- stdlib/source/library/lux/time.lux | 10 +-- stdlib/source/library/lux/time/date.lux | 16 ++--- stdlib/source/library/lux/time/day.lux | 12 ++-- stdlib/source/library/lux/time/month.lux | 12 ++-- stdlib/source/library/lux/tool/compiler.lux | 2 +- .../library/lux/tool/compiler/default/platform.lux | 18 ++--- .../compiler/language/lux/analysis/coverage.lux | 12 ++-- .../compiler/language/lux/analysis/inference.lux | 10 +-- .../tool/compiler/language/lux/analysis/macro.lux | 12 ++-- .../tool/compiler/language/lux/analysis/module.lux | 42 ++++++------ .../lux/tool/compiler/language/lux/generation.lux | 10 +-- .../tool/compiler/language/lux/phase/analysis.lux | 2 +- .../compiler/language/lux/phase/analysis/case.lux | 26 +++---- .../language/lux/phase/analysis/complex.lux | 44 ++++++------ .../language/lux/phase/analysis/function.lux | 22 +++--- .../language/lux/phase/analysis/reference.lux | 10 +-- .../tool/compiler/language/lux/phase/directive.lux | 6 +- .../tool/compiler/language/lux/phase/extension.lux | 22 +++--- .../language/lux/phase/extension/analysis/jvm.lux | 60 ++++++++-------- .../language/lux/phase/extension/analysis/lux.lux | 4 +- .../language/lux/phase/extension/directive/lux.lux | 10 +-- .../language/lux/phase/generation/jvm/host.lux | 12 ++-- .../language/lux/phase/synthesis/function.lux | 4 +- .../language/lux/phase/synthesis/variable.lux | 2 +- .../lux/tool/compiler/language/lux/program.lux | 2 +- .../lux/tool/compiler/language/lux/syntax.lux | 14 ++-- .../library/lux/tool/compiler/meta/archive.lux | 16 ++--- .../tool/compiler/meta/archive/module/document.lux | 4 +- .../lux/tool/compiler/meta/archive/registry.lux | 2 +- .../lux/tool/compiler/meta/cache/module.lux | 6 +- .../library/lux/tool/compiler/meta/import.lux | 4 +- .../library/lux/tool/compiler/meta/io/context.lux | 6 +- stdlib/source/library/lux/type/check.lux | 20 +++--- stdlib/source/library/lux/type/dynamic.lux | 34 ++++----- stdlib/source/library/lux/type/resource.lux | 52 +++++++------- stdlib/source/library/lux/world/file.lux | 6 +- stdlib/source/library/lux/world/file/watch.lux | 2 +- stdlib/source/library/lux/world/program.lux | 2 +- stdlib/source/program/aedifex.lux | 8 +-- .../source/program/aedifex/artifact/time/date.lux | 52 +++++++------- stdlib/source/program/aedifex/command/deps.lux | 26 +++---- .../program/aedifex/dependency/resolution.lux | 10 +-- stdlib/source/program/aedifex/hash.lux | 12 ++-- stdlib/source/program/aedifex/project.lux | 6 +- .../source/program/aedifex/repository/remote.lux | 4 +- stdlib/source/program/aedifex/runtime.lux | 2 +- stdlib/source/test/aedifex/repository.lux | 80 +++++++++++----------- stdlib/source/test/lux/control/exception.lux | 38 +++++----- 80 files changed, 735 insertions(+), 730 deletions(-) (limited to 'stdlib') diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index d30da93b7..753b32dff 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -67,7 +67,7 @@ (exception: .public (semaphore_is_maxed_out [max_positions Nat]) (exception.report - ["Max Positions" (%.nat max_positions)])) + "Max Positions" (%.nat max_positions))) (def: .public (signal! semaphore) (Ex (_ k) (-> Semaphore (Async (Try Int)))) diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index 942ebbfd8..ff25a2891 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -137,7 +137,7 @@ (on_entry head) tail)))) -(syntax: .public (report [entries (<>.many (.tuple (<>.and .any .any)))]) +(syntax: .public (report [entries (<>.many (<>.and .any .any))]) (in (list (` ((~! ..report') (list (~+ (|> entries (list#each (function (_ [header message]) (` [(~ header) (~ message)]))))))))))) diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index 388a5d3f0..b36aa75c6 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -1,24 +1,24 @@ (.using - [library - [lux "*" - [control - ["[0]" exception {"+" exception:}] - [parser - ["<[0]>" code]]] - [data - [text - ["%" format {"+" format}]]] - [macro {"+" with_symbols} - [syntax {"+" syntax:}] - ["[0]" code]] - [math - [number - ["i" int]]]]]) + [library + [lux "*" + [control + ["[0]" exception {"+" exception:}] + [parser + ["<[0]>" code]]] + [data + [text + ["%" format {"+" format}]]] + [macro {"+" with_symbols} + [syntax {"+" syntax:}] + ["[0]" code]] + [math + [number + ["i" int]]]]]) (template [] [(exception: .public ( [condition Code]) (exception.report - ["Condition" (%.code condition)]))] + "Condition" (%.code condition)))] [pre_condition_failed] [post_condition_failed] diff --git a/stdlib/source/library/lux/control/parser/analysis.lux b/stdlib/source/library/lux/control/parser/analysis.lux index 0d1fb35c5..2ea814f3d 100644 --- a/stdlib/source/library/lux/control/parser/analysis.lux +++ b/stdlib/source/library/lux/control/parser/analysis.lux @@ -42,11 +42,11 @@ (exception: .public (cannot_parse [input (List Analysis)]) (exception.report - ["Input" (exception.listing /.format input)])) + "Input" (exception.listing /.format input))) (exception: .public (unconsumed_input [input (List Analysis)]) (exception.report - ["Input" (exception.listing /.format input)])) + "Input" (exception.listing /.format input))) (type: .public Parser (//.Parser (List Analysis))) diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux index a9ed31dbd..ba305659a 100644 --- a/stdlib/source/library/lux/control/parser/binary.lux +++ b/stdlib/source/library/lux/control/parser/binary.lux @@ -36,8 +36,8 @@ (exception: .public (binary_was_not_fully_read [binary_length Nat bytes_read Nat]) (exception.report - ["Binary length" (%.nat binary_length)] - ["Bytes read" (%.nat bytes_read)])) + "Binary length" (%.nat binary_length) + "Bytes read" (%.nat bytes_read))) (def: .public (result parser input) (All (_ a) (-> (Parser a) Binary (Try a))) @@ -106,8 +106,8 @@ (exception: .public (invalid_tag [range Nat byte Nat]) (exception.report - ["Tag range" (%.nat range)] - ["Tag value" (%.nat byte)])) + "Tag range" (%.nat range) + "Tag value" (%.nat byte))) (template: (!variant +) [(do [! //.monad] @@ -138,8 +138,8 @@ (exception: .public (not_a_bit [value Nat]) (exception.report - ["Expected values" "either 0 or 1"] - ["Actual value" (%.nat value)])) + "Expected values" "either 0 or 1" + "Actual value" (%.nat value))) (def: .public bit (Parser Bit) diff --git a/stdlib/source/library/lux/control/parser/environment.lux b/stdlib/source/library/lux/control/parser/environment.lux index 50e58078d..a844787f7 100644 --- a/stdlib/source/library/lux/control/parser/environment.lux +++ b/stdlib/source/library/lux/control/parser/environment.lux @@ -1,16 +1,16 @@ (.using - [library - [lux "*" - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}]] - [data - ["[0]" product] - ["[0]" text - ["%" format {"+" format}]] - [collection - ["[0]" dictionary {"+" Dictionary}]]]]] - ["[0]" //]) + [library + [lux "*" + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}]] + [data + ["[0]" product] + ["[0]" text + ["%" format {"+" format}]] + [collection + ["[0]" dictionary {"+" Dictionary}]]]]] + ["[0]" //]) (type: .public Property Text) @@ -20,7 +20,7 @@ (exception: .public (unknown_property [property Property]) (exception.report - ["Property" (%.text property)])) + "Property" (%.text property))) (type: .public (Parser a) (//.Parser Environment a)) diff --git a/stdlib/source/library/lux/control/parser/json.lux b/stdlib/source/library/lux/control/parser/json.lux index f17c4c763..c146ec5d3 100644 --- a/stdlib/source/library/lux/control/parser/json.lux +++ b/stdlib/source/library/lux/control/parser/json.lux @@ -27,7 +27,7 @@ (exception: .public (unconsumed_input [input (List JSON)]) (exception.report - ["Input" (exception.listing /.format input)])) + "Input" (exception.listing /.format input))) (exception: .public empty_input) @@ -57,7 +57,7 @@ (exception: .public (unexpected_value [value JSON]) (exception.report - ["Value" (/.format value)])) + "Value" (/.format value))) (template [ ] [(def: .public @@ -80,8 +80,8 @@ (exception: .public [a] (value_mismatch [reference JSON sample JSON]) (exception.report - ["Reference" (/.format reference)] - ["Sample" (/.format sample)])) + "Reference" (/.format reference) + "Sample" (/.format sample))) (template [ ] [(def: .public ( test) diff --git a/stdlib/source/library/lux/control/parser/synthesis.lux b/stdlib/source/library/lux/control/parser/synthesis.lux index 66976a680..6f59a9680 100644 --- a/stdlib/source/library/lux/control/parser/synthesis.lux +++ b/stdlib/source/library/lux/control/parser/synthesis.lux @@ -30,21 +30,21 @@ (exception: .public (cannot_parse [input (List Synthesis)]) (exception.report - ["Input" (exception.listing /.%synthesis input)])) + "Input" (exception.listing /.%synthesis input))) (exception: .public (unconsumed_input [input (List Synthesis)]) (exception.report - ["Input" (exception.listing /.%synthesis input)])) + "Input" (exception.listing /.%synthesis input))) (exception: .public (expected_empty_input [input (List Synthesis)]) (exception.report - ["Input" (exception.listing /.%synthesis input)])) + "Input" (exception.listing /.%synthesis input))) (exception: .public (wrong_arity [expected Arity actual Arity]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)])) + "Expected" (%.nat expected) + "Actual" (%.nat actual))) (exception: .public empty_input) diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux index 4767ef744..239ddf3bc 100644 --- a/stdlib/source/library/lux/control/parser/text.lux +++ b/stdlib/source/library/lux/control/parser/text.lux @@ -43,15 +43,15 @@ (exception: .public (unconsumed_input [offset Offset tape Text]) (exception.report - ["Offset" (n#encoded offset)] - ["Input size" (n#encoded (/.size tape))] - ["Remaining input" (..left_over offset tape)])) + "Offset" (n#encoded offset) + "Input size" (n#encoded (/.size tape)) + "Remaining input" (..left_over offset tape))) (exception: .public (expected_to_fail [offset Offset tape Text]) (exception.report - ["Offset" (n#encoded offset)] - ["Input" (..left_over offset tape)])) + "Offset" (n#encoded offset) + "Input" (..left_over offset tape))) (exception: .public cannot_parse) (exception: .public cannot_slice) @@ -123,7 +123,7 @@ (exception: .public (cannot_match [reference Text]) (exception.report - ["Reference" (/.format reference)])) + "Reference" (/.format reference))) (def: .public (this reference) (-> Text (Parser Any)) @@ -200,8 +200,8 @@ [(exception: .public ( [options Text character Char]) (exception.report - ["Options" (/.format options)] - ["Character" (/.format (/.of_char character))]))] + "Options" (/.format options) + "Character" (/.format (/.of_char character))))] [character_should_be] [character_should_not_be] @@ -247,7 +247,7 @@ (exception: .public (character_does_not_satisfy_predicate [character Char]) (exception.report - ["Character" (/.format (/.of_char character))])) + "Character" (/.format (/.of_char character)))) (def: .public (satisfies parser) (-> (-> Char Bit) (Parser Text)) diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux index 726454fe0..8550ce29f 100644 --- a/stdlib/source/library/lux/control/parser/type.lux +++ b/stdlib/source/library/lux/control/parser/type.lux @@ -29,7 +29,7 @@ (template [] [(exception: .public ( [type Type]) (exception.report - ["Type" (%.type type)]))] + "Type" (%.type type)))] [not_existential] [not_recursive] @@ -47,8 +47,8 @@ [(exception: .public ( [expected Type actual Type]) (exception.report - ["Expected" (%.type expected)] - ["Actual" (%.type actual)]))] + "Expected" (%.type expected) + "Actual" (%.type actual)))] [types_do_not_match] [wrong_parameter] @@ -58,9 +58,9 @@ (exception: .public (unconsumed_input [remaining (List Type)]) (exception.report - ["Types" (|> remaining - (list#each (|>> %.type (format text.new_line "* "))) - (text.interposed ""))])) + "Types" (|> remaining + (list#each (|>> %.type (format text.new_line "* "))) + (text.interposed "")))) (type: .public Env (Dictionary Nat [Type Code])) diff --git a/stdlib/source/library/lux/control/parser/xml.lux b/stdlib/source/library/lux/control/parser/xml.lux index 7e93ef8ae..45c6cf178 100644 --- a/stdlib/source/library/lux/control/parser/xml.lux +++ b/stdlib/source/library/lux/control/parser/xml.lux @@ -1,22 +1,22 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["[0]" try {"+" Try} ("[1]#[0]" functor)] - ["[0]" exception {"+" exception:}]] - [data - ["[0]" text - ["%" format {"+" format}]] - [collection - ["[0]" list] - ["[0]" dictionary]] - [format - ["/" xml {"+" Attribute Attrs Tag XML}]]] - [meta - ["[0]" symbol ("[1]#[0]" equivalence codec)]]]] - ["[0]" //]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["[0]" try {"+" Try} ("[1]#[0]" functor)] + ["[0]" exception {"+" exception:}]] + [data + ["[0]" text + ["%" format {"+" format}]] + [collection + ["[0]" list] + ["[0]" dictionary]] + [format + ["/" xml {"+" Attribute Attrs Tag XML}]]] + [meta + ["[0]" symbol ("[1]#[0]" equivalence codec)]]]] + ["[0]" //]) (type: .public (Parser a) (//.Parser [Attrs (List XML)] a)) @@ -27,18 +27,18 @@ (exception: .public (wrong_tag [expected Tag actual Tag]) (exception.report - ["Expected" (%.text (/.tag expected))] - ["Actual" (%.text (/.tag actual))])) + "Expected" (%.text (/.tag expected)) + "Actual" (%.text (/.tag actual)))) (exception: .public (unknown_attribute [expected Attribute available (List Attribute)]) (exception.report - ["Expected" (%.text (/.attribute expected))] - ["Available" (exception.listing (|>> /.attribute %.text) available)])) + "Expected" (%.text (/.attribute expected)) + "Available" (exception.listing (|>> /.attribute %.text) available))) (exception: .public (unconsumed_inputs [inputs (List XML)]) (exception.report - ["Inputs" (exception.listing (# /.codec encoded) inputs)])) + "Inputs" (exception.listing (# /.codec encoded) inputs))) (def: (result' parser attrs documents) (All (_ a) (-> (Parser a) Attrs (List XML) (Try a))) diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux index 37003f746..3a895593e 100644 --- a/stdlib/source/library/lux/control/remember.lux +++ b/stdlib/source/library/lux/control/remember.lux @@ -1,40 +1,40 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["[0]" io] - ["[0]" try] - ["[0]" exception {"+" exception:}] - ["<>" parser ("[1]#[0]" functor) - ["" code {"+" Parser}]]] - [data - ["[0]" text - ["%" format {"+" format}]]] - [time - ["[0]" instant] - ["[0]" date {"+" Date} ("[1]#[0]" order)]] - ["[0]" meta] - [macro - ["[0]" code] - ["[0]" template] - [syntax {"+" syntax:}]]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["[0]" io] + ["[0]" try] + ["[0]" exception {"+" exception:}] + ["<>" parser ("[1]#[0]" functor) + ["" code {"+" Parser}]]] + [data + ["[0]" text + ["%" format {"+" format}]]] + [time + ["[0]" instant] + ["[0]" date {"+" Date} ("[1]#[0]" order)]] + ["[0]" meta] + [macro + ["[0]" code] + ["[0]" template] + [syntax {"+" syntax:}]]]]) (exception: .public (must_remember [deadline Date today Date message Text focus (Maybe Code)]) (exception.report - ["Deadline" (%.date deadline)] - ["Today" (%.date today)] - ["Message" message] - ["Code" (case focus - {.#Some focus} - (%.code focus) + "Deadline" (%.date deadline) + "Today" (%.date today) + "Message" message + "Code" (case focus + {.#Some focus} + (%.code focus) - {.#None} - "")])) + {.#None} + ""))) (def: deadline (Parser Date) diff --git a/stdlib/source/library/lux/data/binary.lux b/stdlib/source/library/lux/data/binary.lux index be2a236ea..4baadaf05 100644 --- a/stdlib/source/library/lux/data/binary.lux +++ b/stdlib/source/library/lux/data/binary.lux @@ -43,8 +43,8 @@ (exception: .public (index_out_of_bounds [size Nat index Nat]) (exception.report - ["Size" (%.nat size)] - ["Index" (%.nat index)])) + "Size" (%.nat size) + "Index" (%.nat index))) (template [ ] [(def: .public ( index it) @@ -82,9 +82,9 @@ source_input Nat target_output Nat]) (exception.report - ["Bytes" (%.nat bytes)] - ["Source input space" (%.nat source_input)] - ["Target output space" (%.nat target_output)])) + "Bytes" (%.nat bytes) + "Source input space" (%.nat source_input) + "Target output space" (%.nat target_output))) (def: .public (copy bytes source_offset source target_offset target) (-> Nat Nat Binary Nat Binary (Try Binary)) @@ -99,9 +99,9 @@ offset Nat length Nat]) (exception.report - ["Size" (%.nat size)] - ["Offset" (%.nat offset)] - ["Length" (%.nat length)])) + "Size" (%.nat size) + "Offset" (%.nat offset) + "Length" (%.nat length))) (def: .public (slice offset length binary) (-> Nat Nat Binary (Try Binary)) diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 8e9340a6f..34a3e512d 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -243,8 +243,9 @@ (exception: .public [a] (index_out_of_bounds [sequence (Sequence a) index Nat]) - (exception.report ["Size" (# n.decimal encoded (the #size sequence))] - ["Index" (# n.decimal encoded index)])) + (exception.report + "Size" (# n.decimal encoded (the #size sequence)) + "Index" (# n.decimal encoded index))) (exception: base_was_not_found) diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 0d79977b1..567d1a10a 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -69,8 +69,8 @@ (exception: .public ( [value Nat]) (exception.report - ["Value" (%.nat value)] - ["Maximum" (%.nat (-- ))])) + "Value" (%.nat value) + "Maximum" (%.nat (-- )))) (abstract: .public Nat @@ -115,8 +115,8 @@ (exception: .public (wrong_character [expected Char actual Char]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)])) + "Expected" (%.nat expected) + "Actual" (%.nat actual))) (def: small_suffix (Parser Any) @@ -224,7 +224,7 @@ (exception: .public (not_ascii [text Text]) (exception.report - ["Text" (%.text text)])) + "Text" (%.text text))) (def: .public name_size Size 31) (def: .public path_size Size 99) @@ -251,9 +251,9 @@ (exception: .public ( [value Text]) (exception.report - ["Value" (%.text value)] - ["Size" (%.nat (text.size value))] - ["Maximum" (%.nat )])) + "Value" (%.text value) + "Size" (%.nat (text.size value)) + "Maximum" (%.nat ))) (def: .public ( value) (-> (Try )) @@ -422,7 +422,7 @@ (exception: .public (invalid_link_flag [value Nat]) (exception.report - ["Value" (%.nat value)])) + "Value" (%.nat value))) (def: link_flag_parser (Parser Link_Flag) @@ -461,7 +461,7 @@ (exception: .public (invalid_mode [value Nat]) (exception.report - ["Value" (%.nat value)])) + "Value" (%.nat value))) (with_expansions [ (as_is ["0000" none] @@ -746,8 +746,8 @@ (exception: .public (wrong_checksum [expected Nat actual Nat]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)])) + "Expected" (%.nat expected) + "Actual" (%.nat actual))) (def: header_padding_size (n.- header_size block_size)) diff --git a/stdlib/source/library/lux/data/text/escape.lux b/stdlib/source/library/lux/data/text/escape.lux index ec2adf129..3209c406d 100644 --- a/stdlib/source/library/lux/data/text/escape.lux +++ b/stdlib/source/library/lux/data/text/escape.lux @@ -143,22 +143,22 @@ (exception: .public (dangling_escape [text Text]) (exception.report - ["In" (%.text text)] - ["At" (%.nat (-- (//.size text)))])) + "In" (%.text text) + "At" (%.nat (-- (//.size text))))) (exception: .public (invalid_escape [text Text offset Nat sigil Char]) (exception.report - ["In" (%.text text)] - ["At" (%.nat offset)] - ["Name" (%.text (//.of_char sigil))])) + "In" (%.text text) + "At" (%.nat offset) + "Name" (%.text (//.of_char sigil)))) (exception: .public (invalid_unicode_escape [text Text offset Nat]) (exception.report - ["In" (%.text text)] - ["At" (%.nat offset)])) + "In" (%.text text) + "At" (%.nat offset))) (def: code_size 4) diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index 02a9d8de5..0e048bdcd 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -233,8 +233,8 @@ (exception: .public (incorrect_quantification [from Nat to Nat]) (exception.report - ["Input" (format (%.nat from) "," (%.nat to))] - ["Should be" (format (%.nat to) "," (%.nat from))])) + "Input" (format (%.nat from) "," (%.nat to)) + "Should be" (format (%.nat to) "," (%.nat from)))) (def: (re_counted_quantified^ current_module) (-> Text (Parser Code)) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index c4bf1f96a..d4665f058 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -23,7 +23,7 @@ ["[0]" json]] [collection ["[0]" array] - ["[0]" list ("[1]#[0]" functor)] + ["[0]" list ("[1]#[0]" monad)] ["[0]" dictionary]]] [macro ["^" pattern] @@ -382,7 +382,7 @@ (exception: .public (cannot_represent_value [type Type]) (exception.report - ["Type" (%.type type)])) + "Type" (%.type type))) (type: Representation (-> Any Text)) @@ -535,8 +535,8 @@ (exception: .public (type_hole [location Location type Type]) (exception.report - ["Location" (%.location location)] - ["Type" (%.type type)])) + "Location" (%.location location) + "Type" (%.type type))) (syntax: .public (:hole []) (do meta.monad @@ -556,7 +556,7 @@ (exception: .public (unknown_local_binding [name Text]) (exception.report - ["Name" (%.text name)])) + "Name" (%.text name))) (syntax: .public (here [targets (: (.Parser (List Target)) (|> ..target @@ -588,13 +588,14 @@ (in (list (` (..log! ("lux text concat" (~ (code.text (%.format (%.location location) text.new_line))) ((~! exception.report) - (~+ (list#each (function (_ [name format]) - (let [format (case format - {.#None} - (` (~! ..inspection)) - - {.#Some format} - format)] - (` [(~ (code.text name)) - ((~ format) (~ (code.local_symbol name)))]))) - targets)))))))))) + (~+ (|> targets + (list#each (function (_ [name format]) + (let [format (case format + {.#None} + (` (~! ..inspection)) + + {.#Some format} + format)] + (list (code.text name) + (` ((~ format) (~ (code.local_symbol name)))))))) + list#conjoint)))))))))) diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 1576770d5..f6640a9b2 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -452,7 +452,7 @@ (exception: .public (unqualified_symbol [name Symbol]) (exception.report - ["Name" (%.symbol name)])) + "Name" (%.symbol name))) (def: qualified_symbol (Parser Symbol) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 6ef0e751b..f9d3dd004 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -552,13 +552,13 @@ (exception: .public (class_names_cannot_contain_periods [name Text]) (exception.report - ["Name" (%.text name)])) + "Name" (%.text name))) (exception: .public (class_name_cannot_be_a_type_variable [name Text type_vars (List (Type Var))]) (exception.report - ["Name" (%.text name)] - ["Type Variables" (exception.listing parser.name type_vars)])) + "Name" (%.text name) + "Type Variables" (exception.listing parser.name type_vars))) (def: (assertion exception payload test) (All (_ e) (-> (Exception e) e Bit (Parser Any))) @@ -591,8 +591,8 @@ (exception: .public (unknown_type_variable [name Text type_vars (List (Type Var))]) (exception.report - ["Unexpected Type Variable" (%.text name)] - ["Expected Type Variables" (exception.listing parser.name type_vars)])) + "Unexpected Type Variable" (%.text name) + "Expected Type Variables" (exception.listing parser.name type_vars))) (def: (type_variable options) (-> (List (Type Var)) (Parser (Type Parameter))) @@ -1696,7 +1696,7 @@ (exception: .public (cannot_convert_to_jvm_type [type .Type]) (exception.report - ["Lux Type" (%.type type)])) + "Lux Type" (%.type type))) (with_expansions [ (as_is (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))] (def: (lux_type->jvm_type context type) @@ -1918,8 +1918,8 @@ (exception: .public (cannot_cast_to_non_object [type (Type Value)]) (exception.report - ["Signature" (..signature type)] - ["Reflection" (..reflection type)])) + "Signature" (..signature type) + "Reflection" (..reflection type))) (syntax: .public (:as [type (..type^ (list)) object .any]) diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux index a01e438de..0e9bd029b 100644 --- a/stdlib/source/library/lux/macro/local.lux +++ b/stdlib/source/library/lux/macro/local.lux @@ -19,14 +19,14 @@ (exception: .public (unknown_module [module Text]) (exception.report - ["Module" (text.format module)])) + "Module" (text.format module))) (template [] [(exception: .public ( [module Text definition Text]) (exception.report - ["Module" (text.format module)] - ["Definition" (text.format definition)]))] + "Module" (text.format module) + "Definition" (text.format definition)))] [cannot_shadow_definition] [unknown_definition] diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux index f889c3dfa..c6b914bf3 100644 --- a/stdlib/source/library/lux/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/macro/syntax/definition.lux @@ -82,7 +82,7 @@ (exception: .public (lacks_type [definition Definition]) (exception.report - ["Definition" (%.code (..format definition))])) + "Definition" (%.code (..format definition)))) (def: .public (typed compiler) (-> Lux (Parser Definition)) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index df2064f4a..247c752c7 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -126,8 +126,8 @@ (exception: .public (irregular_arguments [expected Nat actual Nat]) (exception.report - ["Expected" (# nat.decimal encoded expected)] - ["Actual" (# nat.decimal encoded actual)])) + "Expected" (# nat.decimal encoded expected) + "Actual" (# nat.decimal encoded actual))) (def: (macro (open "_[0]")) (-> Local Macro) diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index 56e17b362..f556c1404 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -1,31 +1,31 @@ (.using - [library - [lux "*" - [abstract - [equivalence {"+" Equivalence}] - [order {"+" Order}] - [monoid {"+" Monoid}] - [codec {"+" Codec}] - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - ["<>" parser - ["<[0]>" text {"+" Parser}] - ["<[0]>" code]]] - [data - ["[0]" product] - ["[0]" text ("[1]#[0]" monoid)]] - [macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - [number - ["i" int ("[1]#[0]" decimal)]]] - [type - abstract]]] - ["[0]" // "_" - ["[1]" modulus {"+" Modulus}]]) + [library + [lux "*" + [abstract + [equivalence {"+" Equivalence}] + [order {"+" Order}] + [monoid {"+" Monoid}] + [codec {"+" Codec}] + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + ["<>" parser + ["<[0]>" text {"+" Parser}] + ["<[0]>" code]]] + [data + ["[0]" product] + ["[0]" text ("[1]#[0]" monoid)]] + [macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + [number + ["i" int ("[1]#[0]" decimal)]]] + [type + abstract]]] + ["[0]" // "_" + ["[1]" modulus {"+" Modulus}]]) (abstract: .public (Mod m) (Record @@ -49,8 +49,8 @@ (exception: .public [%] (incorrect_modulus [modulus (Modulus %) parsed Int]) (exception.report - ["Expected" (i#encoded (//.divisor modulus))] - ["Actual" (i#encoded parsed)])) + "Expected" (i#encoded (//.divisor modulus)) + "Actual" (i#encoded parsed))) (def: separator " mod ") @@ -143,8 +143,8 @@ (exception: .public [r% s%] (moduli_are_not_equal [reference (Modulus r%) subject (Modulus s%)]) (exception.report - ["Reference" (i#encoded (//.divisor reference))] - ["Subject" (i#encoded (//.divisor subject))])) + "Reference" (i#encoded (//.divisor reference)) + "Subject" (i#encoded (//.divisor subject)))) (def: .public (adapter reference subject) (All (_ r% s%) diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 690d5f62b..895d84f7a 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -128,7 +128,7 @@ (exception: .public (label_has_already_been_set [label Label]) (exception.report - ["Label" (%.nat label)])) + "Label" (%.nat label))) (exception: .public (mismatched_environments [instruction Symbol label Label @@ -136,11 +136,11 @@ expected Stack actual Stack]) (exception.report - ["Instruction" (%.symbol instruction)] - ["Label" (%.nat label)] - ["Address" (/address.format address)] - ["Expected" (/stack.format expected)] - ["Actual" (/stack.format actual)])) + "Instruction" (%.symbol instruction) + "Label" (%.nat label) + "Address" (/address.format address) + "Expected" (/stack.format expected) + "Actual" (/stack.format actual))) (def: .public (set? label) (-> Label (Bytecode (Maybe [Stack Address]))) @@ -677,7 +677,7 @@ (exception: .public (invalid_register [id Nat]) (exception.report - ["ID" (%.nat id)])) + "ID" (%.nat id))) (def: (register id) (-> Nat (Bytecode Register)) @@ -779,15 +779,15 @@ (exception: .public (unknown_label [label Label]) (exception.report - ["Label" (%.nat label)])) + "Label" (%.nat label))) (exception: .public (cannot_do_a_big_jump [label Label @from Address jump Big_Jump]) (exception.report - ["Label" (%.nat label)] - ["Start" (|> @from /address.value //unsigned.value %.nat)] - ["Target" (|> jump //signed.value %.int)])) + "Label" (%.nat label) + "Start" (|> @from /address.value //unsigned.value %.nat) + "Target" (|> jump //signed.value %.int))) (type: Any_Jump (Either Big_Jump @@ -807,7 +807,7 @@ (exception: .public (unset_label [label Label]) (exception.report - ["Label" (%.nat label)])) + "Label" (%.nat label))) (def: (resolve_label label resolver) (-> Label Resolver (Try [Stack Address])) @@ -1039,7 +1039,8 @@ (..bytecode $0 $0 (/registry.for register) _.iinc [register increase]))) (exception: .public (multiarray_cannot_be_zero_dimensional [class (Type Object)]) - (exception.report ["Class" (..reflection class)])) + (exception.report + "Class" (..reflection class))) (def: .public (multianewarray class dimensions) (-> (Type Object) U1 (Bytecode Any)) @@ -1126,8 +1127,8 @@ (exception: .public (invalid_range_for_try [start Address end Address]) (exception.report - ["Start" (|> start /address.value //unsigned.value %.nat)] - ["End" (|> end /address.value //unsigned.value %.nat)])) + "Start" (|> start /address.value //unsigned.value %.nat) + "End" (|> end /address.value //unsigned.value %.nat))) (def: .public (try @start @end @handler catch) (-> Label Label Label (Type Class) (Bytecode Any)) diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux index 222bd7c0e..2f99d83c0 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.format expected) + "Actual" (/stack.format actual))) (def: .public (continue expected environment) (-> Stack Environment (Try [Stack Environment])) diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux index d33321b60..dba35fc11 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux @@ -1,26 +1,26 @@ (.using - [library - [lux {"-" int} - [abstract - [equivalence {"+" Equivalence}] - [order {"+" Order}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}]] - [data - [text - ["%" format {"+" format}]] - ["[0]" format "_" - ["[1]" binary {"+" Writer}]]] - [macro - ["[0]" template]] - [math - [number - ["[0]" i64] - ["n" nat] - ["i" int]]] - [type - abstract]]]) + [library + [lux {"-" int} + [abstract + [equivalence {"+" Equivalence}] + [order {"+" Order}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}]] + [data + [text + ["%" format {"+" format}]] + ["[0]" format "_" + ["[1]" binary {"+" Writer}]]] + [macro + ["[0]" template]] + [math + [number + ["[0]" i64] + ["n" nat] + ["i" int]]] + [type + abstract]]]) (abstract: .public (Signed brand) Int @@ -44,8 +44,8 @@ (exception: .public (value_exceeds_the_scope [value Int scope Nat]) (exception.report - ["Value" (%.int value)] - ["Scope (in bytes)" (%.nat scope)])) + "Value" (%.int value) + "Scope (in bytes)" (%.nat scope))) (template [ <+> <->] [(with_expansions [ (template.symbol [ "'"])] diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux index 2ff122464..795f30716 100644 --- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux @@ -1,25 +1,25 @@ (.using - [library - [lux {"-" nat} - [abstract - [equivalence {"+" Equivalence}] - [order {"+" Order}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}]] - [data - [text - ["%" format {"+" format}]] - ["[0]" format "_" - ["[1]" binary {"+" Writer}]]] - [macro - ["[0]" template]] - [math - [number - ["n" nat] - ["[0]" i64]]] - [type - abstract]]]) + [library + [lux {"-" nat} + [abstract + [equivalence {"+" Equivalence}] + [order {"+" Order}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}]] + [data + [text + ["%" format {"+" format}]] + ["[0]" format "_" + ["[1]" binary {"+" Writer}]]] + [macro + ["[0]" template]] + [math + [number + ["n" nat] + ["[0]" i64]]] + [type + abstract]]]) (abstract: .public (Unsigned brand) Nat @@ -46,18 +46,18 @@ value Nat maximum (Unsigned Any)]) (exception.report - ["Type" (%.symbol type)] - ["Value" (%.nat value)] - ["Maximum" (%.nat (:representation maximum))])) + "Type" (%.symbol type) + "Value" (%.nat value) + "Maximum" (%.nat (:representation maximum)))) (exception: .public [brand] (subtraction_cannot_yield_negative_value [type Symbol parameter (Unsigned brand) subject (Unsigned brand)]) (exception.report - ["Type" (%.symbol type)] - ["Parameter" (%.nat (:representation parameter))] - ["Subject" (%.nat (:representation subject))])) + "Type" (%.symbol type) + "Parameter" (%.nat (:representation parameter)) + "Subject" (%.nat (:representation subject)))) (template [ <+> <-> ] [(with_expansions [ (template.symbol [ "'"])] diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index 5b0a65bb5..71d6dc712 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -24,17 +24,17 @@ (exception: .public (already_stored [class Text]) (exception.report - ["Class" class])) + "Class" class)) (exception: .public (unknown [class Text]) (exception.report - ["Class" class])) + "Class" class)) (exception: .public (cannot_define [class Text error Text]) (exception.report - ["Class" class] - ["Error" error])) + "Class" class + "Error" error)) (import: java/lang/Object "[1]::[0]" diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index fd3900ee6..c8daea629 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -98,13 +98,13 @@ (exception: .public (unknown_class [class External]) (exception.report - ["Class" (%.text class)])) + "Class" (%.text class))) (template [] [(exception: .public ( [jvm_type java/lang/reflect/Type]) (exception.report - ["Type" (java/lang/reflect/Type::getTypeName jvm_type)] - ["Class" (|> jvm_type java/lang/Object::getClass java/lang/Object::toString)]))] + "Type" (java/lang/reflect/Type::getTypeName jvm_type) + "Class" (|> jvm_type java/lang/Object::getClass java/lang/Object::toString)))] [not_a_class] [cannot_convert_to_a_lux_type] @@ -270,22 +270,22 @@ (exception: .public (cannot_correspond [class (java/lang/Class java/lang/Object) type Type]) (exception.report - ["Class" (java/lang/Object::toString class)] - ["Type" (%.type type)])) + "Class" (java/lang/Object::toString class) + "Type" (%.type type))) (exception: .public (type_parameter_mismatch [expected Nat actual Nat class (java/lang/Class java/lang/Object) type Type]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)] - ["Class" (java/lang/Object::toString class)] - ["Type" (%.type type)])) + "Expected" (%.nat expected) + "Actual" (%.nat actual) + "Class" (java/lang/Object::toString class) + "Type" (%.type type))) (exception: .public (non_jvm_type [type Type]) (exception.report - ["Type" (%.type type)])) + "Type" (%.type type))) (def: .public (correspond class type) (-> (java/lang/Class java/lang/Object) Type (Try Mapping)) @@ -331,16 +331,16 @@ owner (java/lang/Class java/lang/Object) target (java/lang/Class java/lang/Object)]) (exception.report - ["Field" (java/lang/Object::toString field)] - ["Owner" (java/lang/Object::toString owner)] - ["Target" (java/lang/Object::toString target)])) + "Field" (java/lang/Object::toString field) + "Owner" (java/lang/Object::toString owner) + "Target" (java/lang/Object::toString target))) (template [] [(exception: .public ( [field Text class (java/lang/Class java/lang/Object)]) (exception.report - ["Field" (%.text field)] - ["Class" (java/lang/Object::toString class)]))] + "Field" (%.text field) + "Class" (java/lang/Object::toString class)))] [unknown_field] [not_a_static_field] diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux index 4fee901cf..c89fabc2a 100644 --- a/stdlib/source/library/lux/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/target/jvm/type/lux.lux @@ -1,33 +1,33 @@ (.using - [library - [lux {"-" Primitive int char type} - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception {"+" exception:}] - ["<>" parser ("[1]#[0]" monad) - ["<[0]>" text {"+" Parser}]]] - [data - ["[0]" product] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [collection - ["[0]" array] - ["[0]" dictionary {"+" Dictionary}]]] - [type - abstract - ["[0]" check {"+" Check} ("[1]#[0]" monad)]]]] - ["[0]" // - [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter}] - ["[1][0]" descriptor] - ["[1][0]" signature] - ["[1][0]" reflection] - ["[1][0]" parser] - ["[1][0]" box] - ["/[1]" // "_" - [encoding - ["[1][0]" name]]]]) + [library + [lux {"-" Primitive int char type} + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception {"+" exception:}] + ["<>" parser ("[1]#[0]" monad) + ["<[0]>" text {"+" Parser}]]] + [data + ["[0]" product] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [collection + ["[0]" array] + ["[0]" dictionary {"+" Dictionary}]]] + [type + abstract + ["[0]" check {"+" Check} ("[1]#[0]" monad)]]]] + ["[0]" // + [category {"+" Void Value Return Method Primitive Object Class Array Var Parameter}] + ["[1][0]" descriptor] + ["[1][0]" signature] + ["[1][0]" reflection] + ["[1][0]" parser] + ["[1][0]" box] + ["/[1]" // "_" + [encoding + ["[1][0]" name]]]]) (template [] [(abstract: .public ( class) Any)] @@ -44,7 +44,7 @@ (exception: .public (unknown_var [var Text]) (exception.report - ["Var" (%.text var)])) + "Var" (%.text var))) (def: void (Parser (Check Type)) diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux index 3cb983c36..b4dea2627 100644 --- a/stdlib/source/library/lux/test.lux +++ b/stdlib/source/library/lux/test.lux @@ -222,18 +222,18 @@ (maybe.else raw) (text.suffix "%"))))))] (exception.report - ["Duration" (%.duration duration)] - ["# Tests" (%.nat (n.+ successes failures))] - ["# Successes" (%.nat successes)] - ["# Failures" (%.nat failures)] - ["# Expected definitions to cover" (%.nat expected_definitions_to_cover)] - ["# Actual definitions covered" (%.nat actual_definitions_covered)] - ["# Pending definitions to cover" (%.nat (n.- actual_definitions_covered - expected_definitions_to_cover))] - ["# Unexpected definitions covered" (%.nat unexpected_definitions_covered)] - ["Coverage" coverage] - ["Pending definitions to cover" (report missing)] - ["Unexpected definitions covered" (report unexpected)]))) + "Duration" (%.duration duration) + "# Tests" (%.nat (n.+ successes failures)) + "# Successes" (%.nat successes) + "# Failures" (%.nat failures) + "# Expected definitions to cover" (%.nat expected_definitions_to_cover) + "# Actual definitions covered" (%.nat actual_definitions_covered) + "# Pending definitions to cover" (%.nat (n.- actual_definitions_covered + expected_definitions_to_cover)) + "# Unexpected definitions covered" (%.nat unexpected_definitions_covered) + "Coverage" coverage + "Pending definitions to cover" (report missing) + "Unexpected definitions covered" (report unexpected)))) (def: failure_exit_code +1) (def: success_exit_code +0) @@ -386,7 +386,7 @@ (exception: .public (error_during_execution [error Text]) (exception.report - ["Error" (%.text error)])) + "Error" (%.text error))) (def: .public (in_parallel tests) (-> (List Test) Test) diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux index f6e77fb8f..425c1300b 100644 --- a/stdlib/source/library/lux/time.lux +++ b/stdlib/source/library/lux/time.lux @@ -40,8 +40,8 @@ (exception: .public (time_exceeds_a_day [time Nat]) (exception.report - ["Time (in milli-seconds)" (n#encoded time)] - ["Maximum (in milli-seconds)" (n#encoded (-- limit))])) + "Time (in milli-seconds)" (n#encoded time) + "Maximum (in milli-seconds)" (n#encoded (-- limit)))) (def: separator ":") @@ -59,9 +59,9 @@ (template [ ] [(exception: .public ( [value Nat]) (exception.report - ["Value" (n#encoded value)] - ["Minimum" (n#encoded 0)] - ["Maximum" (n#encoded (-- ))])) + "Value" (n#encoded value) + "Minimum" (n#encoded 0) + "Maximum" (n#encoded (-- )))) (def: (Parser Nat) diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux index e32440153..50d190331 100644 --- a/stdlib/source/library/lux/time/date.lux +++ b/stdlib/source/library/lux/time/date.lux @@ -53,11 +53,11 @@ month Month day Nat]) (exception.report - ["Value" (n#encoded day)] - ["Minimum" (n#encoded ..minimum_day)] - ["Maximum" (n#encoded (..month_days year month))] - ["Year" (# //year.codec encoded year)] - ["Month" (n#encoded (//month.number month))])) + "Value" (n#encoded day) + "Minimum" (n#encoded ..minimum_day) + "Maximum" (n#encoded (..month_days year month)) + "Year" (# //year.codec encoded year) + "Month" (n#encoded (//month.number month)))) (def: (padded value) (-> Nat Text) @@ -155,9 +155,9 @@ (template [ ] [(exception: .public ( [value Nat]) (exception.report - ["Value" (n#encoded value)] - ["Minimum" (n#encoded )] - ["Maximum" (n#encoded )])) + "Value" (n#encoded value) + "Minimum" (n#encoded ) + "Maximum" (n#encoded ))) (def: (Parser Nat) diff --git a/stdlib/source/library/lux/time/day.lux b/stdlib/source/library/lux/time/day.lux index 2a717427e..eb9439295 100644 --- a/stdlib/source/library/lux/time/day.lux +++ b/stdlib/source/library/lux/time/day.lux @@ -94,7 +94,7 @@ (exception: .public (not_a_day_of_the_week [value Text]) (exception.report - ["Value" (text.format value)])) + "Value" (text.format value))) (implementation: .public codec (Codec Text Day) @@ -152,11 +152,11 @@ (exception: .public (invalid_day [number Nat]) (exception.report - ["Number" (# n.decimal encoded number)] - ["Valid range" ($_ "lux text concat" - (# n.decimal encoded (..number {#Sunday})) - " ~ " - (# n.decimal encoded (..number {#Saturday})))])) + "Number" (# n.decimal encoded number) + "Valid range" ($_ "lux text concat" + (# n.decimal encoded (..number {#Sunday})) + " ~ " + (# n.decimal encoded (..number {#Saturday}))))) (def: .public (by_number number) (-> Nat (Try Day)) diff --git a/stdlib/source/library/lux/time/month.lux b/stdlib/source/library/lux/time/month.lux index 1916819c2..a9ac9c6bd 100644 --- a/stdlib/source/library/lux/time/month.lux +++ b/stdlib/source/library/lux/time/month.lux @@ -80,11 +80,11 @@ (exception: .public (invalid_month [number Nat]) (exception.report - ["Number" (# n.decimal encoded number)] - ["Valid range" ($_ "lux text concat" - (# n.decimal encoded (..number {#January})) - " ~ " - (# n.decimal encoded (..number {#December})))])) + "Number" (# n.decimal encoded number) + "Valid range" ($_ "lux text concat" + (# n.decimal encoded (..number {#January})) + " ~ " + (# n.decimal encoded (..number {#December}))))) (def: .public (by_number number) (-> Nat (Try Month)) @@ -209,7 +209,7 @@ (exception: .public (not_a_month_of_the_year [value Text]) (exception.report - ["Value" (text.format value)])) + "Value" (text.format value))) (implementation: .public codec (Codec Text Month) diff --git a/stdlib/source/library/lux/tool/compiler.lux b/stdlib/source/library/lux/tool/compiler.lux index b4d956198..7a6df03d6 100644 --- a/stdlib/source/library/lux/tool/compiler.lux +++ b/stdlib/source/library/lux/tool/compiler.lux @@ -57,4 +57,4 @@ (exception: .public (cannot_compile [module Module]) (exception.report - ["Module" module])) + "Module" module)) diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux index 6f4cd29e2..b4c2a8be8 100644 --- a/stdlib/source/library/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux @@ -389,19 +389,19 @@ (exception: .public (module_cannot_import_itself [module descriptor.Module]) (exception.report - ["Module" (%.text module)])) + "Module" (%.text module))) (exception: .public (cannot_import_circular_dependency [importer descriptor.Module importee descriptor.Module]) (exception.report - ["Importer" (%.text importer)] - ["importee" (%.text importee)])) + "Importer" (%.text importer) + "importee" (%.text importee))) (exception: .public (cannot_import_twice [importer descriptor.Module duplicates (Set descriptor.Module)]) (exception.report - ["Importer" (%.text importer)] - ["Duplicates" (%.list %.text (set.list duplicates))])) + "Importer" (%.text importer) + "Duplicates" (%.list %.text (set.list duplicates)))) (def: (verify_dependencies importer importee dependence) (-> descriptor.Module descriptor.Module Dependence (Try Any)) @@ -416,7 +416,7 @@ (exception: .public (cannot_overwrite_extension [extension extension.Name]) (exception.report - ["Extension" (%.text extension)])) + "Extension" (%.text extension))) (def: (with_extensions from to) (All (_ state input output) @@ -847,9 +847,9 @@ (exception: .public (invalid_custom_compiler [definition Symbol type Type]) (exception.report - ["Definition" (%.symbol definition)] - ["Expected Type" (%.type ..Custom)] - ["Actual Type" (%.type type)])) + "Definition" (%.symbol definition) + "Expected Type" (%.type ..Custom) + "Actual Type" (%.type type))) (def: (custom import! it) (All (_ ) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux index 34840bbea..9c2aa022e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux @@ -159,8 +159,8 @@ (exception: .public (invalid_tuple [size Nat]) (exception.report - ["Expected size" ">= 2"] - ["Actual size" (%.nat size)])) + "Expected size" ">= 2" + "Actual size" (%.nat size))) (def: .public (coverage pattern) (-> Pattern (Try Coverage)) @@ -236,14 +236,14 @@ (exception: .public (redundancy [so_far Coverage addition Coverage]) (exception.report - ["Coverage so-far" (format so_far)] - ["Additional coverage" (format addition)])) + "Coverage so-far" (format so_far) + "Additional coverage" (format addition))) (exception: .public (variant_mismatch [expected Nat mismatched Nat]) (exception.report - ["Expected cases" (%.nat expected)] - ["Mismatched cases" (%.nat mismatched)])) + "Expected cases" (%.nat expected) + "Mismatched cases" (%.nat mismatched))) (def: .public (exhaustive? coverage) (-> Coverage Bit) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux index 92435a3ae..8c6052ed5 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/inference.lux @@ -35,19 +35,19 @@ (exception: .public (cannot_infer [type Type arguments (List Code)]) (exception.report - ["Type" (%.type type)] - ["Arguments" (exception.listing %.code arguments)])) + "Type" (%.type type) + "Arguments" (exception.listing %.code arguments))) (exception: .public (cannot_infer_argument [type Type argument Code]) (exception.report - ["Type" (%.type type)] - ["Argument" (%.code argument)])) + "Type" (%.type type) + "Argument" (%.code argument))) (template [] [(exception: .public ( [type Type]) (exception.report - ["Type" (%.type type)]))] + "Type" (%.type type)))] [not_a_variant] [not_a_record] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/macro.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/macro.lux index d86eab516..b1cf6d24a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/macro.lux @@ -17,17 +17,17 @@ inputs (List Code) error Text]) (exception.report - ["Macro" (%.symbol macro)] - ["Inputs" (exception.listing %.code inputs)] - ["Error" error])) + "Macro" (%.symbol macro) + "Inputs" (exception.listing %.code inputs) + "Error" error)) (exception: .public (must_have_single_expansion [macro Symbol inputs (List Code) outputs (List Code)]) (exception.report - ["Macro" (%.symbol macro)] - ["Inputs" (exception.listing %.code inputs)] - ["Outputs" (exception.listing %.code outputs)])) + "Macro" (%.symbol macro) + "Inputs" (exception.listing %.code inputs) + "Outputs" (exception.listing %.code outputs))) (type: .public Expander (-> Macro (List Code) Lux (Try (Try [Lux (List Code)])))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/module.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/module.lux index 484d1e886..0d22a6790 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/module.lux @@ -27,14 +27,14 @@ (exception: .public (unknown_module [module Text]) (exception.report - ["Module" module])) + "Module" module)) (template [] [(exception: .public ( [labels (List Label) owner Type]) (exception.report - ["Labels" (text.interposed " " labels)] - ["Type" (%.type owner)]))] + "Labels" (text.interposed " " labels) + "Type" (%.type owner)))] [cannot_declare_labels_for_anonymous_type] [cannot_declare_labels_for_foreign_type] @@ -43,31 +43,31 @@ (exception: .public (cannot_define_more_than_once [name Symbol already_existing Global]) (exception.report - ["Definition" (%.symbol name)] - ["Original" (case already_existing - {.#Alias alias} - (format "alias " (%.symbol alias)) - - {.#Definition definition} - (format "definition " (%.symbol name)) + "Definition" (%.symbol name) + "Original" (case already_existing + {.#Alias alias} + (format "alias " (%.symbol alias)) + + {.#Definition definition} + (format "definition " (%.symbol name)) - {.#Type _} - (format "type " (%.symbol name)) + {.#Type _} + (format "type " (%.symbol name)) - {.#Tag _} - (format "tag " (%.symbol name)) + {.#Tag _} + (format "tag " (%.symbol name)) - {.#Slot _} - (format "slot " (%.symbol name)))])) + {.#Slot _} + (format "slot " (%.symbol name))))) (exception: .public (can_only_change_state_of_active_module [module Text state Module_State]) (exception.report - ["Module" module] - ["Desired state" (case state - {.#Active} "Active" - {.#Compiled} "Compiled" - {.#Cached} "Cached")])) + "Module" module + "Desired state" (case state + {.#Active} "Active" + {.#Compiled} "Compiled" + {.#Cached} "Cached"))) (def: .public (empty hash) (-> Nat Module) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux index cb2710a6b..706603273 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux @@ -44,12 +44,12 @@ (exception: .public (cannot_interpret [error Text]) (exception.report - ["Error" error])) + "Error" error)) (template [] [(exception: .public ( [it artifact.ID]) (exception.report - ["Artifact ID" (%.nat it)]))] + "Artifact ID" (%.nat it)))] [cannot_overwrite_output] [no_buffer_for_saving_code] @@ -270,9 +270,9 @@ (exception: .public (unknown_definition [name Symbol known_definitions (List category.Definition)]) (exception.report - ["Definition" (symbol.short name)] - ["Module" (symbol.module name)] - ["Known Definitions" (exception.listing product.left known_definitions)])) + "Definition" (symbol.short name) + "Module" (symbol.module name) + "Known Definitions" (exception.listing product.left known_definitions))) (def: .public (remember archive name) (All (_ anchor expression directive) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux index 8d66cfd79..32e4ed22e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux @@ -38,7 +38,7 @@ (exception: .public (invalid [syntax Code]) (exception.report - ["Syntax" (%.code syntax)])) + "Syntax" (%.code syntax))) (template: (variant_analysis analysis archive tag values) ... (-> Phase Archive Symbol (List Code) (Operation Analysis)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux index 8643a435a..c999697dd 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -41,31 +41,33 @@ (exception: .public (mismatch [type Type pattern Code]) (exception.report - ["Type" (%.type type)] - ["Pattern" (%.code pattern)])) + "Type" (%.type type) + "Pattern" (%.code pattern))) (exception: .public (sum_has_no_case [case Nat type Type]) (exception.report - ["Case" (%.nat case)] - ["Type" (%.type type)])) + "Case" (%.nat case) + "Type" (%.type type))) (exception: .public (invalid [it Code]) - (exception.report ["Pattern" (%.code it)])) + (exception.report + "Pattern" (%.code it))) (exception: .public (non_tuple [type Type]) - (exception.report ["Type" (%.type type)])) + (exception.report + "Type" (%.type type))) (exception: .public (non_exhaustive [input Code branches (List [Code Code]) coverage Coverage]) (exception.report - ["Input" (%.code input)] - ["Branches" (%.code (code.tuple (|> branches - (list#each (function (_ [slot value]) - (list slot value))) - list#conjoint)))] - ["Coverage" (/coverage.format coverage)])) + "Input" (%.code input) + "Branches" (%.code (code.tuple (|> branches + (list#each (function (_ [slot value]) + (list slot value))) + list#conjoint))) + "Coverage" (/coverage.format coverage))) (exception: .public empty_branches) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux index 8c9407a1b..eb34d19c2 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -41,14 +41,14 @@ (exception: .public (not_a_quantified_type [type Type]) (exception.report - ["Type" (%.type type)])) + "Type" (%.type type))) (template [] [(exception: .public ( [type Type members (List Code)]) (exception.report - ["Type" (%.type type)] - ["Expression" (%.code (` [(~+ members)]))]))] + "Type" (%.type type) + "Expression" (%.code (` [(~+ members)]))))] [invalid_tuple_type] [cannot_analyse_tuple] @@ -60,10 +60,10 @@ right? Bit code Code]) (exception.report - ["Type" (%.type type)] - ["Lefts" (%.nat lefts)] - ["Right?" (%.bit right?)] - ["Expression" (%.code code)]))] + "Type" (%.type type) + "Lefts" (%.nat lefts) + "Right?" (%.bit right?) + "Expression" (%.code code)))] [invalid_variant_type] [cannot_analyse_variant] @@ -73,31 +73,31 @@ (exception: .public (cannot_repeat_slot [key Symbol record (List [Symbol Code])]) (exception.report - ["Slot" (%.code (code.symbol key))] - ["Record" (%.code (code.tuple (|> record - (list#each (function (_ [keyI valC]) - (list (code.symbol keyI) valC))) - list#conjoint)))])) + "Slot" (%.code (code.symbol key)) + "Record" (%.code (code.tuple (|> record + (list#each (function (_ [keyI valC]) + (list (code.symbol keyI) valC))) + list#conjoint))))) (exception: .public (slot_does_not_belong_to_record [key Symbol type Type]) (exception.report - ["Slot" (%.code (code.symbol key))] - ["Type" (%.type type)])) + "Slot" (%.code (code.symbol key)) + "Type" (%.type type))) (exception: .public (record_size_mismatch [expected Nat actual Nat type Type record (List [Symbol Code])]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)] - ["Type" (%.type type)] - ["Expression" (%.code (|> record - (list#each (function (_ [keyI valueC]) - (list (code.symbol keyI) valueC))) - list#conjoint - code.tuple))])) + "Expected" (%.nat expected) + "Actual" (%.nat actual) + "Type" (%.type type) + "Expression" (%.code (|> record + (list#each (function (_ [keyI valueC]) + (list (code.symbol keyI) valueC))) + list#conjoint + code.tuple)))) (def: .public (sum analyse lefts right? archive) (-> Phase Nat Bit Phase) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux index 118a5da91..ce99c9005 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -36,22 +36,22 @@ argument Text body Code]) (exception.report - ["Type" (%.type expected)] - ["Function" function] - ["Argument" argument] - ["Body" (%.code body)])) + "Type" (%.type expected) + "Function" function + "Argument" argument + "Body" (%.code body))) (exception: .public (cannot_apply [:function: Type functionC Code arguments (List Code)]) (exception.report - ["Function type" (%.type :function:)] - ["Function" (%.code functionC)] - ["Arguments" (|> arguments - list.enumeration - (list#each (.function (_ [idx argC]) - (format (%.nat idx) " " (%.code argC)))) - (text.interposed text.new_line))])) + "Function type" (%.type :function:) + "Function" (%.code functionC) + "Arguments" (|> arguments + list.enumeration + (list#each (.function (_ [idx argC]) + (format (%.nat idx) " " (%.code argC)))) + (text.interposed text.new_line)))) (def: .public (function analyse function_name arg_name archive body) (-> Phase Text Text Phase) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux index f0f08dfcf..6f23ba667 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux @@ -26,17 +26,17 @@ foreign Text definition Symbol]) (exception.report - ["Current" current] - ["Foreign" foreign] - ["Definition" (%.symbol definition)])) + "Current" current + "Foreign" foreign + "Definition" (%.symbol definition))) (exception: .public (definition_has_not_been_exported [definition Symbol]) (exception.report - ["Definition" (%.symbol definition)])) + "Definition" (%.symbol definition))) (exception: .public (labels_are_not_definitions [definition Symbol]) (exception.report - ["Label" (%.symbol definition)])) + "Label" (%.symbol definition))) (def: (definition def_name) (-> Symbol (Operation Analysis)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux index b3e3fd242..bfd85814a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux @@ -30,15 +30,15 @@ (exception: .public (not_a_directive [code Code]) (exception.report - ["Directive" (%.code code)])) + "Directive" (%.code code))) (exception: .public (invalid_macro_call [code Code]) (exception.report - ["Code" (%.code code)])) + "Code" (%.code code))) (exception: .public (macro_was_not_found [name Symbol]) (exception.report - ["Name" (%.symbol name)])) + "Name" (%.symbol name))) (type: Eval (-> Type Code (Meta Any))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux index c90c949af..fb3699ba8 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux @@ -65,31 +65,31 @@ (exception: .public (cannot_overwrite [name Name]) (exception.report - ["Extension" (%.text name)])) + "Extension" (%.text name))) (exception: .public (incorrect_arity [name Name arity Nat args Nat]) (exception.report - ["Extension" (%.text name)] - ["Expected" (%.nat arity)] - ["Actual" (%.nat args)])) + "Extension" (%.text name) + "Expected" (%.nat arity) + "Actual" (%.nat args))) (exception: .public [a] (invalid_syntax [name Name %format (Format a) inputs (List a)]) (exception.report - ["Extension" (%.text name)] - ["Inputs" (exception.listing %format inputs)])) + "Extension" (%.text name) + "Inputs" (exception.listing %format inputs))) (exception: .public [s i o] (unknown [name Name bundle (Bundle s i o)]) (exception.report - ["Extension" (%.text name)] - ["Available" (|> bundle - dictionary.keys - (list.sorted text#<) - (exception.listing %.text))])) + "Extension" (%.text name) + "Available" (|> bundle + dictionary.keys + (list.sorted text#<) + (exception.listing %.text)))) (type: .public (Extender s i o) (-> Any (Handler s i o))) 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 8d2e90900..6a8793379 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 @@ -154,8 +154,8 @@ [(exception: .public ( [class External field Text]) (exception.report - ["Class" (%.text class)] - ["Field" (%.text field)]))] + "Class" (%.text class) + "Field" (%.text field)))] [cannot_set_a_final_field] [deprecated_field] @@ -165,13 +165,13 @@ method Text type .Type]) (exception.report - ["Class" (%.text class)] - ["Method" (%.text method)] - ["Type" (%.type type)])) + "Class" (%.text class) + "Method" (%.text method) + "Type" (%.type type))) (exception: .public (deprecated_class [class External]) (exception.report - ["Class" (%.text class)])) + "Class" (%.text class))) (def: (ensure_fresh_class! class_loader name) (-> java/lang/ClassLoader External (Operation Any)) @@ -240,7 +240,7 @@ (template [] [(exception: .public ( [type .Type]) (exception.report - ["Type" (%.type type)]))] + "Type" (%.type type)))] [non_object] [non_array] @@ -251,7 +251,7 @@ (template [] [(exception: .public ( [class External]) (exception.report - ["Class/type" (%.text class)]))] + "Class/type" (%.text class)))] [non_interface] [non_throwable] @@ -266,12 +266,12 @@ inputsJT (List (Type Value)) hints (List Method_Signature)]) (exception.report - ["Class Variables" (exception.listing ..signature class_variables)] - ["Class" class] - ["Method" method] - ["Method Variables" (exception.listing ..signature method_variables)] - ["Arguments" (exception.listing ..signature inputsJT)] - ["Hints" (exception.listing %.type (list#each product.left hints))]))] + "Class Variables" (exception.listing ..signature class_variables) + "Class" class + "Method" method + "Method Variables" (exception.listing ..signature method_variables) + "Arguments" (exception.listing ..signature inputsJT) + "Hints" (exception.listing %.type (list#each product.left hints))))] [no_candidates] [too_many_candidates] @@ -281,9 +281,9 @@ to .Type value Code]) (exception.report - ["From" (%.type from)] - ["To" (%.type to)] - ["Value" (%.code value)])) + "From" (%.type from) + "To" (%.type to) + "Value" (%.code value))) (template [] [(exception: .public ( [message Text]) @@ -1736,8 +1736,8 @@ (function (_ [super name type]) (format (..signature super) " :: " (%.text name) " " (..signature type))))] (exception.report - ["Expected Methods" (exception.listing %method expected)] - ["Actual Methods" (exception.listing %method actual)])))] + "Expected Methods" (exception.listing %method expected) + "Actual Methods" (exception.listing %method actual))))] [missing_abstract_methods] [invalid_overriden_methods] @@ -2135,16 +2135,16 @@ (exception: .public (unknown_super [name Text supers (List (Type Class))]) (exception.report - ["Name" (%.text name)] - ["Available" (exception.listing (|>> parser.read_class product.left) supers)])) + "Name" (%.text name) + "Available" (exception.listing (|>> parser.read_class product.left) supers))) (exception: .public (mismatched_super_parameters [name Text expected Nat actual Nat]) (exception.report - ["Name" (%.text name)] - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)])) + "Name" (%.text name) + "Expected" (%.nat expected) + "Actual" (%.nat actual))) (def: (override_mapping mapping supers parent_type) (-> Mapping (List (Type Class)) (Type Class) (Operation (List [Text .Type]))) @@ -2280,12 +2280,12 @@ expected (List Text) actual (List (Type Parameter))]) (exception.report - ["Class" (%.text name)] - ["Declaration" (signature.signature (jvm.signature declaration))] - ["Expected (amount)" (%.nat (list.size expected))] - ["Expected (parameters)" (exception.listing %.text expected)] - ["Actual (amount)" (%.nat (list.size actual))] - ["Actual (parameters)" (exception.listing ..signature actual)])) + "Class" (%.text name) + "Declaration" (signature.signature (jvm.signature declaration)) + "Expected (amount)" (%.nat (list.size expected)) + "Expected (parameters)" (exception.listing %.text expected) + "Actual (amount)" (%.nat (list.size actual)) + "Actual (parameters)" (exception.listing ..signature actual))) (def: (super_aliasing class_loader class) (-> java/lang/ClassLoader (Type Class) (Operation Aliasing)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index 59193e0c8..6c3e7c9fc 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -84,7 +84,7 @@ (as_is (exception: .public (char_text_must_be_size_1 [text Text]) (exception.report - ["Text" (%.text text)])) + "Text" (%.text text))) (def: text_char (Parser text.Char) @@ -204,7 +204,7 @@ (exception: .public (not_a_type [symbol Symbol]) (exception.report - ["Symbol" (%.symbol symbol)])) + "Symbol" (%.symbol symbol))) (def: lux::macro Handler diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux index 831211fb9..a76c39427 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux @@ -336,15 +336,15 @@ foreign Alias target Symbol]) (exception.report - ["Local alias" (%.symbol local)] - ["Foreign alias" (%.symbol foreign)] - ["Target definition" (%.symbol target)])) + "Local alias" (%.symbol local) + "Foreign alias" (%.symbol foreign) + "Target definition" (%.symbol target))) (exception: .public (cannot_alias_a_label [local Alias foreign Alias]) (exception.report - ["Alias" (%.symbol local)] - ["Label" (%.symbol foreign)])) + "Alias" (%.symbol local) + "Label" (%.symbol foreign))) (def: (define_alias alias original) (-> Text Symbol (/////analysis.Operation Any)) 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 9e7d92565..ced3ea64a 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 @@ -70,20 +70,20 @@ (exception: .public (cannot_load [class Text error Text]) (exception.report - ["Class" class] - ["Error" error])) + "Class" class + "Error" error)) (exception: .public (invalid_field [class Text field Text error Text]) (exception.report - ["Class" class] - ["Field" field] - ["Error" error])) + "Class" class + "Field" field + "Error" error)) (exception: .public (invalid_value [class Text]) (exception.report - ["Class" class])) + "Class" class)) (def: (class_value class_name class) (-> Text (java/lang/Class java/lang/Object) (Try Any)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux index 164261eb6..13d591126 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux @@ -33,8 +33,8 @@ (exception: .public (cannot_find_foreign_variable_in_environment [foreign Register environment (Environment Synthesis)]) (exception.report - ["Foreign" (%.nat foreign)] - ["Environment" (exception.listing /.%synthesis environment)])) + "Foreign" (%.nat foreign) + "Environment" (exception.listing /.%synthesis environment))) (def: arity_arguments (-> Arity (List Synthesis)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 3d795ff2f..85e4d28af 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -219,7 +219,7 @@ (template [] [(exception: .public ( [register Register]) (exception.report - ["Register" (%.nat register)]))] + "Register" (%.nat register)))] [redundant_declaration] [unknown_register] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/program.lux b/stdlib/source/library/lux/tool/compiler/language/lux/program.lux index fc3e28aa2..f3a2e5d69 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/program.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/program.lux @@ -30,7 +30,7 @@ (exception: .public (cannot_find_program [modules (List descriptor.Module)]) (exception.report - ["Modules" (exception.listing %.text modules)])) + "Modules" (exception.listing %.text modules))) (def: .public (context archive) (-> Archive (Try unit.ID)) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux index 971b9391f..a2a47c775 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -150,7 +150,7 @@ (exception: .public (end_of_file [module Text]) (exception.report - ["Module" (%.text module)])) + "Module" (%.text module))) (def: amount_of_input_shown 64) @@ -164,15 +164,15 @@ input Text offset Offset]) (exception.report - ["File" file] - ["Line" (%.nat line)] - ["Column" (%.nat column)] - ["Context" (%.text context)] - ["Input" (input_at offset input)])) + "File" file + "Line" (%.nat line) + "Column" (%.nat column) + "Context" (%.text context) + "Input" (input_at offset input))) (exception: .public (text_cannot_contain_new_lines [text Text]) (exception.report - ["Text" (%.text text)])) + "Text" (%.text text))) (template: (!failure parser where offset source_code) [{.#Left [[where offset source_code] diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux index 58bb26a18..fbcb3c0f9 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux @@ -45,21 +45,21 @@ (exception: .public (unknown_document [module descriptor.Module known_modules (List descriptor.Module)]) (exception.report - ["Module" (%.text module)] - ["Known Modules" (exception.listing %.text known_modules)])) + "Module" (%.text module) + "Known Modules" (exception.listing %.text known_modules))) (exception: .public (cannot_replace_document [module descriptor.Module old (Document Any) new (Document Any)]) (exception.report - ["Module" (%.text module)] - ["Old key" (signature.description (document.signature old))] - ["New key" (signature.description (document.signature new))])) + "Module" (%.text module) + "Old key" (signature.description (document.signature old)) + "New key" (signature.description (document.signature new)))) (template [] [(exception: .public ( [it descriptor.Module]) (exception.report - ["Module" (%.text it)]))] + "Module" (%.text it)))] [module_has_already_been_reserved] [module_must_be_reserved_before_it_can_be_added] @@ -249,8 +249,8 @@ (exception: .public (version_mismatch [expected Version actual Version]) (exception.report - ["Expected" (%.nat expected)] - ["Actual" (%.nat actual)])) + "Expected" (%.nat expected) + "Actual" (%.nat actual))) (def: .public (import expected binary) (-> Version Binary (Try Archive)) 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 9a97cc0ec..bc74b9c3c 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 @@ -22,8 +22,8 @@ (exception: .public (invalid_signature [expected Signature actual Signature]) (exception.report - ["Expected" (signature.description expected)] - ["Actual" (signature.description actual)])) + "Expected" (signature.description expected) + "Actual" (signature.description actual))) (abstract: .public (Document d) (Record 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 8c11b0fca..d2921be2e 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux @@ -146,7 +146,7 @@ (exception: .public (invalid_category [tag Nat]) (exception.report - ["Tag" (%.nat tag)])) + "Tag" (%.nat tag))) (def: .public parser (Parser Registry) diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux index b584dd240..4d593aeda 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux @@ -28,9 +28,9 @@ @module module.ID error Text]) (exception.report - ["Archive" archive] - ["Module ID" (%.nat @module)] - ["Error" error])) + "Archive" archive + "Module ID" (%.nat @module) + "Error" error)) (def: .public (path fs context @module) (All (_ !) (-> (file.System !) Context module.ID file.Path)) diff --git a/stdlib/source/library/lux/tool/compiler/meta/import.lux b/stdlib/source/library/lux/tool/compiler/meta/import.lux index d3a356c43..c485cb5f7 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/import.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/import.lux @@ -34,8 +34,8 @@ (exception: .public (duplicate [library Library module Module]) (exception.report - ["Module" (%.text module)] - ["Library" (%.text library)])) + "Module" (%.text module) + "Library" (%.text library))) (type: .public Import (Dictionary file.Path Binary)) diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux index d576571eb..00288e42b 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux @@ -33,12 +33,12 @@ (exception: .public (cannot_find_module [importer Module module Module]) (exception.report - ["Module" (%.text module)] - ["Importer" (%.text importer)])) + "Module" (%.text module) + "Importer" (%.text importer))) (exception: .public (cannot_read_module [module Module]) (exception.report - ["Module" (%.text module)])) + "Module" (%.text module))) (type: .public Extension Text) diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux index 02dd48227..a4312b3e8 100644 --- a/stdlib/source/library/lux/type/check.lux +++ b/stdlib/source/library/lux/type/check.lux @@ -31,31 +31,31 @@ (exception: .public (unknown_type_var [id Nat]) (exception.report - ["ID" (n#encoded id)])) + "ID" (n#encoded id))) (exception: .public (unbound_type_var [id Nat]) (exception.report - ["ID" (n#encoded id)])) + "ID" (n#encoded id))) (exception: .public (invalid_type_application [funcT Type argT Type]) (exception.report - ["Type function" (//.format funcT)] - ["Type argument" (//.format argT)])) + "Type function" (//.format funcT) + "Type argument" (//.format argT))) (exception: .public (cannot_rebind_var [id Nat type Type bound Type]) (exception.report - ["Var" (n#encoded id)] - ["Wanted Type" (//.format type)] - ["Current Type" (//.format bound)])) + "Var" (n#encoded id) + "Wanted Type" (//.format type) + "Current Type" (//.format bound))) (exception: .public (type_check_failed [expected Type actual Type]) (exception.report - ["Expected" (//.format expected)] - ["Actual" (//.format actual)])) + "Expected" (//.format expected) + "Actual" (//.format actual))) (type: .public Var Nat) @@ -337,7 +337,7 @@ (exception: .public (cannot_identify [var Var]) (exception.report - ["Var" (n#encoded var)])) + "Var" (n#encoded var))) (def: .public (identity aliases @) (-> (List Var) Var (Check Type)) diff --git a/stdlib/source/library/lux/type/dynamic.lux b/stdlib/source/library/lux/type/dynamic.lux index d734d5623..28c9b7e35 100644 --- a/stdlib/source/library/lux/type/dynamic.lux +++ b/stdlib/source/library/lux/type/dynamic.lux @@ -1,25 +1,25 @@ (.using - [library - [lux "*" - ["[0]" debug] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - [parser - ["<[0]>" code]]] - [data - [text - ["%" format]]] - [macro {"+" with_symbols} - ["[0]" syntax {"+" syntax:}]] - ["[0]" type - abstract]]]) + [library + [lux "*" + ["[0]" debug] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + [parser + ["<[0]>" code]]] + [data + [text + ["%" format]]] + [macro {"+" with_symbols} + ["[0]" syntax {"+" syntax:}]] + ["[0]" type + abstract]]]) (exception: .public (wrong_type [expected Type actual Type]) (exception.report - ["Expected" (%.type expected)] - ["Actual" (%.type actual)])) + "Expected" (%.type expected) + "Actual" (%.type actual))) (abstract: .public Dynamic [Type Any] diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux index 05eb845e5..4ac5a17c0 100644 --- a/stdlib/source/library/lux/type/resource.lux +++ b/stdlib/source/library/lux/type/resource.lux @@ -1,29 +1,29 @@ (.using - [library - [lux "*" - ["[0]" meta] - [abstract - ["[0]" monad {"+" Monad do} - [indexed {"+" IxMonad}]]] - [control - ["[0]" maybe] - ["[0]" exception {"+" exception:}] - ["<>" parser - ["<[0]>" code {"+" Parser}]]] - [data - [text - ["%" format {"+" format}]] - [collection - ["[0]" set] - ["[0]" sequence {"+" Sequence}] - ["[0]" list ("[1]#[0]" functor mix)]]] - ["[0]" macro - [syntax {"+" syntax:}]] - [math - [number - ["n" nat]]] - [type - abstract]]]) + [library + [lux "*" + ["[0]" meta] + [abstract + ["[0]" monad {"+" Monad do} + [indexed {"+" IxMonad}]]] + [control + ["[0]" maybe] + ["[0]" exception {"+" exception:}] + ["<>" parser + ["<[0]>" code {"+" Parser}]]] + [data + [text + ["%" format {"+" format}]] + [collection + ["[0]" set] + ["[0]" sequence {"+" Sequence}] + ["[0]" list ("[1]#[0]" functor mix)]]] + ["[0]" macro + [syntax {"+" syntax:}]] + [math + [number + ["n" nat]]] + [type + abstract]]]) (type: .public (Procedure monad input output value) (-> input (monad [output value]))) @@ -103,7 +103,7 @@ (exception: .public (index_cannot_be_repeated [index Nat]) (exception.report - ["Index" (%.nat index)])) + "Index" (%.nat index))) (exception: .public amount_cannot_be_zero) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index ff9f2aeee..b50da2586 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -147,7 +147,7 @@ (template [] [(exception: .public ( [file Path]) (exception.report - ["Path" file]))] + "Path" file))] [cannot_make_file] [cannot_find_file] @@ -812,8 +812,8 @@ ... (template [] ... [(exception: .public ( [file Path]) ... (exception.report - ... ["Path" file]))] - + ... "Path" file))] + ... ... [cannot_write_to_file] ... ) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 65a75d232..8b100638b 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -95,7 +95,7 @@ (template [] [(exception: .public ( [path //.Path]) (exception.report - ["Path" (%.text path)]))] + "Path" (%.text path)))] [not_being_watched] [cannot_poll_a_non_existent_directory] diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux index 3da3c779f..2da3bad68 100644 --- a/stdlib/source/library/lux/world/program.lux +++ b/stdlib/source/library/lux/world/program.lux @@ -40,7 +40,7 @@ (exception: .public (unknown_environment_variable [name Text]) (exception.report - ["Name" (%.text name)])) + "Name" (%.text name))) (type: .public (Program !) (Interface diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index 191a46ec5..a86e634a2 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -95,10 +95,10 @@ (exception: (cannot_find_repository [repository Text options (Dictionary Text Address)]) (exception.report - ["Repository" (%.text repository)] - ["Options" (exception.listing (function (_ [name repo]) - (format (%.text name) " := " (%.text repo))) - (dictionary.entries options))])) + "Repository" (%.text repository) + "Options" (exception.listing (function (_ [name repo]) + (format (%.text name) " := " (%.text repo))) + (dictionary.entries options)))) (def: succeed! (IO Any) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index acb108a35..8189c6978 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}] - [equivalence {"+" Equivalence}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}] - ["<>" parser - ["<[0]>" text {"+" Parser}]]] - [data - [text - ["%" format]]] - [math - [number - ["n" nat] - ["i" int]]] - [time - ["[0]" date ("[1]#[0]" equivalence)] - ["[0]" year] - ["[0]" month]] - [type - abstract]]]) + [library + [lux "*" + [abstract + [monad {"+" do}] + [equivalence {"+" Equivalence}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}] + ["<>" parser + ["<[0]>" text {"+" Parser}]]] + [data + [text + ["%" format]]] + [math + [number + ["n" nat] + ["i" int]]] + [time + ["[0]" date ("[1]#[0]" equivalence)] + ["[0]" year] + ["[0]" month]] + [type + abstract]]]) (def: .public (pad value) (-> Nat Text) @@ -34,9 +34,9 @@ (exception: .public (year_is_out_of_range [year year.Year]) (exception.report - ["Minimum" (%.int ..min_year)] - ["Maximum" (%.int ..max_year)] - ["Year" (%.int (year.value year))])) + "Minimum" (%.int ..min_year) + "Maximum" (%.int ..max_year) + "Year" (%.int (year.value year)))) (abstract: .public Date date.Date diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 24e29882b..b6d07d986 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -58,20 +58,20 @@ (list#mix dictionary.lacks resolution) (///dependency/deployment.all local)) _ (console.write_line (exception.report - ["Local successes" (|> local_successes - (list.sorted (# ///dependency.order <)) - (exception.listing ..format))] - ["Local failures" (|> local_failures + "Local successes" (|> local_successes (list.sorted (# ///dependency.order <)) - (exception.listing ..format))] - ["Remote successes" (|> remote_successes - (set.of_list ///dependency.hash) - (set.difference (set.of_list ///dependency.hash local_successes)) - set.list - (list.sorted (# ///dependency.order <)) - (exception.listing ..format))] - ["Remote failures" (|> remote_failures + (exception.listing ..format)) + "Local failures" (|> local_failures + (list.sorted (# ///dependency.order <)) + (exception.listing ..format)) + "Remote successes" (|> remote_successes + (set.of_list ///dependency.hash) + (set.difference (set.of_list ///dependency.hash local_successes)) + set.list (list.sorted (# ///dependency.order <)) - (exception.listing ..format))]) + (exception.listing ..format)) + "Remote failures" (|> remote_failures + (list.sorted (# ///dependency.order <)) + (exception.listing ..format))) console)] (in resolution)))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 2100c1ca1..67dbfc37c 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -63,9 +63,9 @@ extension Extension hash Text]) (exception.report - ["Artifact" (///artifact.format artifact)] - ["Extension" (%.text extension)] - ["Hash" (%.text hash)]))] + "Artifact" (///artifact.format artifact) + "Extension" (%.text extension) + "Hash" (%.text hash)))] [sha-1_does_not_match] [md5_does_not_match] @@ -157,8 +157,8 @@ (exception: .public (cannot_resolve [dependency Dependency]) (exception.report - ["Artifact" (%.text (///artifact.format (the //.#artifact dependency)))] - ["Type" (%.text (the //.#type dependency))])) + "Artifact" (%.text (///artifact.format (the //.#artifact dependency))) + "Type" (%.text (the //.#type dependency)))) (template [ ] [(def: ( console repository artifact) diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 6af53e362..d45c8bb6e 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -83,16 +83,16 @@ (exception: .public (not_a_hash [size Nat value Text]) (exception.report - ["Pseudo hash" (%.text value)] - ["Expected size" (%.nat size)] - ["Actual size" (%.nat (text.size value))])) + "Pseudo hash" (%.text value) + "Expected size" (%.nat size) + "Actual size" (%.nat (text.size value)))) (template [ ] [(exception: .public ( [data Binary]) (exception.report - ["Pseudo hash" (%.text (..encoded data))] - ["Expected size" (%.nat )] - ["Actual size" (%.nat (binary.size data))]))] + "Pseudo hash" (%.text (..encoded data)) + "Expected size" (%.nat ) + "Actual size" (%.nat (binary.size data))))] [not_a_sha-1 ..sha-1::size] [not_a_md5 ..md5::size] diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 9741cc731..7a8ed68e2 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -43,13 +43,13 @@ (exception: .public (unknown_profile [name Name]) (exception.report - ["Name" (%.text name)])) + "Name" (%.text name))) (exception: .public (circular_dependency [dependee Name dependent Name]) (exception.report - ["Dependent" (%.text dependent)] - ["Dependee" (%.text dependee)])) + "Dependent" (%.text dependent) + "Dependee" (%.text dependee))) (def: (profile' lineage project name) (-> (Set Name) Project Name (Try Profile)) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 85fe69b3c..efe3263a4 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -36,8 +36,8 @@ [(exception: .public ( [url URL status Nat]) (exception.report - ["URL" (%.text url)] - ["Status Code" (%.nat status)]))] + "URL" (%.text url) + "Status Code" (%.nat status)))] [download_failure] [upload_failure] diff --git a/stdlib/source/program/aedifex/runtime.lux b/stdlib/source/program/aedifex/runtime.lux index 78b17c8ea..9179dc2e8 100644 --- a/stdlib/source/program/aedifex/runtime.lux +++ b/stdlib/source/program/aedifex/runtime.lux @@ -31,7 +31,7 @@ [#program #parameters (`` (list (~~ (template.spliced ))))])] - [default_java "java" ["-jar"]] + [default_java "java" ["-jar" "--add-opens" "java.base/java.lang=ALL-UNNAMED"]] [default_js "node" ["--stack_size=8192"]] [default_python "python3" []] [default_lua "lua" []] diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux index a57f83670..b4009cea9 100644 --- a/stdlib/source/test/aedifex/repository.lux +++ b/stdlib/source/test/aedifex/repository.lux @@ -1,42 +1,42 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [equivalence {"+" Equivalence}] - [hash {"+" Hash}] - ["[0]" monad {"+" do}]] - [control - ["[0]" io] - ["[0]" try] - ["[0]" exception {"+" exception:}]] - [data - ["[0]" product] - ["[0]" binary {"+" Binary}] - ["[0]" text - ["%" format {"+" format}]] - [collection - ["[0]" dictionary {"+" Dictionary}]]] - [math - ["[0]" random {"+" Random}]] - [world - [net - ["[0]" uri {"+" URI}]]]]] - ["[0]" / "_" - ["[1][0]" identity] - ["[1][0]" origin] - ["[1][0]" local] - ["[1][0]" remote] - [// - ["@[0]" artifact]]] - [\\specification - ["$[0]" /]] - [\\program - ["[0]" / - ["[0]" remote] - ["/[1]" // "_" - ["[1][0]" artifact {"+" Version Artifact} - ["[1]/[0]" extension {"+" Extension}]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [equivalence {"+" Equivalence}] + [hash {"+" Hash}] + ["[0]" monad {"+" do}]] + [control + ["[0]" io] + ["[0]" try] + ["[0]" exception {"+" exception:}]] + [data + ["[0]" product] + ["[0]" binary {"+" Binary}] + ["[0]" text + ["%" format {"+" format}]] + [collection + ["[0]" dictionary {"+" Dictionary}]]] + [math + ["[0]" random {"+" Random}]] + [world + [net + ["[0]" uri {"+" URI}]]]]] + ["[0]" / "_" + ["[1][0]" identity] + ["[1][0]" origin] + ["[1][0]" local] + ["[1][0]" remote] + [// + ["@[0]" artifact]]] + [\\specification + ["$[0]" /]] + [\\program + ["[0]" / + ["[0]" remote] + ["/[1]" // "_" + ["[1][0]" artifact {"+" Version Artifact} + ["[1]/[0]" extension {"+" Extension}]]]]]) (def: artifact (-> Version Artifact) @@ -44,11 +44,11 @@ (exception: (not_found [uri URI]) (exception.report - ["URI" (%.text uri)])) + "URI" (%.text uri))) (exception: (cannot_upload [uri URI]) (exception.report - ["URI" (%.text uri)])) + "URI" (%.text uri))) (type: Store (Dictionary URI Binary)) diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux index c8f88c198..9c778e7b2 100644 --- a/stdlib/source/test/lux/control/exception.lux +++ b/stdlib/source/test/lux/control/exception.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]]] - [math - ["[0]" random] - [number - ["n" nat]]]]] - [\\library - ["[0]" / {"+" exception:} - [// - ["[0]" try {"+" Try}]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]]] + [math + ["[0]" random] + [number + ["n" nat]]]]] + [\\library + ["[0]" / {"+" exception:} + [// + ["[0]" try {"+" Try}]]]]) (exception: an_exception) (exception: another_exception) (def: label "YOLO") (exception: (custom_exception [value Nat]) - (/.report [label (%.nat value)])) + (/.report label (%.nat value))) (def: .public test Test @@ -75,8 +75,8 @@ (/.when ..an_exception (function (_ ex) wrong)) (/.otherwise (function (_ ex) expected))))) (_.cover [/.report] - (let [report (/.report [field0 value0] - [field1 value1])] + (let [report (/.report field0 value0 + field1 value1)] (and (text.contains? field0 report) (text.contains? value0 report) (text.contains? field1 report) -- cgit v1.2.3