aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Value.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-07-15 01:52:38 +0000
committerGitHub <noreply@github.com>2026-07-14 22:52:38 -0300
commitc374635a36d71e8cfff6e1c19b62e5d0e14ea371 (patch)
tree597fba69d4b39452eabab6299887282c1d7c6bc6 /lib/concepts/Value.ml
parentbb3156b8ab78b035ce886bbe3021ec7cbe269d03 (diff)
downloadRNT-c374635a36d71e8cfff6e1c19b62e5d0e14ea371.tar.gz
RNT-c374635a36d71e8cfff6e1c19b62e5d0e14ea371.zip
Storage layer scaffolding, LMDB backend
Diffstat (limited to '')
-rw-r--r--lib/concepts/Value.ml3
-rw-r--r--lib/concepts/Value.mli3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/concepts/Value.ml b/lib/concepts/Value.ml
index 65a0439..75b0e88 100644
--- a/lib/concepts/Value.ml
+++ b/lib/concepts/Value.ml
@@ -1,3 +1,6 @@
type value = String of string | Integer of int
let to_string = function String s -> s | Integer n -> Int.to_string n
+
+let equal x y =
+ match x, y with String x, String y -> x = y | Integer x, Integer y -> x = y | _, _ -> false
diff --git a/lib/concepts/Value.mli b/lib/concepts/Value.mli
index 9644443..c1a9f18 100644
--- a/lib/concepts/Value.mli
+++ b/lib/concepts/Value.mli
@@ -3,3 +3,6 @@ type value = String of string | Integer of int
(** given a value, return a string representation of it *)
val to_string : value -> string
+
+(** given two values, are they the same? *)
+val equal : value -> value -> bool