diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/hash.lux | 12 |
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>)) |