validate :: Test -> IO ()
validate t = do
  c <- runTestTT t
  when (errors c /= 0 || failures c /= 0)
    exitFailure
  return ()
validate :: Test -> IO ()
validate t = do
  c <- runTestTT t
  when (errors c /= 0 || failures c /= 0)
    exitFailure
  return ()
validate t = do
  c <- runTestTT t
  when (errors c /= 0 || failures c /= 0)
    exitFailure
  return ()