Skip to content

instance Read Integer contradicts Haskell98

http://haskell.org/onlinereport/standard-prelude.html says

instance  Read Integer  where
    readsPrec p         = readSigned readDec

However, I get contradictory results in GHCi:

Prelude Numeric> readsPrec undefined "-(21602)zzz" :: [(Integer,String)]
[(-21602,"zzz")]
Prelude Numeric> readSigned readDec "-(21602)zzz" :: [(Integer,String)]
[]

(hugs, however, gives [] for both results)

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
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