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

GHC ghc-devs at haskell.org
Thu Oct 25 12:05:01 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):

 Have been trying to create the expression referred to by SPJ in comment:24
 in `MatchList.hs` but having trouble creating core.

 {{{
     HsRat _ fl ty    -> case fl of
                           FL { fl_signi = i, fl_exp = e } ->
                             return (mkApps (Var "makeRational")
 [(mkIntegerExpr i) (mkIntegerExpr e)])
 }}}


 I don't know how to make a `Var`. The `String` above is clearly wrong, but
 I couldn't find out how to construct one from scratch. I read through
 `MkId.hs`, `Id.hs` and `Var.hs` but it's not clear to me what I should be
 doing. Also, comment:24 refers to making "a new library function" which
 seems easy enough, but I don't know what a library function is (like...
 where should it go such that it gets picked up at runtime and registered
 in the list of available variables, available to core?).

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


More information about the ghc-tickets mailing list