src/Tools/quickcheck.ML
changeset 31153 6b31b143f18b
parent 31138 a51ce445d498
child 31599 97b4d289c646
--- a/src/Tools/quickcheck.ML	Thu May 14 09:16:36 2009 +0200
+++ b/src/Tools/quickcheck.ML	Thu May 14 15:09:46 2009 +0200
@@ -104,12 +104,12 @@
      of NONE => if quiet then mk_testers ctxt t' else mk_testers_strict ctxt t'
       | SOME name => [mk_tester_select name ctxt t'];
     fun iterate f 0 = NONE
-      | iterate f k = case f () handle Match => (if quiet then ()
+      | iterate f j = case f () handle Match => (if quiet then ()
              else warning "Exception Match raised during quickcheck"; NONE)
-          of NONE => iterate f (k - 1) | SOME q => SOME q;
+          of NONE => iterate f (j - 1) | SOME q => SOME q;
     fun with_testers k [] = NONE
       | with_testers k (tester :: testers) =
-          case iterate (fn () => tester k) i
+          case iterate (fn () => tester (k - 1)) i
            of NONE => with_testers k testers
             | SOME q => SOME q;
     fun with_size k = if k > size then NONE