haskell-distributed/distributed-process — pull request #86 by simonmar (2012-12-14 12:40:56+00:00)
Title: Implement matchChan

Here is matchChan, as discussed.

I added a test case, but it needs some more work (see the commit log).

You might want to check whether there's any performance overhead worth worrying about here. I've been careful not to do repeated traversals of the mailbox, but there will be a constant factor overhead for each receiveWait due to splitting the matches into chunks, and an extra layer of constructor on each match.