From 75fddfb104204b5fb9bc37ccf115eeb107261189 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 23 Sep 2008 13:49:49 +0000 Subject: [PATCH] Restore the Haskell 98 behaviour of Show Ratio (#1920) --- GHC/Real.lhs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 1.7.10.4