#endif
#ifdef __GLASGOW_HASKELL__
--- GHC only to the end of file
-
import Foreign.C
import Foreign.Ptr ( Ptr, FunPtr )
import Foreign.StablePtr ( StablePtr )
import GHC.Conc
import GHC.Base
+#endif /* __GLASGOW_HASKELL__ */
+
+#ifdef __HUGS__
+instance HasBounds IOArray where
+ bounds = boundsIOArray
+
+instance MArray IOArray e IO where
+ newArray = newIOArray
+ unsafeRead = unsafeReadIOArray
+ unsafeWrite = unsafeWriteIOArray
+#endif /* __HUGS__ */
+
+iOArrayTc :: TyCon
+iOArrayTc = mkTyCon "IOArray"
+
+instance (Typeable a, Typeable b) => Typeable (IOArray a b) where
+ typeOf a = mkAppTy iOArrayTc [typeOf ((undefined :: IOArray a b -> a) a),
+ typeOf ((undefined :: IOArray a b -> b) a)]
+
+#ifdef __GLASGOW_HASKELL__
+-- GHC only to the end of file
-----------------------------------------------------------------------------
-- | Mutable, boxed, non-strict arrays in the 'IO' monad. The type
--
newtype IOArray i e = IOArray (STArray RealWorld i e) deriving Eq
-iOArrayTc :: TyCon
-iOArrayTc = mkTyCon "IOArray"
-
-instance (Typeable a, Typeable b) => Typeable (IOArray a b) where
- typeOf a = mkAppTy iOArrayTc [typeOf ((undefined :: IOArray a b -> a) a),
- typeOf ((undefined :: IOArray a b -> b) a)]
-
instance HasBounds IOArray where
{-# INLINE bounds #-}
bounds (IOArray marr) = bounds marr