Skip to content

Commit 83a9f7a

Browse files
committed
Fix for CL (not using head)
1 parent 7602ed5 commit 83a9f7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

trace-forward/src/Trace/Forward/Forwarding.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ initForwardingDelayed iomgr config magic ekgStore tracerSocketMode = liftIO $ do
140140
-- It writes an error message on stderr
141141
handleOverflow :: [TraceObject] -> IO ()
142142
handleOverflow [] = pure ()
143-
handleOverflow msgs =
144-
let lengthM = length msgs
145-
beginning = toTimestamp (head msgs)
146-
end = toTimestamp (last msgs)
147-
msg = "TraceObject queue overflowed. Dropped " <> show lengthM <>
143+
handleOverflow (msg : msgs) =
144+
let lengthM = 1 + length msgs
145+
beginning = toTimestamp msg
146+
end = toTimestamp (last (msg : msgs))
147+
str = "TraceObject queue overflowed. Dropped " <> show lengthM <>
148148
" messages from " <> show beginning <> " to " <> show end
149-
in hPutStrLn stderr msg
149+
in hPutStrLn stderr str
150150

151151
launchForwarders
152152
:: IOManager

0 commit comments

Comments
 (0)