From 73e91c5639257990943060d29549ab0b5af957e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 27 Aug 2023 19:59:19 +0200 Subject: Storage: Eq instance for Ref based only on digest The associated storage is extracted only in internal storage module, so now does not need to be observable via Eq either. --- src/Storage/Internal.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Storage/Internal.hs b/src/Storage/Internal.hs index b68d0f7..7b29193 100644 --- a/src/Storage/Internal.hs +++ b/src/Storage/Internal.hs @@ -91,7 +91,9 @@ instance Show RefDigest where show = BC.unpack . showRefDigest data Ref' c = Ref (Storage' c) RefDigest - deriving (Eq) + +instance Eq (Ref' c) where + Ref _ d1 == Ref _ d2 = d1 == d2 instance Show (Ref' c) where show ref@(Ref st _) = show st ++ ":" ++ BC.unpack (showRef ref) -- cgit v1.2.3