git.iko.soy/distributed-process
on master help sign in
Add comment explaining correction to matchIf
commite0a69a88dc2b3db23ac752dba92d71d82640804e authorEdsko de Vries <edsko@edsko.net> dateFri 28 Sep 2012, 18:38 (14 years ago) parentc627570
1 file changed+3
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+3
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+3
@@ -271,6 +271,9 @@ matchIf c p = Match $ \msg ->
271271 True | c decoded -> Just (p decoded)
272272 where
273273 decoded :: a
274+ -- Make sure the value is fully decoded so that we don't hang to
275+ -- bytestrings when the process calling 'matchIf' doesn't process
276+ -- the values immediately
274277 !decoded = decode (messageEncoding msg)
275278 _ -> Nothing
276279