diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-06 13:46:35 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-01-06 14:25:01 +0000 |
commit | c409b6f30373535b6eed92e55d4695688d32be9e (patch) | |
tree | 66902f9691a157684430474cb6ab1228a5c9f1d5 /libraries/base/GHC/Real.hs | |
parent | 39337a6d97c853a88fa61d6b12a04eb8c2e5984f (diff) | |
download | haskell-c409b6f30373535b6eed92e55d4695688d32be9e.tar.gz |
Remove redundant constraints from libraries, discovered by -fwarn-redundant-constraints
This patch affects libraries, and requires a submodule update.
Some other libraries, maintained by others, have redundant constraints,
namely:
containers
haskeline
transformers
binary
I have suppressed the redundant-constraint warnings by settings in
validate-settings.mk
(in this commit)
Diffstat (limited to 'libraries/base/GHC/Real.hs')
-rw-r--r-- | libraries/base/GHC/Real.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs index 656a22de74..1a18e6a3ac 100644 --- a/libraries/base/GHC/Real.hs +++ b/libraries/base/GHC/Real.hs @@ -103,12 +103,12 @@ notANumber = 0 :% 0 -- | Extract the numerator of the ratio in reduced form: -- the numerator and denominator have no common factor and the denominator -- is positive. -numerator :: (Integral a) => Ratio a -> a +numerator :: Ratio a -> a -- | Extract the denominator of the ratio in reduced form: -- the numerator and denominator have no common factor and the denominator -- is positive. -denominator :: (Integral a) => Ratio a -> a +denominator :: Ratio a -> a -- | 'reduce' is a subsidiary function used only in this module. @@ -410,7 +410,7 @@ instance (Integral a) => RealFrac (Ratio a) where properFraction (x:%y) = (fromInteger (toInteger q), r:%y) where (q,r) = quotRem x y -instance (Integral a, Show a) => Show (Ratio a) where +instance (Show a) => Show (Ratio a) where {-# SPECIALIZE instance Show Rational #-} showsPrec p (x:%y) = showParen (p > ratioPrec) $ showsPrec ratioPrec1 x . |