From a70628457a5ceccd37d1ba2e1791d4493b5a0502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 25 Nov 2019 22:15:05 +0100 Subject: Load and announce identity updates --- src/Storage/Internal.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Storage/Internal.hs') diff --git a/src/Storage/Internal.hs b/src/Storage/Internal.hs index 88741e0..76adaab 100644 --- a/src/Storage/Internal.hs +++ b/src/Storage/Internal.hs @@ -86,6 +86,15 @@ showRefDigest = B.concat . map showHexByte . BA.unpack data Head' c = Head String (Ref' c) deriving (Show) +data Stored' c a = Stored (Ref' c) a + deriving (Show) + +instance Eq (Stored' c a) where + Stored r1 _ == Stored r2 _ = refDigest r1 == refDigest r2 + +instance Ord (Stored' c a) where + compare (Stored r1 _) (Stored r2 _) = compare (refDigest r1) (refDigest r2) + type Complete = Identity type Partial = Either RefDigest -- cgit v1.2.3