title: Why does QuickCheck give up?
body: <p>I am using <code>QuickCheck</code> to test the following program:</p>
  
  <pre><code>{-# LANGUAGE TemplateHaskell #-}
  
  import Test.QuickCheck
  import Test.QuickCheck.All
  
  elementAt :: (Integral b) =&gt; [a] -&gt; b -&gt; a
  elementAt [x] _ = x
  elementAt (x:xs) 1 = x
  elementAt (x:xs) b = elementAt xs (b - 1)
  
  prop_elementAt xs b = length xs &gt; 0 &amp;&amp; b &gt;= 0 &amp;&amp; b &lt; length xs ==&gt; elementAt xs (b + 1) == xs !! b
  
  main = $(quickCheckAll)
  </code></pre>
  
  <p>Although the response varies, I constantly receive the message</p>
  
  <pre><code>*** Gave up! Passed only x tests.
  </code></pre>
  
  <p>Is this something I should be concerned about? Or does the nature of the test input dictate how long QuickCheck will run for?</p>