|
| <prev next> |
RE: bug in instance Read Int: msg#00000lang.haskell.glasgow.bugs
On 31 May 2004 11:24, Malcolm Wallace wrote: > The Haskell'98 Report specifies that 'read'ing an Int should accept > only decimal notation > > instance Read Int where > readsPrec p = readSigned readDec > > (or near equivalent), yet ghc seems to read hexadecimal Ints. > > Prelude> show (Char.chr (read "0x2B" :: Int)) > "'+'" > Prelude> > > Ghc's behaviour seems entirely reasonable, but it does not conform > to the Report. Should we regard this as a bug in the definition > therefore? Is there an on-going errata list for the final Revised > Report? I think we class this as a "deliberate deviation" from Haskell 98 in GHC. It's even documented; see: http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs-and-infelic ities.html#VS-HASKELL-DEFN Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | RE: bug in instance Read Int, Simon Peyton-Jones |
|---|---|
| Next by Thread: | RE: bug in instance Read Int, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |