aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 16:50:42 -0400
committerEduardo Julian2022-08-11 16:50:42 -0400
commite5625dd840a8b8adc76987f649da254335d3d93a (patch)
treefb672669383525d90d462edf8c141f98bc953894 /stdlib/source/program/aedifex/hash.lux
parent065e8a4d8122d4616b570496915d2c0e2c78cd6b (diff)
Improved exception-definition macro.
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r--stdlib/source/program/aedifex/hash.lux7
1 files changed, 4 insertions, 3 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index eedf5e464..64e9784d3 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -81,15 +81,16 @@
(def hex_per_chunk
(n.* hex_per_byte i64.bytes_per_i64))
- (exception .public (not_a_hash [size Nat
- value Text])
+ (exception.def .public (not_a_hash [size value])
+ (Exception [Nat Text])
(exception.report
(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.def .public (<name> data)
+ (Exception Binary)
(exception.report
(list ["Pseudo hash" (%.text (..encoded data))]
["Expected size" (%.nat <size>)]