est :: Arbitrary a => S.State -> (QCGen -> Int -> (a -> Prop)) -> IO (Maybe a, Result)
test st f
  | S.numSuccessTests st   >= S.maxSuccessTests st   = doneTesting st f
  | S.numDiscardedTests st >= S.maxDiscardedTests st = giveUp st f
  | otherwise                                        = runATest st f

test :: Arbitrary a => S.State -> (QCGen -> Int -> (a -> Prop)) -> IO (Maybe a, Result)
test st f
  | S.numSuccessTests st   >= S.maxSuccessTests st   = doneTesting st f
  | S.numDiscardedTests st >= S.maxDiscardedTests st = giveUp st f
  | otherwise                                        = runATest st f
test st f
  | S.numSuccessTests st   >= S.maxSuccessTests st   = doneTesting st f
  | S.numDiscardedTests st >= S.maxDiscardedTests st = giveUp st f
  | otherwise                                        = runATest st f