GaloisInc/BoundedChan — pull request #2 by pshendry (2014-05-05 02:40:34+00:00)
Title: Added a tryWriteChan function for non-blocking writes to channels.

My first Haskell contribution so I don't know if style is up to par, but I needed this for a personal project, and I thought maybe it could be of use in the mainline? It adds the notion of dropping elements if the channel is full. It doesn't make sense for unbounded channels, but Control.Concurrent.MVar has these "try" functions, so I think it belongs.

I feel dirty not adding corresponding tests, but there's no test framework in place and not everything is covered to begin with.