From b1eefaa8ab07d41bb0b0975ffdd62ef9aba47811 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Fri, 6 Mar 2026 15:15:12 -0300 Subject: use magic to cast types to opaque attributes --- lib/conventions.ml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/conventions.ml') diff --git a/lib/conventions.ml b/lib/conventions.ml index 74f6cc3..538bc5c 100644 --- a/lib/conventions.ml +++ b/lib/conventions.ml @@ -13,14 +13,6 @@ module Cardinality = struct end module AbstractValue = struct - module StringMap = Map.Make(String) - type t = { - fields: string StringMap.t; - } - let hash_text value = - let folder (name: string) (value: string) (acc: Hash.t) = - Hash.(hash_text (acc ^ hash_text name ^ hash_text value)) - in StringMap.fold folder value.fields "" - let compare a b = - StringMap.compare String.compare a.fields b.fields + type t = Obj.t + let hash (elem: t) = Interop.Sha256.compute_hash @@ Marshal.to_bytes elem [] end \ No newline at end of file -- cgit v1.2.3