diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-08-27 19:59:19 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-08-30 20:53:55 +0200 |
commit | 73e91c5639257990943060d29549ab0b5af957e8 (patch) | |
tree | b04102fccf793ce8945aae9283658435d6be0e04 /src/Storage/Internal.hs | |
parent | c27b3c23ecdd53acdbfece747b9bbdb39bf4dae9 (diff) |
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.
Diffstat (limited to 'src/Storage/Internal.hs')
-rw-r--r-- | src/Storage/Internal.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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) |