Fix typechecking time bug for large rationals (#15646)
When desugaring large overloaded literals we now avoid computing the `Rational` value. Instead prefering to store the significant and exponent as given where reasonable and possible. See Note [FractionalLit representation] for details.
Showing
- compiler/GHC/Builtin/Names.hs 13 additions, 2 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs 0 additions, 2 deletionscompiler/GHC/Builtin/Types.hs
- compiler/GHC/HsToCore/Match.hs 12 additions, 8 deletionscompiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Literal.hs 129 additions, 17 deletionscompiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs 29 additions, 5 deletionscompiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs 69 additions, 3 deletionscompiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/Parser/Lexer.x 15 additions, 13 deletionscompiler/GHC/Parser/Lexer.x
- compiler/GHC/Rename/Pat.hs 13 additions, 8 deletionscompiler/GHC/Rename/Pat.hs
- compiler/GHC/Tc/Utils/Zonk.hs 9 additions, 3 deletionscompiler/GHC/Tc/Utils/Zonk.hs
- compiler/GHC/ThToHs.hs 3 additions, 3 deletionscompiler/GHC/ThToHs.hs
- compiler/GHC/Types/Literal.hs 1 addition, 0 deletionscompiler/GHC/Types/Literal.hs
- compiler/GHC/Types/SourceText.hs 104 additions, 27 deletionscompiler/GHC/Types/SourceText.hs
- compiler/GHC/Utils/Misc.hs 103 additions, 7 deletionscompiler/GHC/Utils/Misc.hs
- libraries/base/GHC/Real.hs 19 additions, 0 deletionslibraries/base/GHC/Real.hs
- testsuite/tests/ghc-api/annotations-literals/literals.stdout 3 additions, 3 deletionstestsuite/tests/ghc-api/annotations-literals/literals.stdout
- testsuite/tests/pmcheck/should_compile/T19384.hs 34 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T19384.hs
- testsuite/tests/pmcheck/should_compile/all.T 5 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/all.T
- testsuite/tests/typecheck/should_compile/T15646.hs 7 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T15646.hs
- testsuite/tests/typecheck/should_compile/all.T 5 additions, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
Loading
Please register or sign in to comment