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

GHC ghc-devs at haskell.org
Tue Oct 16 02:04:50 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):

 Here's my suggested draft, so far:

 {{{
 data FractionalLit
   = FL { fl_text :: SourceText                 -- How the value was
 written in the source
        , fl_neg :: Bool                        -- See Note [Negative zero]
        , fl_signi :: Integer                   -- The significand
 component of the literal
        , fl_exp :: Integer                     -- The exponent component
 of the literal
        , fl_exp_base :: FractionalExponentBase -- See Note [Fractional
 exponent bases]
        }

 data FractionalExponentBase
   = Base2
   | Base10

 -- Note [fractional exponent bases] For hexadecimal rationals of
 -- the form 0x0.3p10 the exponent is given on base 2 rather than
 -- base 10. These are the only options, hence the sum type. See also
 #15646.


 }}}

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


More information about the ghc-tickets mailing list