#5688: instance Read Integer/Rational/Double readsPrec out of memory and crash 
due
to exponential notation
---------------------------------+------------------------------------------
    Reporter:  gracjan           |       Owner:                  
        Type:  bug               |      Status:  patch           
    Priority:  highest           |   Milestone:  7.4.1           
   Component:  libraries/base    |     Version:  6.12.3          
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  Runtime crash   
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by maeder):

 I think, read should behave like the haskell scanner and "10.01e10 ::
 Rational" should be rejected with "No instance for (Floating Rational)" as
 "10.01 :: Integer" is with:

 {{{
 Prelude> 10.10 :: Integer

 <interactive>:1:1:
     No instance for (Fractional Integer)
       arising from the literal `10.1'
 ...
 }}}

 Another question is, if leading or trailing zeros should be preserved for
 messages.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:16>
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