aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/kernel/Identity.ml7
-rw-r--r--lib/kernel/Identity.mli5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/kernel/Identity.ml b/lib/kernel/Identity.ml
new file mode 100644
index 0000000..ce3d30c
--- /dev/null
+++ b/lib/kernel/Identity.ml
@@ -0,0 +1,7 @@
+class type identity = object
+ method hash : Concepts.Hash.hash
+end
+
+class of_id = object (self)
+ method hash = Oo.id self |> Concepts.Hash.hash_of_int
+end
diff --git a/lib/kernel/Identity.mli b/lib/kernel/Identity.mli
new file mode 100644
index 0000000..cdf417c
--- /dev/null
+++ b/lib/kernel/Identity.mli
@@ -0,0 +1,5 @@
+class type identity = object
+ method hash : Concepts.Hash.hash
+end
+
+class of_id : identity