projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UNDO: Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676)
[ghc-base.git]
/
GHC
/
Real.lhs
diff --git
a/GHC/Real.lhs
b/GHC/Real.lhs
index
71d35e6
..
971f276
100644
(file)
--- a/
GHC/Real.lhs
+++ b/
GHC/Real.lhs
@@
-54,10
+54,9
@@
ratioPrec, ratioPrec1 :: Int
ratioPrec = 7 -- Precedence of ':%' constructor
ratioPrec1 = ratioPrec + 1
ratioPrec = 7 -- Precedence of ':%' constructor
ratioPrec1 = ratioPrec + 1
-infinity, notANumber, negativeZero :: Rational
+infinity, notANumber :: Rational
infinity = 1 :% 0
notANumber = 0 :% 0
infinity = 1 :% 0
notANumber = 0 :% 0
-negativeZero = 0 :% (-1)
-- Use :%, not % for Inf/NaN; the latter would
-- immediately lead to a runtime error, because it normalises.
-- Use :%, not % for Inf/NaN; the latter would
-- immediately lead to a runtime error, because it normalises.