Skip to content

Commit 1b8f364

Browse files
committed
io-sim-classes: newTBQueueIO for IO and ReaderT instances
Either use the one provided by `stm` package (IO) or lift the one from base monad instance (ReaderT).
1 parent 3352255 commit 1b8f364

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io-sim-classes/src/Control/Monad/Class/MonadSTM.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ instance MonadSTM IO where
285285
newTVarIO = STM.newTVarIO
286286
newTMVarIO = STM.newTMVarIO
287287
newEmptyTMVarIO = STM.newEmptyTMVarIO
288+
newTBQueueIO = STM.newTBQueueIO
288289

289290
-- | noop instance
290291
--
@@ -328,6 +329,7 @@ instance MonadSTM m => MonadSTM (ReaderT r m) where
328329
newTVarIO = lift . newTVarM
329330
newTMVarIO = lift . newTMVarM
330331
newEmptyTMVarIO = lift newEmptyTMVarM
332+
newTBQueueIO = lift . newTBQueueIO
331333

332334
--
333335
-- Default TMVar implementation in terms of TVars (used by sim)

0 commit comments

Comments
 (0)