decValidCounter = do
  n <- readIORef validCounter
  modifyIORef' validCounter (\n -> n - 1)
  when (n == 1) $ throw ()

decValidCounter = do
  n <- readIORef validCounter
  modifyIORef' validCounter (\n -> n - 1)
  when (n == 1) $ throw ()

decValidCounter = do
  n <- readIORef validCounter
  modifyIORef' validCounter (\n -> n - 1)
  when (n == 1) $ throw ()
