readSigned consumes too much input
|Reported by:||liyang||Owned by:|
|Type of failure:||Incorrect result at runtime||Test Case:|
|Related Tickets:||Differential Rev(s):|
> reads "0.1" :: [(Int, String)] 
I would have expected [(0, ".1")]. The Report specifies that reads for Int ought to essentially be readSigned readDec, and indeed readDec gives the expected result:
> readDec "0.1" [(0,".1")]
I think the bug is due to the use of lex in readSigned, which consumes the entire "0.1" string, such that readDec no longer gives a clean parse.