isEmptyMVar :: MVar a -> IO Bool
isEmptyMVar (MVar mv#) = IO $ \ s# ->
    case isEmptyMVar# mv# s# of
        (# s2#, flg #) -> (# s2#, isTrue# (flg /=# 0#) #)

-- |Add a finalizer to an 'MVar' (GHC only).  See "Foreign.ForeignPtr" and
-- "System.Mem.Weak" for more about finalizers.
isEmptyMVar :: MVar a -> IO Bool
isEmptyMVar (MVar mv#) = IO $ \ s# ->
    case isEmptyMVar# mv# s# of
        (# s2#, flg #) -> (# s2#, isTrue# (flg /=# 0#) #)

-- |Add a finalizer to an 'MVar' (GHC only).  See "Foreign.ForeignPtr" and
-- "System.Mem.Weak" for more about finalizers.
isEmptyMVar (MVar mv#) = IO $ \ s# ->
    case isEmptyMVar# mv# s# of
        (# s2#, flg #) -> (# s2#, isTrue# (flg /=# 0#) #)

-- |Add a finalizer to an 'MVar' (GHC only).  See "Foreign.ForeignPtr" and
-- "System.Mem.Weak" for more about finalizers.