[GHC] #15646: ghci takes super long time to find the type of large fractional number
GHC
ghc-devs at haskell.org
Fri Dec 28 13:03:03 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: #5692 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by JulianLeviston):
Ah, after reporting those problems, I thought to myself... "let's try re-
running `./boot` and `./configure` after moving the definitions of
`mkRational`, `mkRationalWithExponentBase`, `FractionalExponentBase` and
`rationalFromFractionalLit` to `GHC.Real` again to see if it actually
bootstraps the files like I thought it might, and it seems it did (I
obviously still have a lot to learn ;-)).
Still, got many other compiler errors, but it at least it seems to be
doing the right thing. I'm still fairly unsure about how exactly I can
extract all the pieces I need to to put these functions into `GHC.Real`
(or somewhere available)...
Here are the errors (which make sense):
{{{
libraries/base/GHC/Real.hs:832:13: error:
Not in scope: type constructor or class ‘Data’
|
832 | deriving (Data, Show)
| ^^^^
libraries/base/GHC/Real.hs:841:30: error:
Not in scope: type constructor or class ‘FractionalLit’
Perhaps you meant ‘Fractional’ (line 194)
|
841 | rationalFromFractionalLit :: FractionalLit -> Rational
| ^^^^^^^^^^^^^
libraries/base/GHC/Real.hs:842:28: error:
Not in scope: data constructor ‘FL’
Perhaps you meant ‘F#’ (imported from GHC.Base)
|
842 | rationalFromFractionalLit (FL _ _ i e expBase) =
| ^^
libraries/base/GHC/Real.hs:844:28: error:
Not in scope: data constructor ‘THFL’
|
844 | rationalFromFractionalLit (THFL _ _ r) = r
| ^^^^
make[1]: *** [libraries/base/dist-install/build/GHC/Real.o] Error 1
make: *** [all] Error 2
}}}
So, I'll keep pottering along and see if I can't make it compile.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15646#comment:68>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list