[GHC] #15646: ghci takes super long time to find the type of large fractional number
GHC
ghc-devs at haskell.org
Mon Sep 24 13:14:15 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):
> But this relies on laziness, no?
No, it doesn't rely on laziness. At no stage will GHC construct that
Rational. The desugarer will generate something like
{{{
Var 'fromRational' `App` (Var 'readRational' `App` Lit (LitString
"1e100"))
}}}
That is, it'll generate Core that will, when compiled and run, compute the
rational (at runtime). But the compiler just manipulates this Core data
structure, there is no bad Rational in it. Does that help?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15646#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list