git.iko.soy/distributed-process
on master help sign in
small optimisation
commit3fa867193b9ab00930b474f967a6845ac934907e authorSimon Marlow <marlowsd@gmail.com> dateFri 14 Dec 2012, 17:02 (14 years ago) parentdff5ccb
1 file changed+2−3
distributed-process/src/Control/Distributed/Process/Internal/CQueue.hs+2−3
distributed-process/src/Control/Distributed/Process/Internal/CQueue.hs+2−3
@@ -229,9 +229,8 @@ dequeue (CQueue arrived incoming) blockSpec matchons =
229229 go (Append xs ys) tl = go xs (append ys tl)
230230 go (Snoc xs x) tl = go xs (Cons x tl)
231231 go (Cons x xs) tl
232− | Just y <- checkMatches matches x = (Append xs tl, Just y)
233− | otherwise = (Cons x rest, r)
234− where !(rest,r) = go xs tl
232+ | Just y <- checkMatches matches x = (append xs tl, Just y)
233+ | otherwise = let !(rest,r) = go xs tl in (Cons x rest, r)
235234
236235 checkMatches :: [m -> Maybe a] -> m -> Maybe a
237236 checkMatches [] _ = Nothing