summaryrefslogtreecommitdiffhomepage
path: root/Replay.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-19 17:30:32 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-19 17:45:14 -0400
commit6f7cf857b408401abdc4477c888495b4f13162c7 (patch)
tree5b746c171df6e68864b2bbaacf2e833587832367 /Replay.hs
parent951d165bc27b9397174af1d826366e39cdbd53dd (diff)
downloaddebug-me-6f7cf857b408401abdc4477c888495b4f13162c7.tar.gz
reorganized message types
Make Control messages be out-of-band async messages, without a pointer to a previous message. And then followed the type change through the code for hours.. This commit was sponsored by Nick Daly on Patreon.
Diffstat (limited to 'Replay.hs')
-rw-r--r--Replay.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Replay.hs b/Replay.hs
index b50bc40..b13012d 100644
--- a/Replay.hs
+++ b/Replay.hs
@@ -21,11 +21,10 @@ replay opts = go Nothing =<< loadLog (replayLogFile opts)
ms = s * 1000000
in delay (ceiling ms)
- case loggedActivity l of
- ActivityEntered {} -> return ()
- ActivitySeen a -> case activity a of
- Rejected {} -> return ()
- Proto s -> do
- B.hPut stdout (val (seenData s))
- hFlush stdout
+ case loggedMessage l of
+ User (ActivityMessage a) -> do
+ B.hPut stdout $ val $ seenData $ activity a
+ hFlush stdout
+ User (ControlMessage _) -> return ()
+ Developer _ -> return ()
go (Just $ loggedTimestamp l) ls