[project @ 2005-10-13 11:09:50 by ross]
[haskell-directory.git] / Data / Array / Diff.hs
index 59ff871..94018e4 100644 (file)
@@ -6,7 +6,7 @@
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  experimental
--- Portability :  non-portable
+-- Portability :  non-portable (uses Data.Array.IArray)
 --
 -- Functional arrays with constant-time update.
 --
@@ -83,10 +83,7 @@ import Data.Array.IO
 import Foreign.Ptr        ( Ptr, FunPtr )
 import Foreign.StablePtr  ( StablePtr )
 import Data.Int           ( Int8,  Int16,  Int32,  Int64 )
-#ifdef __GLASGOW_HASKELL__
-import Data.Word          ( Word )
-#endif
-import Data.Word          ( Word8, Word16, Word32, Word64 )
+import Data.Word          ( Word, Word8, Word16, Word32, Word64 )
 
 import System.IO.Unsafe          ( unsafePerformIO )
 import Control.Exception  ( evaluate )
@@ -128,10 +125,8 @@ instance (Ix ix, Show ix) => Show (DiffUArray ix Char) where
 instance (Ix ix, Show ix) => Show (DiffUArray ix Int) where
   showsPrec = showsIArray
 
-#ifdef __GLASGOW_HASKELL__
 instance (Ix ix, Show ix) => Show (DiffUArray ix Word) where
   showsPrec = showsIArray
-#endif
 
 instance (Ix ix, Show ix) => Show (DiffUArray ix Float) where
   showsPrec = showsIArray
@@ -184,12 +179,10 @@ instance IArray (IOToDiffArray IOUArray) Int where
     unsafeAt      a i    = unsafePerformIO $ a `readDiffArray` i
     unsafeReplace a ies  = unsafePerformIO $ a `replaceDiffArray2` ies
 
-#ifdef __GLASGOW_HASKELL__
 instance IArray (IOToDiffArray IOUArray) Word where
     unsafeArray   lu ies = unsafePerformIO $ newDiffArray lu ies
     unsafeAt      a i    = unsafePerformIO $ a `readDiffArray` i
     unsafeReplace a ies  = unsafePerformIO $ a `replaceDiffArray2` ies
-#endif
 
 instance IArray (IOToDiffArray IOUArray) (Ptr a) where
     unsafeArray   lu ies = unsafePerformIO $ newDiffArray lu ies