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

GHC ghc-devs at haskell.org
Mon Oct 15 12:27:19 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 JulianLeviston):

 Okay so I'm a bit stuck on implementing a version of `readHexRational ::
 String -> Rational` that looks like `readHexSignificandExponentPair ::
 String -> (Integer, Integer)` instead (where the pair returned is the
 significand and exponent in base 10).

 The hex float format has its exponent in base 2, not base 10. Should I
 also store the base within the `FractionalLit` type? Otherwise I'd have to
 do a (not very) precise conversion, and it strikes me that that'd bring us
 back to where we were before but on the hex side instead of the decimal
 side.

 I might give that a crack, actually. Let me know if not a good idea.

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


More information about the ghc-tickets mailing list