From 5a4f7d5ed6e5d6b2711db316e8de06cea78b54ec Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 15 Aug 2026 00:09:22 +0000 Subject: Allow storage backend addresses to be labels rather than hashes --- lib/abstract/Storage.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/abstract') diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml index 5eaeba3..c936be4 100644 --- a/lib/abstract/Storage.ml +++ b/lib/abstract/Storage.ml @@ -7,6 +7,8 @@ module type STORAGE = sig type connection type transaction + type address = Label of string | Hash of Concepts.Hash.hash + val connect : Concepts.Configuration.term -> (connection, Concepts.Condition.condition) result (** begin a transaction within `connection` *) @@ -21,13 +23,13 @@ module type STORAGE = sig (** within a transaction, fetch a blob from disk *) val get : transaction -> - Concepts.Hash.hash -> + address -> (Concepts.Representation.blob option, Concepts.Condition.condition) result (** within a transaction, associate a hash with a blob on disk *) val put : transaction -> - Concepts.Hash.hash -> + address -> Concepts.Representation.blob -> (unit, Concepts.Condition.condition) result end -- cgit v1.2.3