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