projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[project @ 1999-01-23 17:43:21 by sof]
[ghc-hetmet.git]
/
ghc
/
lib
/
std
/
PrelNum.lhs
diff --git
a/ghc/lib/std/PrelNum.lhs
b/ghc/lib/std/PrelNum.lhs
index
5a835ad
..
0808135
100644
(file)
--- a/
ghc/lib/std/PrelNum.lhs
+++ b/
ghc/lib/std/PrelNum.lhs
@@
-288,7
+288,10
@@
instance Show Integer where
instance Ix Integer where
- range (m,n) = [m..n]
+ range (m,n)
+ | m <= n = [m..n]
+ | otherwise = []
+
index b@(m,_) i
| inRange b i = fromInteger (i - m)
| otherwise = indexIntegerError i b