#5688: instance Read Integer readsPrec out of memory due to exponential notation
------------------------------+---------------------------------------------
Reporter: gracjan | Owner:
Type: bug | Status: patch
Priority: normal | Component: libraries/base
Version: 6.12.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Runtime crash | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
Changes (by gracjan):
* status: new => patch
Comment:
The second patch is a bit more invasive. It adds new constructor to
Text.Read.Lex.Lexeme
Exp Integer Integer
that represents exponential notation directly.
When parsing integral types Exp is considered parse failure.
When parsing RealFloat then encodeFloat is used (and exponent clamped to
Int).
Report consistency is fixed. No more out of memory errors when parsing
numbers.
Downside is additional constructor in Lexeme.
If you happen to know better how to fix this issue I'm eager to help.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:3>
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