File tree Expand file tree Collapse file tree 4 files changed +18
-11
lines changed
src/Control/Monad/Class/MonadSTM Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 11# Revsion history of io-classes
22
3- ### next release
3+ ## next release
44
5+ ### Breaking changes
6+
7+ ### Non-breaking changes
8+
9+ * Improved performance of ` tryReadTBQueueDefault ` .
510* Added module ` Control.Monad.Class.MonadUnique ` generalising ` Data.Unique ` .
611* mtl: Added module ` Control.Monad.Class.MonadUnique.Trans ` providing monad transformer instances for ` MonadUnique ` .
712
8- ### 1.8.0.1
13+ ## 1.8.0.1
914
1015* Added support for ` ghc-9.2 ` .
1116
3035 type classes.
3136* Support ghc-9.12
3237
33- ### 1.7.0.0
38+ ## 1.7.0.0
3439
3540### Breaking changes
3641
3742* Renamed ` io-classes:io-classes-mtl ` as ` io-classes:mtl ` .
3843
39- ### 1.6.0.0
44+ ## 1.6.0.0
4045
4146### Breaking changes
4247
Original file line number Diff line number Diff line change @@ -919,12 +919,15 @@ tryReadTBQueueDefault (TBQueue rsize read _wsize write _size) = do
919919 return (Just x)
920920 [] -> do
921921 ys <- readTVar write
922- case reverse ys of
922+ case ys of
923923 [] -> return Nothing
924+ _ -> do
925+ -- NB. lazy: we want the transaction to be
926+ -- short, otherwise it will conflict
927+ let ~ (z,zs) = case reverse ys of
928+ z': zs' -> (z',zs')
929+ _ -> error " tryReadTBQueueDefault: impossible"
924930
925- -- NB. lazy: we want the transaction to be
926- -- short, otherwise it will conflict
927- (z: zs) -> do
928931 writeTVar write []
929932 writeTVar read zs
930933 return (Just z)
Original file line number Diff line number Diff line change 77### Non-breaking changes
88
99* Added support for unique symbol generation à la ` Data.Unique ` .
10+ * Removed a misleading internal comment.
1011
11- ### 1.8.0.1
12+ ## 1.8.0.1
1213
1314* Added support for ` ghc-9.2 ` .
1415
Original file line number Diff line number Diff line change @@ -148,8 +148,6 @@ tryReadTBQueueDefault (TBQueue queue _size) = do
148148 case reverse ys of
149149 [] -> return Nothing
150150
151- -- NB. lazy: we want the transaction to be
152- -- short, otherwise it will conflict
153151 (z: zs) -> do
154152 writeTVar queue $! (zs, r', [] , w)
155153 return (Just z)
You can’t perform that action at this time.
0 commit comments