summaryrefslogtreecommitdiff
path: root/Logs/Transitions.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 14:43:56 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 14:51:54 -0400
commita93ff12905005d1cbd2339ddeb8e8abfe2b20079 (patch)
tree79dcabdc88b955bfcfa46735fae666be87d6dae3 /Logs/Transitions.hs
parentaecfea27593bc121273fe53a6c11d4a22567004f (diff)
avoid accidental Show of VectorClock
Removed its Show instance.
Diffstat (limited to 'Logs/Transitions.hs')
-rw-r--r--Logs/Transitions.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Logs/Transitions.hs b/Logs/Transitions.hs
index 79acb87dd..0a90f118f 100644
--- a/Logs/Transitions.hs
+++ b/Logs/Transitions.hs
@@ -16,7 +16,6 @@ module Logs.Transitions where
import Annex.Common
import Annex.VectorClock
-import Logs.TimeStamp
import Logs.Line
import qualified Data.Set as S
@@ -32,7 +31,7 @@ data Transition
data TransitionLine = TransitionLine
{ transitionStarted :: VectorClock
, transition :: Transition
- } deriving (Show, Ord, Eq)
+ } deriving (Ord, Eq)
type Transitions = S.Set TransitionLine
@@ -63,16 +62,16 @@ parseTransitionsStrictly source = fromMaybe badsource . parseTransitions
badsource = giveup $ "unknown transitions listed in " ++ source ++ "; upgrade git-annex!"
showTransitionLine :: TransitionLine -> String
-showTransitionLine (TransitionLine ts t) = unwords [show t, show ts]
+showTransitionLine (TransitionLine c t) = unwords [show t, formatVectorClock c]
parseTransitionLine :: String -> Maybe TransitionLine
parseTransitionLine s = TransitionLine
- <$> (VectorClock <$> parsePOSIXTime ds)
+ <$> parseVectorClock cs
<*> readish ts
where
ws = words s
ts = Prelude.head ws
- ds = unwords $ Prelude.tail ws
+ cs = unwords $ Prelude.tail ws
combineTransitions :: [Transitions] -> Transitions
combineTransitions = S.unions