aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-08-29 02:28:12 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-08-29 02:28:42 +0000
commit5fe3502865a9d9e187bb9560dc42bb7a1439e588 (patch)
treebf5c266fd9275e3c3841fb7579254930cd8a4e8d /lib/kernel
parentf87767c3e5b0f1920a6179d5cd0d4613cca92658 (diff)
downloadRNT-5fe3502865a9d9e187bb9560dc42bb7a1439e588.tar.gz
RNT-5fe3502865a9d9e187bb9560dc42bb7a1439e588.zip
Identity mixins
Diffstat (limited to 'lib/kernel')
-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