Skip to content

Stricter enumFrom instance for Integer, to match Int

Stack overflow for enumFrom :: Integer (but not enumFromTo nor for Int).

main = print (head (drop 1000000 [1 .. ]))

Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize' to increase it.

Due to lazy accumulator for Integer enumFrom.

Patch and library ticket here:

http://hackage.haskell.org/trac/ghc/ticket/1997

It looks like it could be a GHC bug report instead of a library proposal (similar to the buildr/fold failures), so reporting it as a GHC issue.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC dons@galois.com
Operating system Multiple
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information