[GHC] #15646: ghci takes super long time to find the type of large fractional number

GHC ghc-devs at haskell.org
Tue Sep 25 17:00:38 UTC 2018


#15646: ghci takes super long time to find the type of large fractional number
-------------------------------------+-------------------------------------
        Reporter:  Johannkokos       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  GHCi              |              Version:  8.4.3
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > I would be careful with fl_after: we don't want to merely convert the
 part after the dot to an integer, because 1.2e3 and 1.02e3 are not the
 same.

 Excellent point.

 > Regarding desugaring to readRational "1e100", do I understand correctly
 programs would then have to parse 1e100 every time a floating literal is
 evaluated?

 No; it'll be floated to top level, and done once in the run of the
 program.

 > I would still prefer to forbid big exponents and call it a day.

 The difficulty is then you have to pick what is "big"; and one day it'll
 bite us.  So we'll add a compiler flag, etc.  It doesn't smell, to me,
 like something that should cause the program to be rejected.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15646#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list