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

GHC ghc-devs at haskell.org
Fri Sep 28 06:38:00 UTC 2018


#15646: ghci takes super long time to find the type of large fractional number
-------------------------------------+-------------------------------------
        Reporter:  Johannkokos       |                Owner:
                                     |  JulianLeviston
            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 osa1):

 Hmm, I'm not sure if doing parsing in runtime is a good idea. Why not do
 the
 parsing in compile time generate Core for this instead:

 {{{
 (X GHC.Real.% 1) GHC.Num.* (10 :: Integer) GHC.Real.^^ Y
 }}}

 for `XeY`? Now the huge `Integer` will be computed in runtime but we won't
 be
 doing parsing.

 I just realized that this is basically desugaring `XeY` to `(X%1) *
 10^^Y`, similar to the idea in comment:20 except we don't ask users to
 write this, instead we convert the `XeY` notation to the other.

 Simon, any opinions on this?

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


More information about the ghc-tickets mailing list