aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-06-12 00:38:20 -0400
committerEduardo Julian2022-06-12 00:38:20 -0400
commitb48ea68a83d01903554c7696c77eedaaf1035680 (patch)
treec342d8094c3158de16526f874ca9624418cd2dd2 /stdlib/source/program/aedifex/hash.lux
parent7abf2d0ac55c229a8793bbff31f132596ffcb275 (diff)
De-sigil-ification: suffix : [Part 3]
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r--stdlib/source/program/aedifex/hash.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index 43017034e..8a22579b2 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -44,7 +44,7 @@
(All (_ h) (-> (Hash h) Binary))
(|>> representation))
- (template [<name> <kind> <algorithm>]
+ (with_template [<name> <kind> <algorithm>]
[(def: .public (<name> value)
(-> Binary (Hash <kind>))
(|> (java/security/MessageDigest::getInstance [(ffi.as_string <algorithm>)])
@@ -65,7 +65,7 @@
(format representation hex)))
""))
- (template [<factor> <name>]
+ (with_template [<factor> <name>]
[(def: <name>
Nat
<factor>)]
@@ -87,7 +87,7 @@
"Expected size" (%.nat size)
"Actual size" (%.nat (text.size value))))
- (template [<name> <size>]
+ (with_template [<name> <size>]
[(exception: .public (<name> [data Binary])
(exception.report
"Pseudo hash" (%.text (..encoded data))
@@ -98,7 +98,7 @@
[not_a_md5 ..md5::size]
)
- (template [<name> <kind> <size> <exception>]
+ (with_template [<name> <kind> <size> <exception>]
[(def: .public (<name> data)
(-> Binary (Try (Hash <kind>)))
(if (n.= <size> (binary.size data))
@@ -137,7 +137,7 @@
{.#None}
(case (..hash_size input)
0 (constructor output)
- (^.template [<size> <write>]
+ (^.with_template [<size> <write>]
[<size>
(do try.monad
[head (at n.hex decoded input)
@@ -149,7 +149,7 @@
_ (exception.except ..not_a_hash [(..encoding_size size) encoded])))))
(exception.except ..not_a_hash [(..encoding_size size) encoded]))))
- (template [<codec> <hash> <nat> <constructor>]
+ (with_template [<codec> <hash> <nat> <constructor>]
[(implementation: .public <codec>
(Codec Text (Hash <hash>))