projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2000-01-31 13:17:18 by simonmar]
[ghc-hetmet.git]
/
ghc
/
lib
/
std
/
Ix.lhs
diff --git
a/ghc/lib/std/Ix.lhs
b/ghc/lib/std/Ix.lhs
index
1715448
..
ab733ee
100644
(file)
--- a/
ghc/lib/std/Ix.lhs
+++ b/
ghc/lib/std/Ix.lhs
@@
-29,6
+29,7
@@
module Ix
-- Implementation checked wrt. Haskell 98 lib report, 1/99.
) where
-- Implementation checked wrt. Haskell 98 lib report, 1/99.
) where
+#ifndef __HUGS__
import {-# SOURCE #-} PrelErr ( error )
import PrelTup
import PrelBase
import {-# SOURCE #-} PrelErr ( error )
import PrelTup
import PrelBase
@@
-36,6
+37,8
@@
import PrelList( null )
import PrelEnum
import PrelShow
import PrelNum
import PrelEnum
import PrelShow
import PrelNum
+
+default()
\end{code}
%*********************************************************
\end{code}
%*********************************************************
@@
-100,9
+103,9
@@
instance Ix Int where
index b i | inRange b i = unsafeIndex b i
| otherwise = indexError b i "Int"
index b i | inRange b i = unsafeIndex b i
| otherwise = indexError b i "Int"
+ {-# INLINE inRange #-}
inRange (I# m,I# n) (I# i) = m <=# i && i <=# n
inRange (I# m,I# n) (I# i) = m <=# i && i <=# n
-
----------------------------------------------------------------------
instance Ix Integer where
{-# INLINE range #-}
----------------------------------------------------------------------
instance Ix Integer where
{-# INLINE range #-}
@@
-267,3
+270,10
@@
rangeSize b@(_l,h) | inRange b h = unsafeIndex b h + 1
-- Here l<h, but the second index ranges from 2..1 and
-- hence is empty
\end{code}
-- Here l<h, but the second index ranges from 2..1 and
-- hence is empty
\end{code}
+
+\begin{code}
+#else
+-- This module is empty; Ix is currently defined in the prelude, but should
+-- eventually be moved to this library file instead.
+#endif
+\end{code}