aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-05-30 01:09:44 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-05-30 01:09:44 +0000
commit688b72d518746dc0ba614c3e182372e9975f3cb1 (patch)
tree9d5eb26b82adfac6a856d1be169c1d50573a6f1d /lib
parent2fa028193c76e6df949d535a37727cdab220a0dc (diff)
downloadSakura-688b72d518746dc0ba614c3e182372e9975f3cb1.tar.gz
Sakura-688b72d518746dc0ba614c3e182372e9975f3cb1.zip
Equality for materialized attributes
Diffstat (limited to 'lib')
-rw-r--r--lib/attribute.ml2
-rw-r--r--lib/conventions.ml2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/attribute.ml b/lib/attribute.ml
index b828d64..8448bee 100644
--- a/lib/attribute.ml
+++ b/lib/attribute.ml
@@ -9,3 +9,5 @@ let make_referenced ~value =
Referenced { value_hash }
let make_materialized ~value = Materialized { value }
+
+let materialized_equal a b = Conventions.AbstractValue.equal a.value b.value
diff --git a/lib/conventions.ml b/lib/conventions.ml
index a031014..9e18762 100644
--- a/lib/conventions.ml
+++ b/lib/conventions.ml
@@ -49,7 +49,7 @@ module AbstractValue = struct
else Atom (string_of_float f)
| Opaque -> Atom "<opaque>"
- let equals a b =
+ let equal a b =
match (type_of a, type_of b) with
| (Int, Int) -> (Obj.obj a : int) = (Obj.obj b : int)
| (String, String) -> (Obj.obj a : string) = (Obj.obj b : string)