File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
trace-forward/src/Trace/Forward/Utils Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,14 @@ readFromSink ForwardSink{forwardQueue} =
8282 -- Handle response format outside of `atomically`.
8383 res <- atomically $ readFromSinkSTM forwardQueue blocking n
8484 pure $ case blocking of
85- TokBlocking -> BlockingReply $ case res of
86- (x: xs) -> x NE. :| xs
87- -- If `n == 0` ?????
88- [] -> error " impossible"
85+ TokBlocking -> BlockingReply $
86+ -- Convert to a non-empty list.
87+ case res of
88+ (x: xs) -> x NE. :| xs
89+ -- Either GHC-impossible or impossible
90+ -- to create a non-empty list with zero
91+ -- items or less.
92+ [] -> error $ " impossible: requested = " ++ show n
8993 TokNonBlocking -> NonBlockingReply res
9094 , Forwarder. recvMsgDone = return ()
9195 }
You can’t perform that action at this time.
0 commit comments