title: Create an elements generator with an infinite list
body: <p>I'm playing with QuickCheck, and stumbled upon some strange behavior</p>
  
  <pre><code>sample $ elements [1..5]
  </code></pre>
  
  <p>works as expected, however</p>
  
  <pre><code>sample $ elements [1..]
  </code></pre>
  
  <p>hangs in ghci, even when using a finite type such as <code>Int</code></p>
  
  <pre><code>sample $ elements [(1::Int)..]
  </code></pre>
  
  <p>Why doesn't it print arbitrary (pun intended :) large <code>Int</code>s?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I've tested @amalloy's explanantion by using</p>
  
  <pre><code>sample $ elements ([1 .. ] :: [Int8])
  </code></pre>
  
  <p>which does terminate.</p>