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:
1819f73
)
[project @ 2002-06-14 08:17:08 by simonpj]
author
simonpj
<unknown>
Fri, 14 Jun 2002 08:17:08 +0000
(08:17 +0000)
committer
simonpj
<unknown>
Fri, 14 Jun 2002 08:17:08 +0000
(08:17 +0000)
Add comment
Text/Read/Lex.hs
patch
|
blob
|
history
diff --git
a/Text/Read/Lex.hs
b/Text/Read/Lex.hs
index
290072b
..
f2c0469
100644
(file)
--- a/
Text/Read/Lex.hs
+++ b/
Text/Read/Lex.hs
@@
-288,6
+288,17
@@
infinity, notANumber :: Rational
infinity = 1 :% 0
notANumber = 0 :% 0
infinity = 1 :% 0
notANumber = 0 :% 0
+-- Use :%, not % for Inf/NaN, the latter would
+-- immediately lead to a runtime error.
+--
+-- Note that
+-- isInfinite (read "Infinity" :: Float)
+-- or
+-- isInfinite (fromRational (1 :% 0))
+-- still don't work, because fromRational is not OK for those cases.
+--
+-- The whole Infinity/NaN story is a bit murky to me
+
type Base = Int
type Digits = [Int]
type Base = Int
type Digits = [Int]