From fb164dea0a6e407444ff5b713c7b52ce1c266b2e Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 17 Jun 2020 14:32:26 +0200 Subject: [PATCH] fix instance declaration of RingMap --- src/Hash2Pub/FediChordTypes.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hash2Pub/FediChordTypes.hs b/src/Hash2Pub/FediChordTypes.hs index 47b2004..27d5f32 100644 --- a/src/Hash2Pub/FediChordTypes.hs +++ b/src/Hash2Pub/FediChordTypes.hs @@ -256,10 +256,10 @@ type NodeCache = RingMap CacheEntry -- | generic data structure for holding elements with a key and modular lookup newtype RingMap a = RingMap { getRingMap :: HasKeyID a => Map.Map NodeID (RingEntry a) } -instance Eq (RingMap a) where +instance (HasKeyID a) => Eq (RingMap a) where a == b = getRingMap a == getRingMap b -instance Show (RingMap a) where +instance (HasKeyID a) => Show (RingMap a) where show rmap = shows (getRingMap rmap) "RingMap " -- | entry of a 'RingMap' that holds a value and can also