From: Simon Marlow Date: Tue, 23 Sep 2008 13:49:49 +0000 (+0000) Subject: Restore the Haskell 98 behaviour of Show Ratio (#1920) X-Git-Tag: 2009-06-25~115 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=75fddfb104204b5fb9bc37ccf115eeb107261189;p=ghc-base.git Restore the Haskell 98 behaviour of Show Ratio (#1920) --- diff --git a/GHC/Real.lhs b/GHC/Real.lhs index 197bcde..287454e 100644 --- a/GHC/Real.lhs +++ b/GHC/Real.lhs @@ -337,8 +337,11 @@ instance (Integral a) => Show (Ratio a) where {-# SPECIALIZE instance Show Rational #-} showsPrec p (x:%y) = showParen (p > ratioPrec) $ showsPrec ratioPrec1 x . - showString "%" . -- H98 report has spaces round the % - -- but we removed them [May 04] + showString " % " . + -- H98 report has spaces round the % + -- but we removed them [May 04] + -- and added them again for consistency with + -- Haskell 98 [Sep 08, #1920] showsPrec ratioPrec1 y instance (Integral a) => Enum (Ratio a) where