[Haskell-cafe] Why does this blow the stack?

David Benbennick dbenbenn at gmail.com
Fri Dec 21 12:56:10 EST 2007

On Dec 21, 2007 9:51 AM, Justin Bailey <jgbailey at gmail.com> wrote:
> I think its [1..] which is building up the unevaluated thunk. Using
> this definition of dropTest does not blow the stack:

It also works if you do [(1::Int) ..] !! n, but not with [(1::Integer) ..] !! n

Sounds like GHC is being smart about strictness for Ints, but doesn't
know that Integer is equally strict.  If that's right, it's a bug in

More information about the Haskell-Cafe mailing list