[project @ 1999-01-23 17:43:21 by sof]
[ghc-hetmet.git] / ghc / lib / std / PrelNum.lhs
index 5a835ad..0808135 100644 (file)
@@ -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