projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8346210
)
Restore the Haskell 98 behaviour of Show Ratio (#1920)
author
Simon Marlow
<simonmarhaskell@gmail.com>
Tue, 23 Sep 2008 13:49:49 +0000
(13:49 +0000)
committer
Simon Marlow
<simonmarhaskell@gmail.com>
Tue, 23 Sep 2008 13:49:49 +0000
(13:49 +0000)
GHC/Real.lhs
patch
|
blob
|
history
diff --git
a/GHC/Real.lhs
b/GHC/Real.lhs
index
197bcde
..
287454e
100644
(file)
--- 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