From de4980ef8540c2073bc6230559d7b5badb6662ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jan 2019 13:13:31 -0400 Subject: [PATCH] simplify Show instance by deriving --- Annex/VectorClock.hs | 2 +- Logs/Presence/Pure.hs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Annex/VectorClock.hs b/Annex/VectorClock.hs index 3a77f5f0eb..e7ed501bd2 100644 --- a/Annex/VectorClock.hs +++ b/Annex/VectorClock.hs @@ -24,7 +24,7 @@ import qualified Data.Attoparsec.ByteString.Lazy as A -- | Some very old logs did not have any time stamp at all; -- Unknown is used for those. data VectorClock = Unknown | VectorClock POSIXTime - deriving (Eq, Ord) + deriving (Eq, Ord, Show) -- Unknown is oldest. prop_VectorClock_sane :: Bool diff --git a/Logs/Presence/Pure.hs b/Logs/Presence/Pure.hs index 43306b5950..2c09e8fea9 100644 --- a/Logs/Presence/Pure.hs +++ b/Logs/Presence/Pure.hs @@ -26,10 +26,7 @@ data LogLine = LogLine { date :: VectorClock , status :: LogStatus , info :: LogInfo - } deriving (Eq) - -instance Show LogLine where - show l = "LogLine " ++ formatVectorClock (date l) ++ " " ++ show (status l) ++ " " ++ show (info l) + } deriving (Eq, Show) data LogStatus = InfoPresent | InfoMissing | InfoDead deriving (Eq, Show, Bounded, Enum)