Commit 85bf76a8 authored by thomie's avatar thomie

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
parent 5d57087e
......@@ -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 @[...]@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment