diff --git a/io-classes/CHANGELOG.md b/io-classes/CHANGELOG.md index 8016cc98..674c433c 100644 --- a/io-classes/CHANGELOG.md +++ b/io-classes/CHANGELOG.md @@ -6,6 +6,7 @@ * Added `threadLabel` to `MonadThread` * Added `MonadLabelledMVar` class. +* Added `labelMVar` to `Control.Concurrent.Class.MonadMVar.Strict` ### 1.7.0.0 diff --git a/io-classes/strict-mvar/src/Control/Concurrent/Class/MonadMVar/Strict.hs b/io-classes/strict-mvar/src/Control/Concurrent/Class/MonadMVar/Strict.hs index 4e296888..8b7407ca 100644 --- a/io-classes/strict-mvar/src/Control/Concurrent/Class/MonadMVar/Strict.hs +++ b/io-classes/strict-mvar/src/Control/Concurrent/Class/MonadMVar/Strict.hs @@ -26,6 +26,7 @@ module Control.Concurrent.Class.MonadMVar.Strict , modifyMVarMasked_ , modifyMVarMasked , tryReadMVar + , labelMVar -- * Re-exports , MonadMVar ) where @@ -62,6 +63,9 @@ toLazyMVar = mvar fromLazyMVar :: Lazy.MVar m a -> StrictMVar m a fromLazyMVar = StrictMVar +labelMVar :: MonadLabelledMVar m => StrictMVar m a -> String -> m () +labelMVar (StrictMVar m) = Lazy.labelMVar m + newEmptyMVar :: MonadMVar m => m (StrictMVar m a) newEmptyMVar = fromLazyMVar <$> Lazy.newEmptyMVar