#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):
Ah, I believed "10.01" could be read as Rational, but I was wrong.
I did not expect "10e10" to work with Integer and I'm surprised now that
it does not work for Rational since I considered Rational to be a "more"
than Integer.
But maybe it is still a good idea to separate the fractional part from the
exponent for proper "Fractional" numbers.
http://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1
does not clarify the connection of numeric literals to number types, but
only reflects the bad
connection of floats via Rational.
So the report needs to be changed, too.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:14>
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