diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-05 13:17:56 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-12 11:19:15 +0200 |
commit | 85bf76a8f8015ed6adb65095d53d8af933080354 (patch) | |
tree | 2432fb59ff1d22b4fb04f77030f9e449746ecd21 /compiler | |
parent | 5d57087e314bd484dbe14958f9b422be3ac6641a (diff) | |
download | haskell-85bf76a8f8015ed6adb65095d53d8af933080354.tar.gz |
Pretty: show rational as is (#10735)
Following libraries/pretty. I'm not sure why it converted to Double
before.
This function isn't used by GHC itself. It is exported from these two
places:
* compiler/utils/Outputable
* libraries/template-haskell/Language/Haskell/TH/PprLib.hs
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/utils/Pretty.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs index d07bd3d433..29a7b84168 100644 --- a/compiler/utils/Pretty.hs +++ b/compiler/utils/Pretty.hs @@ -205,7 +205,6 @@ module Pretty ( import BufWrite import FastString import Panic -import Numeric (fromRat) import System.IO import Prelude hiding (error) @@ -499,8 +498,7 @@ int n = text (show n) integer n = text (show n) float n = text (show n) double n = text (show n) -rational n = text (show (fromRat n :: Double)) ---rational n = text (show (fromRationalX n)) -- _showRational 30 n) +rational n = text (show n) parens :: Doc -> Doc -- ^ Wrap document in @(...)@ brackets :: Doc -> Doc -- ^ Wrap document in @[...]@ |