diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-19 17:30:32 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-19 17:45:14 -0400 |
commit | 6f7cf857b408401abdc4477c888495b4f13162c7 (patch) | |
tree | 5b746c171df6e68864b2bbaacf2e833587832367 /Replay.hs | |
parent | 951d165bc27b9397174af1d826366e39cdbd53dd (diff) | |
download | debug-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.hs | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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 |