aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Hash.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/concepts/Hash.ml8
-rw-r--r--lib/concepts/Hash.mli13
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/concepts/Hash.ml b/lib/concepts/Hash.ml
index 4c6cd8a..681ec4a 100644
--- a/lib/concepts/Hash.ml
+++ b/lib/concepts/Hash.ml
@@ -1,5 +1,5 @@
-type hash = ()
+type hash = bytes
-val hash_of_value (_: Value.value) = failwith "TODO"
-
-val hash_equals (_: hash) (_: hash) = failwith "TODO"
+let hash_of_value (_ : Value.value) = failwith "TODO"
+let hash_equals (_ : hash) (_ : hash) = failwith "TODO"
+let bytes_of_hash (h : hash) = h
diff --git a/lib/concepts/Hash.mli b/lib/concepts/Hash.mli
index dc25669..b100cd7 100644
--- a/lib/concepts/Hash.mli
+++ b/lib/concepts/Hash.mli
@@ -1,8 +1,11 @@
-(** An abstract value representing a hash *)
+(** an abstract value representing a hash *)
type hash
-(** Given a value, compute it's hash *)
-val hash_of_value: Value.value -> hash
+(** given a value, compute it's hash *)
+val hash_of_value : Value.value -> hash
-(** Given two hashes, are they the same? *)
-val hash_equals: hash -> hash -> bool
+(** given two hashes, are they the same? *)
+val hash_equals : hash -> hash -> bool
+
+(** given a hash, return a `bytes` representation of it *)
+val bytes_of_hash : hash -> bytes