#1579: instance Read Integer contradicts Haskell98
-----------------------------+----------------------------------------------
  Reporter:  Isaac Dupree    |          Owner:         
      Type:  bug             |         Status:  new    
  Priority:  normal          |      Milestone:         
 Component:  libraries/base  |        Version:  6.6.1  
  Severity:  normal          |       Keywords:         
Difficulty:  Unknown         |             Os:  Unknown
  Testcase:                  |   Architecture:  Unknown
-----------------------------+----------------------------------------------
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)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1579>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to