[commit: ghc] master: Pretty: show rational as is (#10735) (85bf76a)

git at git.haskell.org git at git.haskell.org
Wed Aug 12 09:23:20 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/85bf76a8f8015ed6adb65095d53d8af933080354/ghc

>---------------------------------------------------------------

commit 85bf76a8f8015ed6adb65095d53d8af933080354
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Wed Aug 5 13:17:56 2015 +0200

    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


>---------------------------------------------------------------

85bf76a8f8015ed6adb65095d53d8af933080354
 compiler/utils/Pretty.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index d07bd3d..29a7b84 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 @[...]@



More information about the ghc-commits mailing list