aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2022-07-06 16:25:43 -0400
committerEduardo Julian2022-07-06 16:25:43 -0400
commit5270f301eba5237feebc8eca14aee6b7a992a819 (patch)
treea1adb545189f4db807d712a1fcc7d20048c11222
parent0c32c7f03ad1f8f0db54b623dc407713bbf8cacd (diff)
Made exception.report a function.
-rw-r--r--licentia/source/program/licentia/input.lux8
-rw-r--r--lux-cl/source/program.lux4
-rw-r--r--lux-js/source/program.lux28
-rw-r--r--lux-lua/source/program.lux6
-rw-r--r--lux-php/source/program.lux8
-rw-r--r--lux-python/source/program.lux6
-rw-r--r--lux-r/source/program.lux10
-rw-r--r--lux-ruby/source/program.lux32
-rw-r--r--lux-scheme/source/program.lux8
-rw-r--r--stdlib/source/documentation/lux.lux2
-rw-r--r--stdlib/source/documentation/lux/control/exception.lux8
-rw-r--r--stdlib/source/documentation/lux/control/parser.lux20
-rw-r--r--stdlib/source/documentation/lux/control/parser/cli.lux57
-rw-r--r--stdlib/source/documentation/lux/control/parser/code.lux115
-rw-r--r--stdlib/source/documentation/lux/control/parser/environment.lux43
-rw-r--r--stdlib/source/documentation/lux/control/parser/type.lux141
-rw-r--r--stdlib/source/documentation/lux/meta.lux29
-rw-r--r--stdlib/source/documentation/lux/meta/code.lux81
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux (renamed from stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux (renamed from stdlib/source/documentation/lux/tool/compiler/language/lux/declaration.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux (renamed from stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux (renamed from stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta/compiler/phase.lux (renamed from stdlib/source/documentation/lux/tool/compiler/phase.lux)0
-rw-r--r--stdlib/source/documentation/lux/meta/type.lux114
-rw-r--r--stdlib/source/documentation/lux/program.lux41
-rw-r--r--stdlib/source/documentation/lux/tool.lux19
-rw-r--r--stdlib/source/documentation/lux/world/environment.lux31
-rw-r--r--stdlib/source/library/lux/control/concurrency/semaphore.lux2
-rw-r--r--stdlib/source/library/lux/control/exception.lux10
-rw-r--r--stdlib/source/library/lux/control/function/contract.lux2
-rw-r--r--stdlib/source/library/lux/control/remember.lux16
-rw-r--r--stdlib/source/library/lux/data/binary.lux16
-rw-r--r--stdlib/source/library/lux/data/collection/sequence.lux4
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux24
-rw-r--r--stdlib/source/library/lux/data/text/escape.lux14
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux4
-rw-r--r--stdlib/source/library/lux/debug.lux29
-rw-r--r--stdlib/source/library/lux/documentation.lux2
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux28
-rw-r--r--stdlib/source/library/lux/math.lux2
-rw-r--r--stdlib/source/library/lux/math/modular.lux8
-rw-r--r--stdlib/source/library/lux/meta/compiler.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/default/platform.lux18
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux12
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux10
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux12
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux42
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/generation.lux10
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/case.lux24
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux44
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux22
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/reference.lux10
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux22
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux60
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux4
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux10
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux12
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/function.lux4
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/variable.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/program.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux14
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/archive.lux16
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux4
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/cache/module.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/import.lux4
-rw-r--r--stdlib/source/library/lux/meta/compiler/meta/io/context.lux6
-rw-r--r--stdlib/source/library/lux/meta/macro/context.lux2
-rw-r--r--stdlib/source/library/lux/meta/macro/local.lux6
-rw-r--r--stdlib/source/library/lux/meta/macro/syntax/definition.lux2
-rw-r--r--stdlib/source/library/lux/meta/macro/template.lux4
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/bytecode.lux30
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/bytecode/environment.lux4
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux4
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux12
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/loader.lux8
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/reflection.lux30
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/type/lux.lux2
-rw-r--r--stdlib/source/library/lux/meta/type/check.lux20
-rw-r--r--stdlib/source/library/lux/meta/type/dynamic.lux4
-rw-r--r--stdlib/source/library/lux/meta/type/resource.lux2
-rw-r--r--stdlib/source/library/lux/test.lux26
-rw-r--r--stdlib/source/library/lux/time.lux10
-rw-r--r--stdlib/source/library/lux/time/date.lux16
-rw-r--r--stdlib/source/library/lux/time/day.lux12
-rw-r--r--stdlib/source/library/lux/time/month.lux12
-rw-r--r--stdlib/source/library/lux/world/environment.lux2
-rw-r--r--stdlib/source/library/lux/world/file.lux4
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux2
-rw-r--r--stdlib/source/parser/lux/data/binary.lux18
-rw-r--r--stdlib/source/parser/lux/data/format/json.lux8
-rw-r--r--stdlib/source/parser/lux/data/format/xml.lux10
-rw-r--r--stdlib/source/parser/lux/data/text.lux18
-rw-r--r--stdlib/source/parser/lux/meta/compiler/language/lux/analysis.lux4
-rw-r--r--stdlib/source/parser/lux/meta/compiler/language/lux/synthesis.lux10
-rw-r--r--stdlib/source/parser/lux/meta/type.lux12
-rw-r--r--stdlib/source/parser/lux/world/environment.lux2
-rw-r--r--stdlib/source/program/aedifex.lux8
-rw-r--r--stdlib/source/program/aedifex/artifact/time/date.lux6
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux30
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux10
-rw-r--r--stdlib/source/program/aedifex/hash.lux12
-rw-r--r--stdlib/source/program/aedifex/project.lux6
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux4
-rw-r--r--stdlib/source/test/aedifex/repository.lux4
-rw-r--r--stdlib/source/test/lux/control/exception.lux6
109 files changed, 806 insertions, 932 deletions
diff --git a/licentia/source/program/licentia/input.lux b/licentia/source/program/licentia/input.lux
index 437675acd..afc723656 100644
--- a/licentia/source/program/licentia/input.lux
+++ b/licentia/source/program/licentia/input.lux
@@ -40,11 +40,11 @@
(exception .public (cannot_use_fractional_amount [amount Frac])
(exception.report
- "Amount" (%.frac amount)))
+ (list ["Amount" (%.frac amount)])))
(exception .public (cannot_use_negative_amount [amount Int])
(exception.report
- "Amount" (%.int amount)))
+ (list ["Amount" (%.int amount)])))
(def amount
(Parser Nat)
@@ -60,8 +60,8 @@
(exception .public (invalid_period [period (Period Nat)])
(exception.report
- "Start" (%.nat (the time.#start period))
- "End" (%.nat (the time.#end period))))
+ (list ["Start" (%.nat (the time.#start period))]
+ ["End" (%.nat (the time.#end period))])))
(def period
(Parser (Period Nat))
diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux
index 3543a5e09..c5d76c436 100644
--- a/lux-cl/source/program.lux
+++ b/lux-cl/source/program.lux
@@ -155,8 +155,8 @@
(with_template [<name>]
[(exception (<name> [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))]
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))]
[unknown_kind_of_object]
[cannot_apply_a_non_function]
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index c766074fb..1df4d4803 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -155,8 +155,8 @@
(exception (unknown_member [member Text
object java/lang/Object])
(exception.report
- "Member" member
- "Object" (debug.inspection object)))
+ (list ["Member" member]
+ ["Object" (debug.inspection object)])))
(def jvm_int
(-> (I64 Any) java/lang/Integer)
@@ -311,17 +311,17 @@
(exception (unknown_kind_of_host_object [object java/lang/Object])
(exception.report
- "Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))
- "Object" (ffi.of_string (java/lang/Object::toString object))
- "Keys" (case (ffi.is org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
- {.#Some object}
- (|> object
- (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
- (array.list {.#None})
- (%.list (|>> ffi.of_string %.text)))
-
- {.#None}
- "???")))
+ (list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
+ ["Object" (ffi.of_string (java/lang/Object::toString object))]
+ ["Keys" (case (ffi.is org/openjdk/nashorn/api/scripting/ScriptObjectMirror object)
+ {.#Some object}
+ (|> object
+ (org/openjdk/nashorn/api/scripting/ScriptObjectMirror::getOwnKeys true)
+ (array.list {.#None})
+ (%.list (|>> ffi.of_string %.text)))
+
+ {.#None}
+ "???")])))
(def (i32 half i64)
(-> Text org/openjdk/nashorn/api/scripting/ScriptObjectMirror (Maybe Int))
@@ -475,7 +475,7 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Object" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Object" (ffi.of_string (java/lang/Object::toString object))])))
(def (expander macro inputs lux)
Expander
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index cba1a224f..e08b2c4cb 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -169,8 +169,8 @@
(exception (unknown_kind_of_object [object java/lang/Object])
(exception.report
- "Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))
- "Object" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
+ ["Object" (ffi.of_string (java/lang/Object::toString object))])))
(ffi.interface LuxValue
(getValue [] java/lang/Object))
@@ -447,7 +447,7 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Non-function" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Non-function" (ffi.of_string (java/lang/Object::toString object))])))
(def ensure_function
(-> Macro (Maybe net/sandius/rembulan/runtime/LuaFunction))
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux
index dffe1e4c7..dbaded2ce 100644
--- a/lux-php/source/program.lux
+++ b/lux-php/source/program.lux
@@ -182,8 +182,8 @@
(exception (unknown_kind_of_object [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))
(def (value_wrapper lux_structure value)
(-> (-> (Array java/lang/Object) php/runtime/Memory) java/lang/Object php/runtime/Memory)
@@ -417,8 +417,8 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Non-function" (java/lang/Object::toString object)))
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Non-function" (java/lang/Object::toString object)])))
(ffi.import javax/script/ScriptEngine
"[1]::[0]"
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index a501a73f9..208a3550a 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -168,7 +168,7 @@
(exception (unknown_kind_of_object [object java/lang/Object])
(exception.report
- "Object" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Object" (ffi.of_string (java/lang/Object::toString object))])))
(def (read_variant read host_object)
(-> Translator Translator)
@@ -375,8 +375,8 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Object" (ffi.of_string (java/lang/Object::toString object))
- "Class" (ffi.of_string (java/lang/Class::getName (java/lang/Object::getClass object)))))
+ (list ["Object" (ffi.of_string (java/lang/Object::toString object))]
+ ["Class" (ffi.of_string (java/lang/Class::getName (java/lang/Object::getClass object)))])))
(def (expander macro inputs lux)
Expander
diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux
index c021c1908..7cb8645f7 100644
--- a/lux-r/source/program.lux
+++ b/lux-r/source/program.lux
@@ -173,8 +173,8 @@
(with_template [<name>]
[(exception (<name> [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))]
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))]
[unknown_kind_of_object]
[cannot_apply_a_non_function]
@@ -233,9 +233,9 @@
... org/renjin/sexp/SEXP
... (exec
... ("lux io log" (exception.report
- ... "@@" "eval"
- ... "context" (debug.inspect context)
- ... "environment" (debug.inspect environment)))
+ ... (list ["@@" "eval"]
+ ... ["context" (debug.inspect context)]
+ ... ["environment" (debug.inspect environment)])))
... self))
... (org/renjin/sexp/AbstractSEXP
diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux
index 2e9d6b06e..35aada877 100644
--- a/lux-ruby/source/program.lux
+++ b/lux-ruby/source/program.lux
@@ -252,8 +252,8 @@
(exception (unknown_kind_of_object [object java/lang/Object])
(exception.report
- "Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))
- "Object" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Class" (ffi.of_string (java/lang/Object::toString (java/lang/Object::getClass object)))]
+ ["Object" (ffi.of_string (java/lang/Object::toString object))])))
(def (read_variant read host_object)
(-> Translator org/jruby/RubyHash (Try Any))
@@ -349,17 +349,17 @@
(exception (invalid_variant_access [field Text])
(exception.report
- "Field" (%.text field)))
+ (list ["Field" (%.text field)])))
(exception (invalid_index [index java/lang/Object])
(exception.report
- "Class" (|> index
- java/lang/Object::getClass
- java/lang/Object::toString
- ffi.of_string)
- "Index" (|> index
- java/lang/Object::toString
- ffi.of_string)))
+ (list ["Class" (|> index
+ java/lang/Object::getClass
+ java/lang/Object::toString
+ ffi.of_string)]
+ ["Index" (|> index
+ java/lang/Object::toString
+ ffi.of_string)])))
(import java/util/Arrays
"[1]::[0]"
@@ -367,7 +367,7 @@
(exception (invalid_arity [arity Nat])
(exception.report
- "Arity" (%.nat arity)))
+ (list ["Arity" (%.nat arity)])))
(def (::call useful_object_class lux_structure value)
(-> (-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject)
@@ -603,7 +603,7 @@
(exception (invalid_operation [method Text])
(exception.report
- "Method" (%.text method)))
+ (list ["Method" (%.text method)])))
(def (::respond_to? value)
(-> (Array java/lang/Object) org/jruby/internal/runtime/methods/DynamicMethod)
@@ -649,7 +649,7 @@
(exception (unknown_method [method Text])
(exception.report
- "Method" (%.text method)))
+ (list ["Method" (%.text method)])))
(def (useful_object_class lux_structure value)
(-> (-> (Array java/lang/Object) org/jruby/runtime/builtin/IRubyObject)
@@ -693,7 +693,7 @@
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Non-function" (ffi.of_string (java/lang/Object::toString object))))
+ (list ["Non-function" (ffi.of_string (java/lang/Object::toString object))])))
(def macro!
(-> Macro (Maybe org/jruby/RubyProc))
@@ -774,8 +774,8 @@
(for @.jvm (these (exception .public (invaid_phase_application [partial_application (List Any)
arity (List Any)])
(exception.report
- "Partial Application" (%.nat (list.size partial_application))
- "Arity" (%.nat (list.size arity))))
+ (list ["Partial Application" (%.nat (list.size partial_application))]
+ ["Arity" (%.nat (list.size arity))])))
(def proc_type
org/jruby/runtime/Block$Type
diff --git a/lux-scheme/source/program.lux b/lux-scheme/source/program.lux
index 3ae437b2f..f979336ae 100644
--- a/lux-scheme/source/program.lux
+++ b/lux-scheme/source/program.lux
@@ -238,13 +238,13 @@
(exception (unknown_kind_of_host_object [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))
(exception (cannot_apply_a_non_function [object java/lang/Object])
(exception.report
- "Class" (java/lang/Object::toString (java/lang/Object::getClass object))
- "Object" (java/lang/Object::toString object)))
+ (list ["Class" (java/lang/Object::toString (java/lang/Object::getClass object))]
+ ["Object" (java/lang/Object::toString object)])))
(def (lux_value value)
(-> java/lang/Object java/lang/Object)
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 6e008a209..578bee850 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -29,7 +29,6 @@
["[1][0]" static]
["[1][0]" test]
["[1][0]" time]
- ["[1][0]" tool] ... TODO: Documentation for this
["[1][0]" world]])
(.`` (.def .public documentation
@@ -900,7 +899,6 @@
/static.documentation
/test.documentation
/time.documentation
- /tool.documentation
/world.documentation])))
(program: inputs
diff --git a/stdlib/source/documentation/lux/control/exception.lux b/stdlib/source/documentation/lux/control/exception.lux
index 01cecf3ea..14db6b941 100644
--- a/stdlib/source/documentation/lux/control/exception.lux
+++ b/stdlib/source/documentation/lux/control/exception.lux
@@ -51,10 +51,10 @@
($.documentation /.report
"An error report."
[(is Text
- (report ["Row 0" value/0]
- ["Row 1" value/1]
- ,,,
- ["Row N" value/N]))])
+ (report (list ["Row 0" value/0]
+ ["Row 1" value/1]
+ ,,,
+ ["Row N" value/N])))])
($.documentation /.listing
(format "A numbered report of the entries on a list."
diff --git a/stdlib/source/documentation/lux/control/parser.lux b/stdlib/source/documentation/lux/control/parser.lux
index ac253916e..4d2389f71 100644
--- a/stdlib/source/documentation/lux/control/parser.lux
+++ b/stdlib/source/documentation/lux/control/parser.lux
@@ -6,16 +6,7 @@
[text (.only \n)
["%" \\format (.only format)]]]]]
[\\library
- ["[0]" /]]
- ["[0]" /
- ["[1][0]" cli]
- ["[1][0]" code]
- ["[1][0]" environment]
- ["[1][0]" json]
- ["[1][0]" text]
- ["[1][0]" tree]
- ["[1][0]" type]
- ["[1][0]" xml]])
+ ["[0]" /]])
(.def .public documentation
(.List $.Module)
@@ -133,11 +124,4 @@
($.documentation /.codec
"Decode the output of a parser using a codec."
[(codec codec parser)])]
- [/cli.documentation
- /code.documentation
- /environment.documentation
- /json.documentation
- /text.documentation
- /tree.documentation
- /type.documentation
- /xml.documentation]))
+ []))
diff --git a/stdlib/source/documentation/lux/control/parser/cli.lux b/stdlib/source/documentation/lux/control/parser/cli.lux
deleted file mode 100644
index f76bb6e1a..000000000
--- a/stdlib/source/documentation/lux/control/parser/cli.lux
+++ /dev/null
@@ -1,57 +0,0 @@
-(.require
- [library
- [lux (.except parameter)
- ["$" documentation (.only documentation:)]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: (/.Parser it)
- "A command-line interface parser.")
-
-(documentation: /.result
- "Executes the parser and verifies that all inputs are processed."
- [(result parser inputs)])
-
-(documentation: /.any
- "Just returns the next input without applying any logic.")
-
-(documentation: /.parse
- "Parses the next input with a parsing function."
- [(parse parser)])
-
-(documentation: /.this
- "Checks that a token is in the inputs."
- [(this reference)])
-
-(documentation: /.somewhere
- "Given a parser, tries to parse it somewhere in the inputs (i.e. not necessarily parsing the immediate inputs)."
- [(somewhere cli)])
-
-(documentation: /.end
- "Ensures there are no more inputs.")
-
-(documentation: /.named
- "Parses a named parameter and yields its value."
- [(named name value)])
-
-(documentation: /.parameter
- "Parses a parameter that can have either a short or a long name."
- [(parameter [short long] value)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Parser
- ..result
- ..any
- ..parse
- ..this
- ..somewhere
- ..end
- ..named
- ..parameter]
- []))
diff --git a/stdlib/source/documentation/lux/control/parser/code.lux b/stdlib/source/documentation/lux/control/parser/code.lux
deleted file mode 100644
index 9347075dd..000000000
--- a/stdlib/source/documentation/lux/control/parser/code.lux
+++ /dev/null
@@ -1,115 +0,0 @@
-(.require
- [library
- [lux (.except nat int rev local not symbol)
- ["$" documentation (.only documentation:)]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]]
- [meta
- [macro
- ["[0]" template]]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: (/.Parser it)
- "A Lux code parser.")
-
-(documentation: /.any
- "Yields the next input without applying any logic.")
-
-(with_template [<query> <check>]
- [(`` (documentation: <query>
- (format "Parses the next " (,, (template.text [<query>])) " input.")))
- (`` (documentation: <check>
- (format "Checks for a specific " (,, (template.text [<query>])) " input.")))]
-
- [/.bit /.this_bit]
- [/.nat /.this_nat]
- [/.int /.this_int]
- [/.rev /.this_rev]
- [/.frac /.this_frac]
- [/.text /.this_text]
- [/.symbol /.this_symbol]
- )
-
-(documentation: /.this
- "Ensures the given Code is the next input."
- [(this code)])
-
-(with_template [<query> <check> <desc>]
- [(documentation: <query>
- (format "Parse a local " <desc> " (a " <desc> " that has no module prefix)."))
- (documentation: <check>
- (format "Checks for a specific local " <desc> " (a " <desc> " that has no module prefix)."))]
-
- [/.local /.this_local "local symbol"]
- )
-
-(with_template [<name>]
- [(`` (documentation: <name>
- (format "Parses the contents of a " (,, (template.text [<name>])) ".")))]
-
- [/.form]
- [/.variant]
- [/.tuple]
- )
-
-(documentation: /.end
- "Verifies there are no more inputs.")
-
-(documentation: /.end?
- "Checks whether there are no more inputs.")
-
-(documentation: /.result
- "Executes a parser against a stream of code, and verifies all the inputs are consumed."
- [(result parser inputs)])
-
-(documentation: /.locally
- "Runs parser against the given list of inputs."
- [(locally inputs parser)])
-
-(documentation: /.not
- "Yields the next Code token if the parser fails."
- [(not expected_to_fail)])
-
-(documentation: /.next
- "Yields the next Code token without consuming it from the input stream.")
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Parser
- ..any
-
- ..bit
- ..this_bit
- ..nat
- ..this_nat
- ..int
- ..this_int
- ..rev
- ..this_rev
- ..frac
- ..this_frac
- ..text
- ..this_text
- ..symbol
- ..this_symbol
-
- ..this
-
- ..local
- ..this_local
-
- ..form
- ..tuple
-
- ..variant
- ..end
- ..end?
- ..result
- ..locally
- ..not
- ..next]
- []))
diff --git a/stdlib/source/documentation/lux/control/parser/environment.lux b/stdlib/source/documentation/lux/control/parser/environment.lux
deleted file mode 100644
index 345d4aaa3..000000000
--- a/stdlib/source/documentation/lux/control/parser/environment.lux
+++ /dev/null
@@ -1,43 +0,0 @@
-(.require
- [library
- [lux (.except)
- ["$" documentation (.only documentation:)]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: /.Property
- "A property in the environment.")
-
-(documentation: /.Environment
- "An abstraction for environment variables of a program.")
-
-(documentation: (/.Parser it)
- "A parser of environment variables of a program.")
-
-(documentation: /.empty
- "An empty environment.")
-
-(documentation: /.property
- ""
- [(property name)])
-
-(documentation: /.result
- (format "Executes a parser against the given environment variables."
- \n "Does not check whether all environment variables were parsed, since they're usually an open set.")
- [(result parser environment)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [..Property
- ..Environment
- ..Parser
- ..empty
- ..property
- ..result
- ($.default /.unknown_property)]
- []))
diff --git a/stdlib/source/documentation/lux/control/parser/type.lux b/stdlib/source/documentation/lux/control/parser/type.lux
deleted file mode 100644
index 2ecedfe39..000000000
--- a/stdlib/source/documentation/lux/control/parser/type.lux
+++ /dev/null
@@ -1,141 +0,0 @@
-(.require
- [library
- [lux (.except local function)
- ["$" documentation (.only documentation:)]
- [data
- [text (.only \n)
- ["%" \\format (.only format)]]]
- [meta
- [macro
- ["[0]" template]]]]]
- [\\library
- ["[0]" /]])
-
-(documentation: /.Env
- "An environment for type parsing.")
-
-(documentation: (/.Parser it)
- "A parser of Lux types.")
-
-(documentation: /.fresh
- "An empty parsing environment.")
-
-(documentation: /.result
- (format "Applies a parser against a type."
- \n "Verifies that the parser fully consumes the type's information.")
- [(result poly type)])
-
-(documentation: /.env
- "Yields the current parsing environment.")
-
-(documentation: /.next
- "Inspect a type in the input stream without consuming it.")
-
-(documentation: /.any
- "Yields a type, without examination.")
-
-(documentation: /.local
- "Apply a parser to the given inputs."
- [(local types poly)])
-
-(documentation: /.with_extension
- ""
- [(with_extension type poly)])
-
-(with_template [<name>]
- [(`` (documentation: <name>
- (format "Parses the contents of a " (,, (template.text [<name>])) " type.")))]
-
- [/.variant]
- [/.tuple]
- )
-
-(documentation: /.polymorphic
- ""
- [(polymorphic poly)])
-
-(documentation: /.function
- "Parses a function's inputs and output."
- [(function in_poly out_poly)])
-
-(documentation: /.applied
- "Parses a type application."
- [(applied poly)])
-
-(with_template [<name> <doc>]
- [(documentation: <name>
- <doc>)]
-
- [/.exactly "Parses a type exactly."]
- [/.sub "Parses a sub type."]
- [/.super "Parses a super type."]
- )
-
-(documentation: /.argument
- ""
- [(argument env idx)])
-
-(documentation: /.this_parameter
- ""
- [(this_parameter id)])
-
-(documentation: /.existential
- "Yields an existential type.")
-
-(documentation: /.named
- "Yields a named type.")
-
-(documentation: /.recursive
- ""
- [(recursive poly)])
-
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- (format "Parsing of Lux types."
- \n "Used mostly for polytypic programming.")
- [..Env
- ..Parser
- ..fresh
- ..result
- ..env
- ..next
- ..any
- ..local
- ..with_extension
-
- ..variant
- ..tuple
-
- ..polymorphic
- ..function
- ..applied
-
- ..exactly
- ..sub
- ..super
-
- ..argument
- ..this_parameter
- ..existential
- ..named
- ..recursive
-
- ($.default /.not_existential)
- ($.default /.not_recursive)
- ($.default /.not_named)
- ($.default /.not_parameter)
- ($.default /.unknown_parameter)
- ($.default /.not_function)
- ($.default /.not_application)
- ($.default /.not_polymorphic)
- ($.default /.not_variant)
- ($.default /.not_tuple)
- ($.default /.types_do_not_match)
- ($.default /.wrong_parameter)
- ($.default /.empty_input)
- ($.default /.unconsumed_input)
- ($.default /.parameter)
- ($.default /.recursive_self)
- ($.default /.recursive_call)]
- []))
diff --git a/stdlib/source/documentation/lux/meta.lux b/stdlib/source/documentation/lux/meta.lux
index 71dc925dd..3e6cdd38e 100644
--- a/stdlib/source/documentation/lux/meta.lux
+++ b/stdlib/source/documentation/lux/meta.lux
@@ -1,10 +1,12 @@
(.require
[library
- [lux (.except macro)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
- ["%" \\format (.only format)]]]]]
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]]]
[\\library
["[0]" /]]
["[0]" /
@@ -13,7 +15,25 @@
["[1][0]" symbol]
["[1][0]" type]
["[1][0]" macro]
- ["[1][0]" target]])
+ ["[1][0]" target]
+ ["[1][0]/" compiler
+ ["[1][0]" phase]
+ [language
+ [lux
+ ["[1][0]" analysis]
+ ["[1][0]" declaration]
+ ["[1][0]" generation]
+ ["[1][0]" synthesis]]]]])
+
+(.def /compiler
+ (.List $.Module)
+ (list.together
+ (list /compiler/phase.documentation
+ /compiler/analysis.documentation
+ /compiler/declaration.documentation
+ /compiler/generation.documentation
+ /compiler/synthesis.documentation
+ )))
(.def .public documentation
(.List $.Module)
@@ -169,4 +189,5 @@
/symbol.documentation
/type.documentation
/macro.documentation
- /target.documentation]))
+ /target.documentation
+ ../compiler]))
diff --git a/stdlib/source/documentation/lux/meta/code.lux b/stdlib/source/documentation/lux/meta/code.lux
index df50d5049..d1bf31f01 100644
--- a/stdlib/source/documentation/lux/meta/code.lux
+++ b/stdlib/source/documentation/lux/meta/code.lux
@@ -1,15 +1,88 @@
(.require
[library
- [lux (.except char local global)
+ [lux (.except)
["$" documentation]
[data
- [text
+ [text (.only \n)
["%" \\format (.only format)]]
[collection
- ["[0]" list]]]]]
+ ["[0]" list]]]
+ [meta
+ [macro
+ ["[0]" template]]]]]
+ ["[0]" \\parser]
[\\library
["[0]" /]])
+(`` (.def \\parser
+ (.List $.Module)
+ ($.module \\parser._
+ ""
+ [($.documentation (\\parser.Parser it)
+ "A Lux code parser.")
+
+ ($.documentation \\parser.any
+ "Yields the next input without applying any logic.")
+
+ (,, (with_template [<query> <check>]
+ [(`` ($.documentation <query>
+ (format "Parses the next " (,, (template.text [<query>])) " input.")))
+ (`` ($.documentation <check>
+ (format "Checks for a specific " (,, (template.text [<query>])) " input.")))]
+
+ [\\parser.bit \\parser.this_bit]
+ [\\parser.nat \\parser.this_nat]
+ [\\parser.int \\parser.this_int]
+ [\\parser.rev \\parser.this_rev]
+ [\\parser.frac \\parser.this_frac]
+ [\\parser.text \\parser.this_text]
+ [\\parser.symbol \\parser.this_symbol]
+ ))
+
+ ($.documentation \\parser.this
+ "Ensures the given Code is the next input."
+ [(this code)])
+
+ (,, (with_template [<query> <check> <desc>]
+ [($.documentation <query>
+ (format "Parse a local " <desc> " (a " <desc> " that has no module prefix)."))
+ ($.documentation <check>
+ (format "Checks for a specific local " <desc> " (a " <desc> " that has no module prefix)."))]
+
+ [\\parser.local \\parser.this_local "local symbol"]
+ ))
+
+ (,, (with_template [<name>]
+ [(`` ($.documentation <name>
+ (format "Parses the contents of a " (,, (template.text [<name>])) ".")))]
+
+ [\\parser.form]
+ [\\parser.variant]
+ [\\parser.tuple]
+ ))
+
+ ($.documentation \\parser.end
+ "Verifies there are no more inputs.")
+
+ ($.documentation \\parser.end?
+ "Checks whether there are no more inputs.")
+
+ ($.documentation \\parser.result
+ "Executes a parser against a stream of code, and verifies all the inputs are consumed."
+ [(result parser inputs)])
+
+ ($.documentation \\parser.locally
+ "Runs parser against the given list of inputs."
+ [(locally inputs parser)])
+
+ ($.documentation \\parser.not
+ "Yields the next Code token if the parser fails."
+ [(not expected_to_fail)])
+
+ ($.documentation \\parser.next
+ "Yields the next Code token without consuming it from the input stream.")]
+ [])))
+
(.def .public documentation
(.List $.Module)
($.module /._
@@ -34,4 +107,4 @@
($.documentation /.replaced
""
[(replaced original substitute ast)])]
- []))
+ [..\\parser]))
diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
index 7daade0e8..7daade0e8 100644
--- a/stdlib/source/documentation/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/analysis.lux
diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/declaration.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux
index cc2088576..cc2088576 100644
--- a/stdlib/source/documentation/lux/tool/compiler/language/lux/declaration.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/declaration.lux
diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux
index 295ada218..295ada218 100644
--- a/stdlib/source/documentation/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/generation.lux
diff --git a/stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
index dcfe3ce0a..dcfe3ce0a 100644
--- a/stdlib/source/documentation/lux/tool/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/language/lux/synthesis.lux
diff --git a/stdlib/source/documentation/lux/tool/compiler/phase.lux b/stdlib/source/documentation/lux/meta/compiler/phase.lux
index 5efcf5d0f..5efcf5d0f 100644
--- a/stdlib/source/documentation/lux/tool/compiler/phase.lux
+++ b/stdlib/source/documentation/lux/meta/compiler/phase.lux
diff --git a/stdlib/source/documentation/lux/meta/type.lux b/stdlib/source/documentation/lux/meta/type.lux
index 541e3978c..f2335eb24 100644
--- a/stdlib/source/documentation/lux/meta/type.lux
+++ b/stdlib/source/documentation/lux/meta/type.lux
@@ -1,10 +1,14 @@
(.require
[library
- [lux (.except function as let)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
- ["%" \\format]]]]]
+ ["%" \\format (.only format)]]]
+ [meta
+ [macro
+ ["[0]" template]]]]]
+ ["[0]" \\parser]
[\\library
["[0]" /]]
["[0]" /
@@ -19,6 +23,108 @@
["[1][0]" unit]
["[1][0]" variance]])
+(`` (.def \\parser
+ (.List $.Module)
+ ($.module \\parser._
+ (format "Parsing of Lux types."
+ \n "Used mostly for polytypic programming.")
+ [($.default \\parser.not_existential)
+ ($.default \\parser.not_recursive)
+ ($.default \\parser.not_named)
+ ($.default \\parser.not_parameter)
+ ($.default \\parser.unknown_parameter)
+ ($.default \\parser.not_function)
+ ($.default \\parser.not_application)
+ ($.default \\parser.not_polymorphic)
+ ($.default \\parser.not_variant)
+ ($.default \\parser.not_tuple)
+ ($.default \\parser.types_do_not_match)
+ ($.default \\parser.wrong_parameter)
+ ($.default \\parser.empty_input)
+ ($.default \\parser.unconsumed_input)
+ ($.default \\parser.parameter)
+ ($.default \\parser.recursive_self)
+ ($.default \\parser.recursive_call)
+
+ ($.documentation \\parser.Env
+ "An environment for type parsing.")
+
+ ($.documentation (\\parser.Parser it)
+ "A parser of Lux types.")
+
+ ($.documentation \\parser.fresh
+ "An empty parsing environment.")
+
+ ($.documentation \\parser.result
+ (format "Applies a parser against a type."
+ \n "Verifies that the parser fully consumes the type's information.")
+ [(result poly type)])
+
+ ($.documentation \\parser.env
+ "Yields the current parsing environment.")
+
+ ($.documentation \\parser.next
+ "Inspect a type in the input stream without consuming it.")
+
+ ($.documentation \\parser.any
+ "Yields a type, without examination.")
+
+ ($.documentation \\parser.local
+ "Apply a parser to the given inputs."
+ [(local types poly)])
+
+ ($.documentation \\parser.with_extension
+ ""
+ [(with_extension type poly)])
+
+ (,, (with_template [<name>]
+ [(`` ($.documentation <name>
+ (format "Parses the contents of a " (,, (template.text [<name>])) " type.")))]
+
+ [\\parser.variant]
+ [\\parser.tuple]
+ ))
+
+ ($.documentation \\parser.polymorphic
+ ""
+ [(polymorphic poly)])
+
+ ($.documentation \\parser.function
+ "Parses a function's inputs and output."
+ [(function in_poly out_poly)])
+
+ ($.documentation \\parser.applied
+ "Parses a type application."
+ [(applied poly)])
+
+ (,, (with_template [<name> <doc>]
+ [($.documentation <name>
+ <doc>)]
+
+ [\\parser.exactly "Parses a type exactly."]
+ [\\parser.sub "Parses a sub type."]
+ [\\parser.super "Parses a super type."]
+ ))
+
+ ($.documentation \\parser.argument
+ ""
+ [(argument env idx)])
+
+ ($.documentation \\parser.this_parameter
+ ""
+ [(this_parameter id)])
+
+ ($.documentation \\parser.existential
+ "Yields an existential type.")
+
+ ($.documentation \\parser.named
+ "Yields a named type.")
+
+ ($.documentation \\parser.recursive
+ ""
+ [(recursive poly)])]
+ [])))
+
(`` (.def .public documentation
(.List $.Module)
($.module /._
@@ -153,7 +259,9 @@
"Local bindings for types."
[(let [side (Either Int Frac)]
(List [side side]))])]
- [/primitive.documentation
+ [..\\parser
+
+ /primitive.documentation
/check.documentation
/dynamic.documentation
/implicit.documentation
diff --git a/stdlib/source/documentation/lux/program.lux b/stdlib/source/documentation/lux/program.lux
index 87e9b607a..4617fafa1 100644
--- a/stdlib/source/documentation/lux/program.lux
+++ b/stdlib/source/documentation/lux/program.lux
@@ -7,9 +7,48 @@
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]]]
+ ["[0]" \\parser]
[\\library
["[0]" /]])
+(.def \\parser
+ (.List $.Module)
+ ($.module \\parser._
+ ""
+ [($.documentation (\\parser.Parser it)
+ "A command-line interface parser.")
+
+ ($.documentation \\parser.result
+ "Executes the parser and verifies that all inputs are processed."
+ [(result parser inputs)])
+
+ ($.documentation \\parser.any
+ "Just returns the next input without applying any logic.")
+
+ ($.documentation \\parser.parse
+ "Parses the next input with a parsing function."
+ [(parse parser)])
+
+ ($.documentation \\parser.this
+ "Checks that a token is in the inputs."
+ [(this reference)])
+
+ ($.documentation \\parser.somewhere
+ "Given a parser, tries to parse it somewhere in the inputs (i.e. not necessarily parsing the immediate inputs)."
+ [(somewhere cli)])
+
+ ($.documentation \\parser.end
+ "Ensures there are no more inputs.")
+
+ ($.documentation \\parser.named
+ "Parses a named parameter and yields its value."
+ [(named name value)])
+
+ ($.documentation \\parser.parameter
+ "Parses a parameter that can have either a short or a long name."
+ [(parameter [short long] value)])]
+ []))
+
(.def .public documentation
(.List $.Module)
($.module /._
@@ -26,4 +65,4 @@
(do io.monad
[data (initialize program with config)]
(do_something_with data)))])]
- []))
+ [..\\parser]))
diff --git a/stdlib/source/documentation/lux/tool.lux b/stdlib/source/documentation/lux/tool.lux
index 0c67d1842..c5d46aba3 100644
--- a/stdlib/source/documentation/lux/tool.lux
+++ b/stdlib/source/documentation/lux/tool.lux
@@ -8,21 +8,6 @@
[collection
["[0]" list]]]]]
["[0]" /
- [compiler
- ["[1][0]" phase]
- [language
- [lux
- ["[1][0]" analysis]
- ["[1][0]" declaration]
- ["[1][0]" generation]
- ["[1][0]" synthesis]]]]])
+ ])
+
-(.def .public documentation
- (.List $.Module)
- (list.together
- (list /phase.documentation
- /analysis.documentation
- /declaration.documentation
- /generation.documentation
- /synthesis.documentation
- )))
diff --git a/stdlib/source/documentation/lux/world/environment.lux b/stdlib/source/documentation/lux/world/environment.lux
index 6f842b4b9..4703069ed 100644
--- a/stdlib/source/documentation/lux/world/environment.lux
+++ b/stdlib/source/documentation/lux/world/environment.lux
@@ -5,9 +5,38 @@
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]]]
+ ["[0]" \\parser]
[\\library
["[0]" /]])
+(.def \\parser
+ (.List $.Module)
+ ($.module \\parser._
+ ""
+ [($.default \\parser.unknown_property)
+
+ ($.documentation \\parser.Property
+ "A property in the environment.")
+
+ ($.documentation \\parser.Environment
+ "An abstraction for environment variables of a program.")
+
+ ($.documentation (\\parser.Parser it)
+ "A parser of environment variables of a program.")
+
+ ($.documentation \\parser.empty
+ "An empty environment.")
+
+ ($.documentation \\parser.property
+ ""
+ [(property name)])
+
+ ($.documentation \\parser.result
+ (format "Executes a parser against the given environment variables."
+ \n "Does not check whether all environment variables were parsed, since they're usually an open set.")
+ [(result parser environment)])]
+ []))
+
(.def .public documentation
(.List $.Module)
($.module /._
@@ -26,4 +55,4 @@
($.documentation /.mock
""
[(mock environment home directory)])]
- []))
+ [..\\parser]))
diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux
index d9ba28ef1..c2fa5c5c1 100644
--- a/stdlib/source/library/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux
@@ -68,7 +68,7 @@
(exception .public (semaphore_is_maxed_out [max_positions Nat])
(exception.report
- "Max Positions" (%.nat max_positions)))
+ (list ["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 f07793cbd..6b2ea833e 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -106,7 +106,7 @@
((,! text#composite) (, g!descriptor)
(, (maybe.else (' "") body))))])))))))))
-(def (report' entries)
+(def .public (report entries)
(-> (List [Text Text]) Text)
(let [header_separator ": "
largest_header_size (list#mix (function (_ [header _] max)
@@ -137,12 +137,6 @@
(on_entry head)
tail))))
-(def .public report
- (syntax (_ [entries (<>.many (<>.and <code>.any <code>.any))])
- (in (list (` ((,! ..report') (list (,* (|> entries
- (list#each (function (_ [header message])
- (` [(, header) (, message)]))))))))))))
-
(def .public (listing format entries)
(All (_ a)
(-> (-> a Text) (List a) Text))
@@ -154,7 +148,7 @@
[0 {.#End}])
product.right
list.reversed
- ..report'))
+ ..report))
(def separator
(let [gap (all "lux text concat" text.new_line text.new_line)
diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux
index 88a27dd5e..afaee51ee 100644
--- a/stdlib/source/library/lux/control/function/contract.lux
+++ b/stdlib/source/library/lux/control/function/contract.lux
@@ -18,7 +18,7 @@
(with_template [<name>]
[(exception .public (<name> [condition Code])
(exception.report
- "Condition" (%.code condition)))]
+ (list ["Condition" (%.code condition)])))]
[pre_condition_failed]
[post_condition_failed]
diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux
index 2900ee735..800dc3627 100644
--- a/stdlib/source/library/lux/control/remember.lux
+++ b/stdlib/source/library/lux/control/remember.lux
@@ -26,15 +26,15 @@
message Text
focus (Maybe Code)])
(exception.report
- "Deadline" (%.date deadline)
- "Today" (%.date today)
- "Message" message
- "Code" (case focus
- {.#Some focus}
- (%.code focus)
+ (list ["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 57b7353ad..bc384140e 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)))
+ (list ["Size" (%.nat size)]
+ ["Index" (%.nat index)])))
(with_template [<safe> <unsafe> <shift>]
[(def .public (<safe> 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)))
+ (list ["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)))
+ (list ["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 2b2f92b94..f36cac720 100644
--- a/stdlib/source/library/lux/data/collection/sequence.lux
+++ b/stdlib/source/library/lux/data/collection/sequence.lux
@@ -246,8 +246,8 @@
(exception .public [a] (index_out_of_bounds [sequence (Sequence a)
index Nat])
(exception.report
- "Size" (at n.decimal encoded (the #size sequence))
- "Index" (at n.decimal encoded index)))
+ (.list ["Size" (at n.decimal encoded (the #size sequence))]
+ ["Index" (at 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 8689701a7..41a582b07 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -73,8 +73,8 @@
(exception .public (<exception> [value Nat])
(exception.report
- "Value" (%.nat value)
- "Maximum" (%.nat (-- <limit>))))
+ (list ["Value" (%.nat value)]
+ ["Maximum" (%.nat (-- <limit>))])))
(primitive .public <type>
Nat
@@ -119,8 +119,8 @@
(exception .public (wrong_character [expected Char
actual Char])
(exception.report
- "Expected" (%.nat expected)
- "Actual" (%.nat actual)))
+ (list ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)])))
(def small_suffix
(Parser Any)
@@ -229,7 +229,7 @@
(exception .public (not_ascii [text Text])
(exception.report
- "Text" (%.text text)))
+ (list ["Text" (%.text text)])))
(def .public name_size Size 31)
(def .public path_size Size 99)
@@ -258,9 +258,9 @@
(exception .public (<exception> [value Text])
(exception.report
- "Value" (%.text value)
- "Size" (%.nat (text.size value))
- "Maximum" (%.nat <size>)))
+ (list ["Value" (%.text value)]
+ ["Size" (%.nat (text.size value))]
+ ["Maximum" (%.nat <size>)])))
(def .public (<in> value)
(-> <representation> (Try <type>))
@@ -428,7 +428,7 @@
(exception .public (invalid_link_flag [value Nat])
(exception.report
- "Value" (%.nat value)))
+ (list ["Value" (%.nat value)])))
(def link_flag_parser
(Parser Link_Flag)
@@ -467,7 +467,7 @@
(exception .public (invalid_mode [value Nat])
(exception.report
- "Value" (%.nat value)))
+ (list ["Value" (%.nat value)])))
(with_expansions [<options> (these ["0000" none]
@@ -752,8 +752,8 @@
(exception .public (wrong_checksum [expected Nat
actual Nat])
(exception.report
- "Expected" (%.nat expected)
- "Actual" (%.nat actual)))
+ (list ["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 6041931ff..3bf1a53dd 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)))))
+ (list ["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))))
+ (list ["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)))
+ (list ["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 9492101c6..2a5d253a2 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -234,8 +234,8 @@
(exception .public (incorrect_quantification [from Nat
to Nat])
(exception.report
- "Input" (format (%.nat from) "," (%.nat to))
- "Should be" (format (%.nat to) "," (%.nat from))))
+ (list ["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 8031919ca..5bf180093 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -382,7 +382,7 @@
(exception .public (cannot_represent_value [type Type])
(exception.report
- "Type" (%.type type)))
+ (list ["Type" (%.type type)])))
(type Representation
(-> Any Text))
@@ -536,8 +536,8 @@
(exception .public (type_hole [location Location
type Type])
(exception.report
- "Location" (%.location location)
- "Type" (%.type type)))
+ (list ["Location" (%.location location)]
+ ["Type" (%.type type)])))
(def .public hole
(syntax (_ [])
@@ -558,7 +558,7 @@
(exception .public (unknown_local_binding [name Text])
(exception.report
- "Name" (%.text name)))
+ (list ["Name" (%.text name)])))
(def .public here
(syntax (_ [targets (is (<code>.Parser (List Target))
@@ -591,14 +591,13 @@
(in (list (` (..log! ("lux text concat"
(, (code.text (%.format (%.location location) text.new_line)))
((,! exception.report)
- (,* (|> targets
- (list#each (function (_ [name format])
- (let [format (case format
- {.#None}
- (` (,! ..inspection))
-
- {.#Some format}
- format)]
- (list (code.text name)
- (` ((, format) (, (code.local name))))))))
- list#conjoint)))))))))))
+ (.list (,* (|> targets
+ (list#each (function (_ [name format])
+ (let [format (case format
+ {.#None}
+ (` (,! ..inspection))
+
+ {.#Some format}
+ format)]
+ (` [(, (code.text name))
+ ((, format) (, (code.local name)))]))))))))))))))))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index a5e50669c..adb868db6 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)))
+ (list ["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 f465089d7..f87ee7be3 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -435,13 +435,13 @@
(exception .public (class_names_cannot_contain_periods [name Text])
(exception.report
- "Name" (%.text name)))
+ (list ["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)))
+ (list ["Name" (%.text name)]
+ ["Type Variables" (exception.listing parser.name type_vars)])))
(def (assertion exception payload test)
(All (_ e) (-> (Exception e) e Bit (Parser Any)))
@@ -474,8 +474,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)))
+ (list ["Unexpected type variable" (%.text name)]
+ ["Expected type variables" (exception.listing parser.name type_vars)])))
(def (type_variable options)
(-> (List (Type Var)) (Parser (Type Parameter)))
@@ -1031,8 +1031,8 @@
(exception .public (insufficient_parameters [expected Nat
actual Nat])
(exception.report
- "Expected" (%.nat expected)
- "Actual" (%.nat actual)))
+ (list ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)])))
(def .public super
(syntax (_ [inputs (<code>.tuple (<>.some <code>.any))
@@ -1109,8 +1109,8 @@
[(exception .public (<name> [class Text
member Text])
(exception.report
- "Class" (%.text class)
- <member> (%.text member)))]
+ (list ["Class" (%.text class)]
+ [<member> (%.text member)])))]
["Field" cannot_get_field]
["Field" cannot_set_field]
@@ -1650,8 +1650,8 @@
(exception .public (cannot_write_to_field [class Text
field Text])
(exception.report
- "Class" (%.text class)
- "Field" (%.text field)))
+ (list ["Class" (%.text class)]
+ ["Field" (%.text field)])))
(def (member_def_interop vars kind class [arg_function_inputs input_jvm_types arg_types] member method_prefix import_format)
(-> (List (Type Var)) Class_Kind (Type Declaration) [(List [Bit Code]) (List (Type Value)) (List Code)] Import_Member_Declaration Text Text (Meta (List Code)))
@@ -1884,7 +1884,7 @@
(exception .public (cannot_convert_to_jvm_type [type .Type])
(exception.report
- "Lux Type" (%.type type)))
+ (list ["Lux type" (%.type type)])))
(with_expansions [<failure> (these (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))]
(def (lux_type->jvm_type context type)
@@ -2111,8 +2111,8 @@
(exception .public (cannot_cast_to_non_object [type (Type Value)])
(exception.report
- "Signature" (..signature type)
- "Reflection" (..reflection type)))
+ (list ["Signature" (..signature type)]
+ ["Reflection" (..reflection type)])))
(def .public is
(syntax (_ [type (..type^ (list))
diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux
index fdc9ea946..794bef35d 100644
--- a/stdlib/source/library/lux/math.lux
+++ b/stdlib/source/library/lux/math.lux
@@ -43,7 +43,7 @@
(exception (no_arithmetic_for [type Type])
(exception.report
- "Type" (%.type type)))
+ (list ["Type" (%.type type)])))
(def (composite phase archive <+> last prevs)
(-> Phase Archive Code Analysis (List Analysis) (Operation Analysis))
diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux
index 16f184bc5..87f575f54 100644
--- a/stdlib/source/library/lux/math/modular.lux
+++ b/stdlib/source/library/lux/math/modular.lux
@@ -48,8 +48,8 @@
(exception .public [%] (incorrect_modulus [modulus (Modulus %)
parsed Int])
(exception.report
- "Expected" (i#encoded (//.divisor modulus))
- "Actual" (i#encoded parsed)))
+ (list ["Expected" (i#encoded (//.divisor modulus))]
+ ["Actual" (i#encoded parsed)])))
(def separator
" mod ")
@@ -142,8 +142,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))))
+ (list ["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/meta/compiler.lux b/stdlib/source/library/lux/meta/compiler.lux
index 1d46450a2..8f9150839 100644
--- a/stdlib/source/library/lux/meta/compiler.lux
+++ b/stdlib/source/library/lux/meta/compiler.lux
@@ -56,4 +56,4 @@
(exception .public (cannot_compile [module Module])
(exception.report
- "Module" module))
+ (list ["Module" module])))
diff --git a/stdlib/source/library/lux/meta/compiler/default/platform.lux b/stdlib/source/library/lux/meta/compiler/default/platform.lux
index cdea7252d..d8c301eb7 100644
--- a/stdlib/source/library/lux/meta/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/meta/compiler/default/platform.lux
@@ -389,19 +389,19 @@
(exception .public (module_cannot_import_itself [module descriptor.Module])
(exception.report
- "Module" (%.text module)))
+ (list ["Module" (%.text module)])))
(exception .public (cannot_import_circular_dependency [importer descriptor.Module
importee descriptor.Module])
(exception.report
- "Importer" (%.text importer)
- "importee" (%.text importee)))
+ (list ["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))))
+ (list ["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)))
+ (list ["Extension" (%.text extension)])))
(def (with_extensions from to)
(All (_ state input output)
@@ -843,9 +843,9 @@
(exception .public (invalid_custom_compiler [definition Symbol
type Type])
(exception.report
- "Definition" (%.symbol definition)
- "Expected Type" (%.type ..Custom)
- "Actual Type" (%.type type)))
+ (list ["Definition" (%.symbol definition)]
+ ["Expected type" (%.type ..Custom)]
+ ["Actual type" (%.type type)])))
(def (custom import! it)
(All (_ <type_vars>)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux
index dd5fde4f2..4756538e2 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux
@@ -160,8 +160,8 @@
(exception .public (invalid_tuple [size Nat])
(exception.report
- "Expected size" ">= 2"
- "Actual size" (%.nat size)))
+ (list ["Expected size" ">= 2"]
+ ["Actual size" (%.nat size)])))
(def .public (coverage pattern)
(-> Pattern (Try Coverage))
@@ -238,14 +238,14 @@
(exception .public (redundancy [so_far Coverage
addition Coverage])
(exception.report
- "Coverage so-far" (format so_far)
- "Additional coverage" (format addition)))
+ (list ["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)))
+ (list ["Expected cases" (%.nat expected)]
+ ["Mismatched cases" (%.nat mismatched)])))
(def .public (exhaustive? coverage)
(-> Coverage Bit)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux
index 4bfa2da6a..5bbf38167 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/inference.lux
+++ b/stdlib/source/library/lux/meta/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)))
+ (list ["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)))
+ (list ["Type" (%.type type)]
+ ["Argument" (%.code argument)])))
(with_template [<name>]
[(exception .public (<name> [type Type])
(exception.report
- "Type" (%.type type)))]
+ (list ["Type" (%.type type)])))]
[not_a_variant]
[not_a_record]
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux
index 9a5de364f..cf6ede122 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/macro.lux
+++ b/stdlib/source/library/lux/meta/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))
+ (list ["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)))
+ (list ["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/meta/compiler/language/lux/analysis/module.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux
index 33e818a9e..dbaa9e8b0 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/module.lux
@@ -26,14 +26,14 @@
(exception .public (unknown_module [module Text])
(exception.report
- "Module" module))
+ (list ["Module" module])))
(with_template [<name>]
[(exception .public (<name> [labels (List Label)
owner Type])
(exception.report
- "Labels" (text.interposed " " labels)
- "Type" (%.type owner)))]
+ (list ["Labels" (text.interposed " " labels)]
+ ["Type" (%.type owner)])))]
[cannot_declare_labels_for_anonymous_type]
[cannot_declare_labels_for_foreign_type]
@@ -42,31 +42,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))
+ (list ["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")))
+ (list ["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/meta/compiler/language/lux/generation.lux b/stdlib/source/library/lux/meta/compiler/language/lux/generation.lux
index c217a6d6c..2e1252dec 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/generation.lux
@@ -44,12 +44,12 @@
(exception .public (cannot_interpret [error Text])
(exception.report
- "Error" error))
+ (list ["Error" error])))
(with_template [<name>]
[(exception .public (<name> [it artifact.ID])
(exception.report
- "Artifact ID" (%.nat it)))]
+ (list ["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)))
+ (list ["Definition" (symbol.short name)]
+ ["Module" (symbol.module name)]
+ ["Known Definitions" (exception.listing product.left known_definitions)])))
(def .public (remember archive name)
(All (_ anchor expression declaration)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis.lux
index 30e4a1360..72885ce92 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis.lux
@@ -38,7 +38,7 @@
(exception .public (invalid [syntax Code])
(exception.report
- "Syntax" (%.code syntax)))
+ (list ["Syntax" (%.code syntax)])))
(def variant_analysis
(template (_ analysis archive tag values)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/case.lux
index 6356d32c5..6c637184c 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/case.lux
@@ -41,33 +41,33 @@
(exception .public (mismatch [type Type
pattern Code])
(exception.report
- "Type" (%.type type)
- "Pattern" (%.code pattern)))
+ (list ["Type" (%.type type)]
+ ["Pattern" (%.code pattern)])))
(exception .public (sum_has_no_case [case Nat
type Type])
(exception.report
- "Case" (%.nat case)
- "Type" (%.type type)))
+ (list ["Case" (%.nat case)]
+ ["Type" (%.type type)])))
(exception .public (invalid [it Code])
(exception.report
- "Pattern" (%.code it)))
+ (list ["Pattern" (%.code it)])))
(exception .public (non_tuple [type Type])
(exception.report
- "Type" (%.type type)))
+ (list ["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)))
+ (list ["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/meta/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux
index d7b26aa8f..2db7b161f 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/complex.lux
@@ -39,14 +39,14 @@
(exception .public (not_a_quantified_type [type Type])
(exception.report
- "Type" (%.type type)))
+ (list ["Type" (%.type type)])))
(with_template [<name>]
[(exception .public (<name> [type Type
members (List Code)])
(exception.report
- "Type" (%.type type)
- "Expression" (%.code (` [(,* members)]))))]
+ (list ["Type" (%.type type)]
+ ["Expression" (%.code (` [(,* members)]))])))]
[invalid_tuple_type]
[cannot_analyse_tuple]
@@ -58,10 +58,10 @@
right? Bit
code Code])
(exception.report
- "Type" (%.type type)
- "Lefts" (%.nat lefts)
- "Right?" (%.bit right?)
- "Expression" (%.code code)))]
+ (list ["Type" (%.type type)]
+ ["Lefts" (%.nat lefts)]
+ ["Right?" (%.bit right?)]
+ ["Expression" (%.code code)])))]
[invalid_variant_type]
[cannot_analyse_variant]
@@ -71,31 +71,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)))))
+ (list ["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)))
+ (list ["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))))
+ (list ["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/meta/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux
index 68d8ed9e4..b14ae34cc 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/library/lux/meta/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)))
+ (list ["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))))
+ (list ["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/meta/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/reference.lux
index 61daacb2f..a232897bb 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/analysis/reference.lux
@@ -26,17 +26,17 @@
foreign Text
definition Symbol])
(exception.report
- "Current" current
- "Foreign" foreign
- "Definition" (%.symbol definition)))
+ (list ["Current" current]
+ ["Foreign" foreign]
+ ["Definition" (%.symbol definition)])))
(exception .public (definition_has_not_been_exported [definition Symbol])
(exception.report
- "Definition" (%.symbol definition)))
+ (list ["Definition" (%.symbol definition)])))
(exception .public (labels_are_not_definitions [definition Symbol])
(exception.report
- "Label" (%.symbol definition)))
+ (list ["Label" (%.symbol definition)])))
(def (definition def_name)
(-> Symbol (Operation Analysis))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
index 86602280e..4fd6f0ed3 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/declaration.lux
@@ -30,15 +30,15 @@
(exception .public (not_a_declaration [code Code])
(exception.report
- "Declaration" (%.code code)))
+ (list ["Declaration" (%.code code)])))
(exception .public (invalid_macro_call [code Code])
(exception.report
- "Code" (%.code code)))
+ (list ["Code" (%.code code)])))
(exception .public (macro_was_not_found [name Symbol])
(exception.report
- "Name" (%.symbol name)))
+ (list ["Name" (%.symbol name)])))
(type Eval
(-> Type Code (Meta Any)))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux
index 36a7deaa1..5606f0a5e 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension.lux
@@ -66,31 +66,31 @@
(exception .public (cannot_overwrite [name Name])
(exception.report
- "Extension" (%.text name)))
+ (list ["Extension" (%.text name)])))
(exception .public (incorrect_arity [name Name
arity Nat
args Nat])
(exception.report
- "Extension" (%.text name)
- "Expected" (%.nat arity)
- "Actual" (%.nat args)))
+ (list ["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)))
+ (list ["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))))
+ (list ["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/meta/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
index 338029e94..36047a0ed 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -159,8 +159,8 @@
[(exception .public (<name> [class External
field Text])
(exception.report
- "Class" (%.text class)
- "Field" (%.text field)))]
+ (list ["Class" (%.text class)]
+ ["Field" (%.text field)])))]
[cannot_set_a_final_field]
[deprecated_field]
@@ -170,13 +170,13 @@
method Text
type .Type])
(exception.report
- "Class" (%.text class)
- "Method" (%.text method)
- "Type" (%.type type)))
+ (list ["Class" (%.text class)]
+ ["Method" (%.text method)]
+ ["Type" (%.type type)])))
(exception .public (deprecated_class [class External])
(exception.report
- "Class" (%.text class)))
+ (list ["Class" (%.text class)])))
(def (ensure_fresh_class! class_loader name)
(-> java/lang/ClassLoader External (Operation Any))
@@ -245,7 +245,7 @@
(with_template [<name>]
[(exception .public (<name> [type .Type])
(exception.report
- "Type" (%.type type)))]
+ (list ["Type" (%.type type)])))]
[non_object]
[non_array]
@@ -256,7 +256,7 @@
(with_template [<name>]
[(exception .public (<name> [class External])
(exception.report
- "Class/type" (%.text class)))]
+ (list ["Class/type" (%.text class)])))]
[non_interface]
[non_throwable]
@@ -271,12 +271,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))))]
+ (list ["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]
@@ -286,9 +286,9 @@
to .Type
value Code])
(exception.report
- "From" (%.type from)
- "To" (%.type to)
- "Value" (%.code value)))
+ (list ["From" (%.type from)]
+ ["To" (%.type to)]
+ ["Value" (%.code value)])))
(with_template [<name>]
[(exception .public (<name> [message Text])
@@ -1761,8 +1761,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))))]
+ (list ["Expected methods" (exception.listing %method expected)]
+ ["Actual methods" (exception.listing %method actual)]))))]
[missing_abstract_methods]
[invalid_overriden_methods]
@@ -2268,16 +2268,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)))
+ (list ["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)))
+ (list ["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])))
@@ -2385,12 +2385,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)))
+ (list ["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/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
index b053b850c..df5a61fc9 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -85,7 +85,7 @@
(these
(exception .public (char_text_must_be_size_1 [text Text])
(exception.report
- "Text" (%.text text)))
+ (list ["Text" (%.text text)])))
(def text_char
(Parser text.Char)
@@ -205,7 +205,7 @@
(exception .public (not_a_type [symbol Symbol])
(exception.report
- "Symbol" (%.symbol symbol)))
+ (list ["Symbol" (%.symbol symbol)])))
(def lux::macro
Handler
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
index 0262cf5eb..5c0593b49 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/lux.lux
@@ -336,15 +336,15 @@
foreign Alias
target Symbol])
(exception.report
- "Local alias" (%.symbol local)
- "Foreign alias" (%.symbol foreign)
- "Target definition" (%.symbol target)))
+ (list ["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)))
+ (list ["Alias" (%.symbol local)]
+ ["Label" (%.symbol foreign)])))
(def (define_alias alias original)
(-> Text Symbol (/////analysis.Operation Any))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
index 668af9d43..8f73277d6 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -366,7 +366,7 @@
(exception .public (not_an_object_array [arrayJT (Type Array)])
(exception.report
- "JVM Type" (..signature arrayJT)))
+ (list ["JVM type" (..signature arrayJT)])))
(def .public object_array
(Parser (Type Object))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
index ca870abef..c5ff3c185 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
@@ -69,20 +69,20 @@
(exception .public (cannot_load [class Text
error Text])
(exception.report
- "Class" class
- "Error" error))
+ (list ["Class" class]
+ ["Error" error])))
(exception .public (invalid_field [class Text
field Text
error Text])
(exception.report
- "Class" class
- "Field" field
- "Error" error))
+ (list ["Class" class]
+ ["Field" field]
+ ["Error" error])))
(exception .public (invalid_value [class Text])
(exception.report
- "Class" class))
+ (list ["Class" class])))
(def (class_value class_name class)
(-> Text (java/lang/Class java/lang/Object) (Try Any))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/function.lux
index a97634d68..e9507024a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/function.lux
@@ -34,8 +34,8 @@
(exception .public (cannot_find_foreign_variable_in_environment [foreign Register
environment (Environment Synthesis)])
(exception.report
- "Foreign" (%.nat foreign)
- "Environment" (exception.listing /.%synthesis environment)))
+ (list ["Foreign" (%.nat foreign)]
+ ["Environment" (exception.listing /.%synthesis environment)])))
(def arity_arguments
(-> Arity (List Synthesis))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
index 80fce0c79..f6ef820af 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
@@ -220,7 +220,7 @@
(with_template [<name>]
[(exception .public (<name> [register Register])
(exception.report
- "Register" (%.nat register)))]
+ (list ["Register" (%.nat register)])))]
[redundant_declaration]
[unknown_register]
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/program.lux b/stdlib/source/library/lux/meta/compiler/language/lux/program.lux
index 9b9c15e3f..502922736 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/program.lux
+++ b/stdlib/source/library/lux/meta/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)))
+ (list ["Modules" (exception.listing %.text modules)])))
(def .public (context archive)
(-> Archive (Try unit.ID))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux
index 922ab5495..86d0cc16a 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux
@@ -164,7 +164,7 @@
(exception .public (end_of_file [module Text])
(exception.report
- "Module" (%.text module)))
+ (list ["Module" (%.text module)])))
(def amount_of_input_shown 64)
@@ -178,15 +178,15 @@
input Text
offset Offset])
(exception.report
- "File" file
- "Line" (%.nat line)
- "Column" (%.nat column)
- "Context" (%.text context)
- "Input" (input_at offset input)))
+ (list ["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)))
+ (list ["Text" (%.text text)])))
(def !failure
(template (_ parser where offset source_code)
diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive.lux b/stdlib/source/library/lux/meta/compiler/meta/archive.lux
index 75612d11a..a67b84f92 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/meta/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)))
+ (list ["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))))
+ (list ["Module" (%.text module)]
+ ["Old key" (signature.description (document.signature old))]
+ ["New key" (signature.description (document.signature new))])))
(with_template [<name>]
[(exception .public (<name> [it descriptor.Module])
(exception.report
- "Module" (%.text it)))]
+ (list ["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)))
+ (list ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)])))
(def .public (import expected binary)
(-> Version Binary (Try Archive))
diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
index 46f7e2d5e..3baa41932 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux
@@ -23,8 +23,8 @@
(exception .public (invalid_signature [expected Signature
actual Signature])
(exception.report
- "Expected" (signature.description expected)
- "Actual" (signature.description actual)))
+ (list ["Expected" (signature.description expected)]
+ ["Actual" (signature.description actual)])))
(primitive .public (Document d)
(Record
diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux
index fa6493f90..48f9fb04c 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux
@@ -147,7 +147,7 @@
(exception .public (invalid_category [tag Nat])
(exception.report
- "Tag" (%.nat tag)))
+ (list ["Tag" (%.nat tag)])))
(def .public parser
(Parser Registry)
diff --git a/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux b/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux
index 0e605d2e6..081911993 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/cache/module.lux
@@ -29,9 +29,9 @@
@module module.ID
error Text])
(exception.report
- "Archive" archive
- "Module ID" (%.nat @module)
- "Error" error))
+ (list ["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/meta/compiler/meta/import.lux b/stdlib/source/library/lux/meta/compiler/meta/import.lux
index bb28515a9..b904d3df6 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/import.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/import.lux
@@ -34,8 +34,8 @@
(exception .public (duplicate [library Library
module Module])
(exception.report
- "Module" (%.text module)
- "Library" (%.text library)))
+ (list ["Module" (%.text module)]
+ ["Library" (%.text library)])))
(type .public Import
(Dictionary file.Path Binary))
diff --git a/stdlib/source/library/lux/meta/compiler/meta/io/context.lux b/stdlib/source/library/lux/meta/compiler/meta/io/context.lux
index 3bf9f0397..d5cc32d72 100644
--- a/stdlib/source/library/lux/meta/compiler/meta/io/context.lux
+++ b/stdlib/source/library/lux/meta/compiler/meta/io/context.lux
@@ -35,12 +35,12 @@
(exception .public (cannot_find_module [importer Module
module Module])
(exception.report
- "Module" (%.text module)
- "Importer" (%.text importer)))
+ (list ["Module" (%.text module)]
+ ["Importer" (%.text importer)])))
(exception .public (cannot_read_module [module Module])
(exception.report
- "Module" (%.text module)))
+ (list ["Module" (%.text module)])))
(type .public Extension
Text)
diff --git a/stdlib/source/library/lux/meta/macro/context.lux b/stdlib/source/library/lux/meta/macro/context.lux
index 464d0cfea..0cf61b454 100644
--- a/stdlib/source/library/lux/meta/macro/context.lux
+++ b/stdlib/source/library/lux/meta/macro/context.lux
@@ -27,7 +27,7 @@
(exception .public (no_definition [it Symbol])
(exception.report
- "Definition" (symbol#encoded it)))
+ (list ["Definition" (symbol#encoded it)])))
(.def (global it)
(-> Symbol (Meta Any))
diff --git a/stdlib/source/library/lux/meta/macro/local.lux b/stdlib/source/library/lux/meta/macro/local.lux
index 9b2ec3156..8e0d8d709 100644
--- a/stdlib/source/library/lux/meta/macro/local.lux
+++ b/stdlib/source/library/lux/meta/macro/local.lux
@@ -21,14 +21,14 @@
(exception .public (unknown_module [module Text])
(exception.report
- "Module" (text.format module)))
+ (list ["Module" (text.format module)])))
(with_template [<name>]
[(exception .public (<name> [module Text
definition Text])
(exception.report
- "Module" (text.format module)
- "Definition" (text.format definition)))]
+ (list ["Module" (text.format module)]
+ ["Definition" (text.format definition)])))]
[cannot_shadow_definition]
[unknown_definition]
diff --git a/stdlib/source/library/lux/meta/macro/syntax/definition.lux b/stdlib/source/library/lux/meta/macro/syntax/definition.lux
index 750c94d60..44030c108 100644
--- a/stdlib/source/library/lux/meta/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/meta/macro/syntax/definition.lux
@@ -82,7 +82,7 @@
(exception .public (lacks_type [definition Definition])
(exception.report
- "Definition" (%.code (..format definition))))
+ (list ["Definition" (%.code (..format definition))])))
(def .public (typed compiler)
(-> Lux (Parser Definition))
diff --git a/stdlib/source/library/lux/meta/macro/template.lux b/stdlib/source/library/lux/meta/macro/template.lux
index 20cd85f2b..cb6acd2d5 100644
--- a/stdlib/source/library/lux/meta/macro/template.lux
+++ b/stdlib/source/library/lux/meta/macro/template.lux
@@ -130,8 +130,8 @@
(exception .public (irregular_arguments [expected Nat
actual Nat])
(exception.report
- "Expected" (at nat.decimal encoded expected)
- "Actual" (at nat.decimal encoded actual)))
+ (list ["Expected" (at nat.decimal encoded expected)]
+ ["Actual" (at nat.decimal encoded actual)])))
(def (macro (open "_[0]"))
(-> Local Macro)
diff --git a/stdlib/source/library/lux/meta/target/jvm/bytecode.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode.lux
index 906216326..6123ee60e 100644
--- a/stdlib/source/library/lux/meta/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/bytecode.lux
@@ -131,7 +131,7 @@
(exception .public (label_has_already_been_set [label Label])
(exception.report
- "Label" (%.nat label)))
+ (list ["Label" (%.nat label)])))
(exception .public (mismatched_environments [instruction Symbol
label Label
@@ -139,11 +139,11 @@
expected Stack
actual Stack])
(exception.report
- "Instruction" (%.symbol instruction)
- "Label" (%.nat label)
- "Address" (/address.text address)
- "Expected" (/stack.text expected)
- "Actual" (/stack.text actual)))
+ (list ["Instruction" (%.symbol instruction)]
+ ["Label" (%.nat label)]
+ ["Address" (/address.text address)]
+ ["Expected" (/stack.text expected)]
+ ["Actual" (/stack.text actual)])))
(def .public (set? label)
(-> Label (Bytecode (Maybe [Stack Address])))
@@ -681,7 +681,7 @@
(exception .public (invalid_register [id Nat])
(exception.report
- "ID" (%.nat id)))
+ (list ["ID" (%.nat id)])))
(def (register id)
(-> Nat (Bytecode Register))
@@ -783,15 +783,15 @@
(exception .public (unknown_label [label Label])
(exception.report
- "Label" (%.nat label)))
+ (list ["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)))
+ (list ["Label" (%.nat label)]
+ ["Start" (|> @from /address.value //unsigned.value %.nat)]
+ ["Target" (|> jump //signed.value %.int)])))
(type Any_Jump
(Either Big_Jump
@@ -811,7 +811,7 @@
(exception .public (unset_label [label Label])
(exception.report
- "Label" (%.nat label)))
+ (list ["Label" (%.nat label)])))
(def (resolve_label label resolver)
(-> Label Resolver (Try [Stack Address]))
@@ -1044,7 +1044,7 @@
(exception .public (multiarray_cannot_be_zero_dimensional [class (Type Object)])
(exception.report
- "Class" (..reflection class)))
+ (list ["Class" (..reflection class)])))
(def .public (multianewarray class dimensions)
(-> (Type Object) U1 (Bytecode Any))
@@ -1131,8 +1131,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)))
+ (list ["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/meta/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment.lux
index fcb4540c7..49e3455f4 100644
--- a/stdlib/source/library/lux/meta/target/jvm/bytecode/environment.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment.lux
@@ -67,8 +67,8 @@
(exception .public (mismatched_stacks [expected Stack
actual Stack])
(exception.report
- "Expected" (/stack.text expected)
- "Actual" (/stack.text actual)))
+ (list ["Expected" (/stack.text expected)]
+ ["Actual" (/stack.text actual)])))
(def .public (continue expected environment)
(-> Stack Environment (Try [Stack Environment]))
diff --git a/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux
index 91d7c15c6..430263c8d 100644
--- a/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux
@@ -46,8 +46,8 @@
(exception .public (value_exceeds_the_scope [value Int
scope Nat])
(exception.report
- "Value" (%.int value)
- "Scope (in bytes)" (%.nat scope)))
+ (list ["Value" (%.int value)]
+ ["Scope (in bytes)" (%.nat scope)])))
(with_template [<bytes> <name> <size> <constructor> <maximum> <minimum> <+> <->]
[(with_expansions [<raw> (template.symbol [<name> "'"])]
diff --git a/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux
index 858d06d80..1c2bc77a6 100644
--- a/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux
@@ -48,18 +48,18 @@
value Nat
maximum (Unsigned Any)])
(exception.report
- "Type" (%.symbol type)
- "Value" (%.nat value)
- "Maximum" (%.nat (representation maximum))))
+ (list ["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))))
+ (list ["Type" (%.symbol type)]
+ ["Parameter" (%.nat (representation parameter))]
+ ["Subject" (%.nat (representation subject))])))
(with_template [<bytes> <name> <size> <constructor> <maximum> <+> <-> <max>]
[(with_expansions [<raw> (template.symbol [<name> "'"])]
diff --git a/stdlib/source/library/lux/meta/target/jvm/loader.lux b/stdlib/source/library/lux/meta/target/jvm/loader.lux
index 627b10cd5..05d45cfad 100644
--- a/stdlib/source/library/lux/meta/target/jvm/loader.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/loader.lux
@@ -25,17 +25,17 @@
(exception .public (already_stored [class Text])
(exception.report
- "Class" class))
+ (list ["Class" class])))
(exception .public (unknown [class Text])
(exception.report
- "Class" class))
+ (list ["Class" class])))
(exception .public (cannot_define [class Text
error Text])
(exception.report
- "Class" class
- "Error" error))
+ (list ["Class" class]
+ ["Error" error])))
(import java/lang/Object
"[1]::[0]"
diff --git a/stdlib/source/library/lux/meta/target/jvm/reflection.lux b/stdlib/source/library/lux/meta/target/jvm/reflection.lux
index 3c5145a9d..a9c4fc3ce 100644
--- a/stdlib/source/library/lux/meta/target/jvm/reflection.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/reflection.lux
@@ -98,13 +98,13 @@
(exception .public (unknown_class [class External])
(exception.report
- "Class" (%.text class)))
+ (list ["Class" (%.text class)])))
(with_template [<name>]
[(exception .public (<name> [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)))]
+ (list ["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)))
+ (list ["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)))
+ (list ["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)))
+ (list ["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)))
+ (list ["Field" (java/lang/Object::toString field)]
+ ["Owner" (java/lang/Object::toString owner)]
+ ["Target" (java/lang/Object::toString target)])))
(with_template [<name>]
[(exception .public (<name> [field Text
class (java/lang/Class java/lang/Object)])
(exception.report
- "Field" (%.text field)
- "Class" (java/lang/Object::toString class)))]
+ (list ["Field" (%.text field)]
+ ["Class" (java/lang/Object::toString class)])))]
[unknown_field]
[not_a_static_field]
diff --git a/stdlib/source/library/lux/meta/target/jvm/type/lux.lux b/stdlib/source/library/lux/meta/target/jvm/type/lux.lux
index a8629d236..3af93e1b5 100644
--- a/stdlib/source/library/lux/meta/target/jvm/type/lux.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/type/lux.lux
@@ -46,7 +46,7 @@
(exception .public (unknown_var [var Text])
(exception.report
- "Var" (%.text var)))
+ (list ["Var" (%.text var)])))
(def void
(Parser (Check Type))
diff --git a/stdlib/source/library/lux/meta/type/check.lux b/stdlib/source/library/lux/meta/type/check.lux
index 2e06e8635..90fb49156 100644
--- a/stdlib/source/library/lux/meta/type/check.lux
+++ b/stdlib/source/library/lux/meta/type/check.lux
@@ -34,31 +34,31 @@
(exception .public (unknown_type_var [id Nat])
(exception.report
- "ID" (n#encoded id)))
+ (list ["ID" (n#encoded id)])))
(exception .public (unbound_type_var [id Nat])
(exception.report
- "ID" (n#encoded id)))
+ (list ["ID" (n#encoded id)])))
(exception .public (invalid_type_application [funcT Type
argT Type])
(exception.report
- "Type function" (//.format funcT)
- "Type argument" (//.format argT)))
+ (list ["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)))
+ (list ["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)))
+ (list ["Expected" (//.format expected)]
+ ["Actual" (//.format actual)])))
(type .public Var
Nat)
@@ -340,7 +340,7 @@
(exception .public (cannot_identify [var Var])
(exception.report
- "Var" (n#encoded var)))
+ (list ["Var" (n#encoded var)])))
(def .public (identity aliases @)
(-> (List Var) Var (Check Type))
diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux
index ea4635966..303fbdf63 100644
--- a/stdlib/source/library/lux/meta/type/dynamic.lux
+++ b/stdlib/source/library/lux/meta/type/dynamic.lux
@@ -19,8 +19,8 @@
(exception .public (wrong_type [expected Type
actual Type])
(exception.report
- "Expected" (%.type expected)
- "Actual" (%.type actual)))
+ (list ["Expected" (%.type expected)]
+ ["Actual" (%.type actual)])))
(primitive .public Dynamic
[Type Any]
diff --git a/stdlib/source/library/lux/meta/type/resource.lux b/stdlib/source/library/lux/meta/type/resource.lux
index 1f7ead9f5..fa159c93f 100644
--- a/stdlib/source/library/lux/meta/type/resource.lux
+++ b/stdlib/source/library/lux/meta/type/resource.lux
@@ -104,7 +104,7 @@
(exception .public (index_cannot_be_repeated [index Nat])
(exception.report
- "Index" (%.nat index)))
+ (list ["Index" (%.nat index)])))
(exception .public amount_cannot_be_zero)
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index fbdc4635e..b3de0884d 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))))
+ (list ["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)
@@ -390,7 +390,7 @@
(exception .public (error_during_execution [error Text])
(exception.report
- "Error" (%.text error)))
+ (list ["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 e020c4069..d24e87497 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -41,8 +41,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))))
+ (list ["Time (in milli-seconds)" (n#encoded time)]
+ ["Maximum (in milli-seconds)" (n#encoded (-- limit))])))
(def separator ":")
@@ -60,9 +60,9 @@
(with_template [<maximum> <parser> <exception> <sub_parser>]
[(exception .public (<exception> [value Nat])
(exception.report
- "Value" (n#encoded value)
- "Minimum" (n#encoded 0)
- "Maximum" (n#encoded (-- <maximum>))))
+ (list ["Value" (n#encoded value)]
+ ["Minimum" (n#encoded 0)]
+ ["Maximum" (n#encoded (-- <maximum>))])))
(def <parser>
(Parser Nat)
diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux
index 8140b076b..09fd828ae 100644
--- a/stdlib/source/library/lux/time/date.lux
+++ b/stdlib/source/library/lux/time/date.lux
@@ -54,11 +54,11 @@
month Month
day Nat])
(exception.report
- "Value" (n#encoded day)
- "Minimum" (n#encoded ..minimum_day)
- "Maximum" (n#encoded (..month_days year month))
- "Year" (at //year.codec encoded year)
- "Month" (n#encoded (//month.number month))))
+ (list ["Value" (n#encoded day)]
+ ["Minimum" (n#encoded ..minimum_day)]
+ ["Maximum" (n#encoded (..month_days year month))]
+ ["Year" (at //year.codec encoded year)]
+ ["Month" (n#encoded (//month.number month))])))
(def (padded value)
(-> Nat Text)
@@ -156,9 +156,9 @@
(with_template [<minimum> <maximum> <parser> <exception>]
[(exception .public (<exception> [value Nat])
(exception.report
- "Value" (n#encoded value)
- "Minimum" (n#encoded <minimum>)
- "Maximum" (n#encoded <maximum>)))
+ (list ["Value" (n#encoded value)]
+ ["Minimum" (n#encoded <minimum>)]
+ ["Maximum" (n#encoded <maximum>)])))
(def <parser>
(Parser Nat)
diff --git a/stdlib/source/library/lux/time/day.lux b/stdlib/source/library/lux/time/day.lux
index 10c0a6498..4f1570d43 100644
--- a/stdlib/source/library/lux/time/day.lux
+++ b/stdlib/source/library/lux/time/day.lux
@@ -95,7 +95,7 @@
(exception .public (not_a_day_of_the_week [value Text])
(exception.report
- "Value" (text.format value)))
+ (list ["Value" (text.format value)])))
(def .public codec
(Codec Text Day)
@@ -153,11 +153,11 @@
(exception .public (invalid_day [number Nat])
(exception.report
- "Number" (at n.decimal encoded number)
- "Valid range" (all "lux text concat"
- (at n.decimal encoded (..number {#Sunday}))
- " ~ "
- (at n.decimal encoded (..number {#Saturday})))))
+ (list ["Number" (at n.decimal encoded number)]
+ ["Valid range" (all "lux text concat"
+ (at n.decimal encoded (..number {#Sunday}))
+ " ~ "
+ (at 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 85f40252c..c2e88c976 100644
--- a/stdlib/source/library/lux/time/month.lux
+++ b/stdlib/source/library/lux/time/month.lux
@@ -81,11 +81,11 @@
(exception .public (invalid_month [number Nat])
(exception.report
- "Number" (at n.decimal encoded number)
- "Valid range" (all "lux text concat"
- (at n.decimal encoded (..number {#January}))
- " ~ "
- (at n.decimal encoded (..number {#December})))))
+ (list ["Number" (at n.decimal encoded number)]
+ ["Valid range" (all "lux text concat"
+ (at n.decimal encoded (..number {#January}))
+ " ~ "
+ (at n.decimal encoded (..number {#December})))])))
(def .public (by_number number)
(-> Nat (Try Month))
@@ -210,7 +210,7 @@
(exception .public (not_a_month_of_the_year [value Text])
(exception.report
- "Value" (text.format value)))
+ (list ["Value" (text.format value)])))
(def .public codec
(Codec Text Month)
diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux
index c7343cb56..ba85d53ef 100644
--- a/stdlib/source/library/lux/world/environment.lux
+++ b/stdlib/source/library/lux/world/environment.lux
@@ -38,7 +38,7 @@
(exception .public (unknown_environment_variable [name Text])
(exception.report
- "Name" (%.text name)))
+ (list ["Name" (%.text name)])))
(type .public (Environment !)
(Interface
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 09334d194..560ae9e4e 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -148,7 +148,7 @@
(with_template [<name>]
[(exception .public (<name> [file Path])
(exception.report
- "Path" file))]
+ (list ["Path" file])))]
[cannot_make_file]
[cannot_find_file]
@@ -814,7 +814,7 @@
... (with_template [<name>]
... [(exception .public (<name> [file Path])
... (exception.report
- ... "Path" file))]
+ ... (list ["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 300267cf2..fac39061f 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -97,7 +97,7 @@
(with_template [<name>]
[(exception .public (<name> [path //.Path])
(exception.report
- "Path" (%.text path)))]
+ (list ["Path" (%.text path)])))]
[not_being_watched]
[cannot_poll_a_non_existent_directory]
diff --git a/stdlib/source/parser/lux/data/binary.lux b/stdlib/source/parser/lux/data/binary.lux
index 8cd81ed6d..d1cf273f3 100644
--- a/stdlib/source/parser/lux/data/binary.lux
+++ b/stdlib/source/parser/lux/data/binary.lux
@@ -41,8 +41,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)))
+ (.list ["Binary length" (%.nat binary_length)]
+ ["Bytes read" (%.nat bytes_read)])))
(with_template [<name> <extension>]
[(def <name>
@@ -93,9 +93,9 @@
start Nat
end Nat])
(exception.report
- "Length" (%.nat length)
- "Range start" (%.nat start)
- "Range end" (%.nat end)))
+ (.list ["Length" (%.nat length)]
+ ["Range start" (%.nat start)]
+ ["Range end" (%.nat end)])))
(with_template [<name> <size> <read>]
[(def .public <name>
@@ -129,8 +129,8 @@
(exception .public (invalid_tag [range Nat
byte Nat])
(exception.report
- "Tag range" (%.nat range)
- "Tag value" (%.nat byte)))
+ (.list ["Tag range" (%.nat range)]
+ ["Tag value" (%.nat byte)])))
(def !variant
(template (!variant <case>+)
@@ -162,8 +162,8 @@
(exception .public (not_a_bit [value Nat])
(exception.report
- "Expected values" "either 0 or 1"
- "Actual value" (%.nat value)))
+ (.list ["Expected values" "either 0 or 1"]
+ ["Actual value" (%.nat value)])))
(def .public bit
(Parser Bit)
diff --git a/stdlib/source/parser/lux/data/format/json.lux b/stdlib/source/parser/lux/data/format/json.lux
index c125d79d1..d440cd091 100644
--- a/stdlib/source/parser/lux/data/format/json.lux
+++ b/stdlib/source/parser/lux/data/format/json.lux
@@ -27,7 +27,7 @@
(exception .public (unconsumed_input [input (List JSON)])
(exception.report
- "Input" (exception.listing /.format input)))
+ (list ["Input" (exception.listing /.format input)])))
(exception .public empty_input)
@@ -57,7 +57,7 @@
(exception .public (unexpected_value [value JSON])
(exception.report
- "Value" (/.format value)))
+ (list ["Value" (/.format value)])))
(with_template [<name> <type> <tag>]
[(def .public <name>
@@ -80,8 +80,8 @@
(exception .public [a] (value_mismatch [reference JSON
sample JSON])
(exception.report
- "Reference" (/.format reference)
- "Sample" (/.format sample)))
+ (list ["Reference" (/.format reference)]
+ ["Sample" (/.format sample)])))
(with_template [<test> <check> <type> <equivalence> <tag>]
[(def .public (<test> test)
diff --git a/stdlib/source/parser/lux/data/format/xml.lux b/stdlib/source/parser/lux/data/format/xml.lux
index 70376d2c6..0a54431e2 100644
--- a/stdlib/source/parser/lux/data/format/xml.lux
+++ b/stdlib/source/parser/lux/data/format/xml.lux
@@ -27,18 +27,18 @@
(exception .public (wrong_tag [expected Tag
actual Tag])
(exception.report
- "Expected" (%.text (/.tag expected))
- "Actual" (%.text (/.tag actual))))
+ (list ["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)))
+ (list ["Expected" (%.text (/.attribute expected))]
+ ["Available" (exception.listing (|>> /.attribute %.text) available)])))
(exception .public (unconsumed_inputs [inputs (List XML)])
(exception.report
- "Inputs" (exception.listing (at /.codec encoded) inputs)))
+ (list ["Inputs" (exception.listing (at /.codec encoded) inputs)])))
(def (result' parser attrs documents)
(All (_ a) (-> (Parser a) Attrs (List XML) (Try a)))
diff --git a/stdlib/source/parser/lux/data/text.lux b/stdlib/source/parser/lux/data/text.lux
index 31a12ed16..75c30816f 100644
--- a/stdlib/source/parser/lux/data/text.lux
+++ b/stdlib/source/parser/lux/data/text.lux
@@ -59,15 +59,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)))
+ (list ["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)))
+ (list ["Offset" (n#encoded offset)]
+ ["Input" (..left_over offset tape)])))
(def .public (result parser input)
(All (_ a) (-> (Parser a) Text (Try a)))
@@ -136,7 +136,7 @@
(exception .public (cannot_match [reference Text])
(exception.report
- "Reference" (/.format reference)))
+ (list ["Reference" (/.format reference)])))
(def .public (this reference)
(-> Text (Parser Any))
@@ -233,8 +233,8 @@
[(exception .public (<name> [options Text
character Char])
(exception.report
- "Options" (/.format options)
- "Character" (/.format (/.of_char character))))]
+ (list ["Options" (/.format options)]
+ ["Character" (/.format (/.of_char character))])))]
[character_should_be]
[character_should_not_be]
@@ -280,7 +280,7 @@
(exception .public (character_does_not_satisfy_predicate [character Char])
(exception.report
- "Character" (/.format (/.of_char character))))
+ (list ["Character" (/.format (/.of_char character))])))
(def .public (satisfies parser)
(-> (-> Char Bit) (Parser Text))
diff --git a/stdlib/source/parser/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/parser/lux/meta/compiler/language/lux/analysis.lux
index 999fca556..e8be9f6dc 100644
--- a/stdlib/source/parser/lux/meta/compiler/language/lux/analysis.lux
+++ b/stdlib/source/parser/lux/meta/compiler/language/lux/analysis.lux
@@ -39,11 +39,11 @@
(exception .public (cannot_parse [input (List Analysis)])
(exception.report
- "Input" (exception.listing /.format input)))
+ (list ["Input" (exception.listing /.format input)])))
(exception .public (unconsumed_input [input (List Analysis)])
(exception.report
- "Input" (exception.listing /.format input)))
+ (list ["Input" (exception.listing /.format input)])))
(type .public Parser
(//.Parser (List Analysis)))
diff --git a/stdlib/source/parser/lux/meta/compiler/language/lux/synthesis.lux b/stdlib/source/parser/lux/meta/compiler/language/lux/synthesis.lux
index 76248a4af..9431da2a7 100644
--- a/stdlib/source/parser/lux/meta/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/parser/lux/meta/compiler/language/lux/synthesis.lux
@@ -32,21 +32,21 @@
(exception .public (cannot_parse [input (List Synthesis)])
(exception.report
- "Input" (exception.listing /.%synthesis input)))
+ (list ["Input" (exception.listing /.%synthesis input)])))
(exception .public (unconsumed_input [input (List Synthesis)])
(exception.report
- "Input" (exception.listing /.%synthesis input)))
+ (list ["Input" (exception.listing /.%synthesis input)])))
(exception .public (expected_empty_input [input (List Synthesis)])
(exception.report
- "Input" (exception.listing /.%synthesis input)))
+ (list ["Input" (exception.listing /.%synthesis input)])))
(exception .public (wrong_arity [expected Arity
actual Arity])
(exception.report
- "Expected" (%.nat expected)
- "Actual" (%.nat actual)))
+ (list ["Expected" (%.nat expected)]
+ ["Actual" (%.nat actual)])))
(exception .public empty_input)
diff --git a/stdlib/source/parser/lux/meta/type.lux b/stdlib/source/parser/lux/meta/type.lux
index 6f31848ae..b7cc07bef 100644
--- a/stdlib/source/parser/lux/meta/type.lux
+++ b/stdlib/source/parser/lux/meta/type.lux
@@ -32,7 +32,7 @@
(with_template [<name>]
[(exception .public (<name> [type Type])
(exception.report
- "Type" (%.type type)))]
+ (list ["Type" (%.type type)])))]
[not_existential]
[not_recursive]
@@ -50,8 +50,8 @@
[(exception .public (<name> [expected Type
actual Type])
(exception.report
- "Expected" (%.type expected)
- "Actual" (%.type actual)))]
+ (list ["Expected" (%.type expected)]
+ ["Actual" (%.type actual)])))]
[types_do_not_match]
[wrong_parameter]
@@ -61,9 +61,9 @@
(exception .public (unconsumed_input [remaining (List Type)])
(exception.report
- "Types" (|> remaining
- (list#each (|>> %.type (format text.new_line "* ")))
- (text.interposed ""))))
+ (list ["Types" (|> remaining
+ (list#each (|>> %.type (format text.new_line "* ")))
+ (text.interposed ""))])))
(type .public Env
(Dictionary Nat [Type Code]))
diff --git a/stdlib/source/parser/lux/world/environment.lux b/stdlib/source/parser/lux/world/environment.lux
index 33089f2a3..311048fdf 100644
--- a/stdlib/source/parser/lux/world/environment.lux
+++ b/stdlib/source/parser/lux/world/environment.lux
@@ -20,7 +20,7 @@
(exception .public (unknown_property [property Property])
(exception.report
- "Property" (%.text property)))
+ (list ["Property" (%.text property)])))
(type .public (Parser a)
(//.Parser Environment a))
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index 6e6d9abfb..870ae6dd3 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -99,10 +99,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))))
+ (list ["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 02b0d97f2..5cdbd0d1d 100644
--- a/stdlib/source/program/aedifex/artifact/time/date.lux
+++ b/stdlib/source/program/aedifex/artifact/time/date.lux
@@ -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))))
+ (list ["Minimum" (%.int ..min_year)]
+ ["Maximum" (%.int ..max_year)]
+ ["Year" (%.int (year.value year))])))
(primitive .public Date
date.Date
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
index f0a7b7a9e..4ffc6e641 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 (at ///dependency.order <))
- (exception.listing ..format))
- "Local failures" (|> local_failures
- (list.sorted (at ///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 (at ///dependency.order <))
- (exception.listing ..format))
- "Remote failures" (|> remote_failures
- (list.sorted (at ///dependency.order <))
- (exception.listing ..format)))
+ (list ["Local successes" (|> local_successes
+ (list.sorted (at ///dependency.order <))
+ (exception.listing ..format))]
+ ["Local failures" (|> local_failures
+ (list.sorted (at ///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 (at ///dependency.order <))
+ (exception.listing ..format))]
+ ["Remote failures" (|> remote_failures
+ (list.sorted (at ///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 2d48fe6b1..7cabf5b88 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)))]
+ (list ["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))))
+ (list ["Artifact" (%.text (///artifact.format (the //.#artifact dependency)))]
+ ["Type" (%.text (the //.#type dependency))])))
(with_template [<sigil> <name> <doing> <at>]
[(def (<name> console repository artifact)
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index 1c853512c..b292f004b 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -84,16 +84,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))))
+ (list ["Pseudo hash" (%.text value)]
+ ["Expected size" (%.nat size)]
+ ["Actual size" (%.nat (text.size value))])))
(with_template [<name> <size>]
[(exception .public (<name> [data Binary])
(exception.report
- "Pseudo hash" (%.text (..encoded data))
- "Expected size" (%.nat <size>)
- "Actual size" (%.nat (binary.size data))))]
+ (list ["Pseudo hash" (%.text (..encoded data))]
+ ["Expected size" (%.nat <size>)]
+ ["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 7be915cb1..d94a31b48 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)))
+ (list ["Name" (%.text name)])))
(exception .public (circular_dependency [dependee Name
dependent Name])
(exception.report
- "Dependent" (%.text dependent)
- "Dependee" (%.text dependee)))
+ (list ["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 2cbeae80e..b5b201093 100644
--- a/stdlib/source/program/aedifex/repository/remote.lux
+++ b/stdlib/source/program/aedifex/repository/remote.lux
@@ -37,8 +37,8 @@
[(exception .public (<name> [url URL
status Nat])
(exception.report
- "URL" (%.text url)
- "Status Code" (%.nat status)))]
+ (list ["URL" (%.text url)]
+ ["Status Code" (%.nat status)])))]
[download_failure]
[upload_failure]
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux
index a3caba277..b76a8f1f1 100644
--- a/stdlib/source/test/aedifex/repository.lux
+++ b/stdlib/source/test/aedifex/repository.lux
@@ -44,11 +44,11 @@
(exception (not_found [uri URI])
(exception.report
- "URI" (%.text uri)))
+ (list ["URI" (%.text uri)])))
(exception (cannot_upload [uri URI])
(exception.report
- "URI" (%.text uri)))
+ (list ["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 c31a78b65..09c12275c 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -21,7 +21,7 @@
(def label "YOLO")
(/.exception (custom_exception [value Nat])
- (/.report label (%.nat value)))
+ (/.report (list [label (%.nat value)])))
(def .public test
Test
@@ -75,8 +75,8 @@
(/.when ..an_exception (function (_ ex) wrong))
(/.otherwise (function (_ ex) expected)))))
(_.coverage [/.report]
- (let [report (/.report field0 value0
- field1 value1)]
+ (let [report (/.report (list [field0 value0]
+ [field1 value1]))]
(and (text.contains? field0 report)
(text.contains? value0 report)
(text.contains? field1 report)