Skip to content

Strictness of Integer's enumFrom

According to the Haskell report "For all four of these Prelude numeric types, all of the enumFrom family of functions are strict in all their arguments." (referring to Int, Integer, Float, Double). However, Integer's enumFrom and enumFromThen are lazy in their parameters.

To reproduce:

main = print $ null [undefined :: Integer ..]

This yields "False", where it should yield |.

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