#5692: Source code with large floating constants in exponential notation cannot 
be
compiled
--------------------------------+-------------------------------------------
 Reporter:  gracjan             |          Owner:                  
     Type:  bug                 |         Status:  new             
 Priority:  normal              |      Component:  Compiler        
  Version:  7.2.1               |       Keywords:                  
       Os:  Unknown/Multiple    |   Architecture:  Unknown/Multiple
  Failure:  Compile-time crash  |       Testcase:                  
Blockedby:                      |       Blocking:                  
  Related:  5688                |  
--------------------------------+-------------------------------------------
 Source code cannot be compiled:

 {{{
 main = do
     print (123e124124124 :: Double)
 }}}

 where this one can be and will work after #5688 is fixed:

 {{{
 main = do
     print (read "123e124124124" :: Double)
 }}}

 Haskell Report forces Float and Double to go through Rational:

 http://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1

 When exponent is big it produces very large Rational numbers. That takes a
 lot of time and usually ends in out of memory condition.

 This is similar to #5688, but at compile time.

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