Control.Concurrent.STM.TChan: added tryReadTChan, peekTChan, tryPeekTChan
[packages/stm.git] / Control / Concurrent / STM / TMVar.hs.rej
1 --- Control/Concurrent/STM/TMVar.hs     2011-04-11 11:05:30.740727673 +0100
2 +++ Control/Concurrent/STM/TMVar.hs     2011-04-11 11:05:30.750728046 +0100
3 @@ -126,7 +126,8 @@
4      Nothing -> retry
5      Just a  -> return a
6  
7 --- | Non-blocking version of 'readTMVar'.
8 +-- | A version of 'readTMVar' which does not retry. Instead it
9 +-- returns @Nothing@ if no value is available.
10  tryReadTMVar :: TMVar a -> STM (Maybe a)
11  tryReadTMVar (TMVar t) = readTVar t
12