sleepOnSTM  :: (Eq a)
            => Int -- ^ Time to sleep in microseconds
            -> a -- ^ Original
            -> TVar b -- ^ Some structure
            -> (TVar b -> STM a)
            -> IO ()
sleepOnSTM i original s f = do
    timeout i $ atomically $ do
        current <- f s
        check $ current /= original
        -- Only let the transaction pass through
        -- if things HAVE changed!
    return ()
sleepOnSTM  :: (Eq a)
            => Int -- ^ Time to sleep in microseconds
            -> a -- ^ Original
            -> TVar b -- ^ Some structure
            -> (TVar b -> STM a)
            -> IO ()
sleepOnSTM i original s f = do
    timeout i $ atomically $ do
        current <- f s
        check $ current /= original
        -- Only let the transaction pass through
        -- if things HAVE changed!
    return ()
sleepOnSTM i original s f = do
    timeout i $ atomically $ do
        current <- f s
        check $ current /= original
        -- Only let the transaction pass through
        -- if things HAVE changed!
    return ()