From 880cb37c261df20b7b8d968a909557bbc63d6b7f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 8 Sep 2021 18:57:27 -0400 Subject: Normalized syntax of "exception:", "actor:" and "message:". --- stdlib/source/program/aedifex.lux | 4 ++-- stdlib/source/program/aedifex/artifact/time/date.lux | 2 +- stdlib/source/program/aedifex/dependency/resolution.lux | 6 ++++-- stdlib/source/program/aedifex/hash.lux | 5 +++-- stdlib/source/program/aedifex/project.lux | 5 +++-- stdlib/source/program/aedifex/repository/remote.lux | 3 ++- stdlib/source/program/compositor/import.lux | 3 ++- 7 files changed, 17 insertions(+), 11 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index a275eebea..682c30099 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -93,8 +93,8 @@ (in (#try.Failure ""))))] (in output))) -(exception: (cannot_find_repository {repository Text} - {options (Dictionary Text Address)}) +(exception: (cannot_find_repository [repository Text + options (Dictionary Text Address)]) (exception.report ["Repository" (%.text repository)] ["Options" (exception.listing (function (_ [name repo]) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 18688bf1a..e5f0f7617 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -32,7 +32,7 @@ (def: min_year +1,000) (def: max_year +9,999) -(exception: .public (year_is_out_of_range {year year.Year}) +(exception: .public (year_is_out_of_range [year year.Year]) (exception.report ["Minimum" (%.int ..min_year)] ["Maximum" (%.int ..max_year)] diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 04609b10b..3bb2fb687 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -60,7 +60,9 @@ ["[1]/[0]" snapshot]]]]) (template [] - [(exception: .public ( {artifact Artifact} {extension Extension} {hash Text}) + [(exception: .public ( [artifact Artifact + extension Extension + hash Text]) (exception.report ["Artifact" (///artifact.format artifact)] ["Extension" (%.text extension)] @@ -157,7 +159,7 @@ (Equivalence Resolution) (dictionary.equivalence ///package.equivalence)) -(exception: .public (cannot_resolve {dependency Dependency}) +(exception: .public (cannot_resolve [dependency Dependency]) (exception.report ["Artifact" (%.text (///artifact.format (value@ #//.artifact dependency)))] ["Type" (%.text (value@ #//.type dependency))])) diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 996858e3e..74e54679f 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -77,14 +77,15 @@ (def: hex_per_chunk (n.* hex_per_byte i64.bytes_per_i64)) - (exception: .public (not_a_hash {size Nat} {value Text}) + (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))])) (template [ ] - [(exception: .public ( {data Binary}) + [(exception: .public ( [data Binary]) (exception.report ["Pseudo hash" (%.text (..encoded data))] ["Expected size" (%.nat )] diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index e7ed18148..1d1d55998 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -41,11 +41,12 @@ (def: composite (dictionary.merged_with (\ //.monoid composite)))) -(exception: .public (unknown_profile {name Name}) +(exception: .public (unknown_profile [name Name]) (exception.report ["Name" (%.text name)])) -(exception: .public (circular_dependency {dependee Name} {dependent Name}) +(exception: .public (circular_dependency [dependee Name + dependent Name]) (exception.report ["Dependent" (%.text dependent)] ["Dependee" (%.text dependee)])) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 69fd9c255..4f852c2b7 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -34,7 +34,8 @@ URL) (template [] - [(exception: .public ( {url URL} {status Nat}) + [(exception: .public ( [url URL + status Nat]) (exception.report ["URL" (%.text url)] ["Status Code" (%.nat status)]))] diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index b15c95080..6b092e546 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -34,7 +34,8 @@ (exception: .public useless_tar_entry) -(exception: .public (duplicate {library Library} {module Module}) +(exception: .public (duplicate [library Library + module Module]) (exception.report ["Module" (%.text module)] ["Library" (%.text library)])) -- cgit v1.2.3