From: ross Date: Tue, 22 Apr 2003 09:21:34 +0000 (+0000) Subject: [project @ 2003-04-22 09:21:34 by ross] X-Git-Tag: nhc98-1-18-release~676 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b8c1c0f5d1b45776128092d82e348277cd782a31;p=ghc-base.git [project @ 2003-04-22 09:21:34 by ross] Hugs only: minor re-arrangement of ifdefs. --- diff --git a/Data/Array/IO/Internals.hs b/Data/Array/IO/Internals.hs index fd98206..689333a 100644 --- a/Data/Array/IO/Internals.hs +++ b/Data/Array/IO/Internals.hs @@ -41,18 +41,6 @@ import GHC.IOBase 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 - -type IOUArray = StorableArray -#endif /* __HUGS__ */ - iOArrayTc :: TyCon iOArrayTc = mkTyCon "IOArray" @@ -60,15 +48,19 @@ 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 - ----------------------------------------------------------------------------- -- | Instance declarations for 'IOArray's +#ifdef __GLASGOW_HASKELL__ instance HasBounds IOArray where {-# INLINE bounds #-} bounds (IOArray marr) = bounds marr +#endif + +#ifdef __HUGS__ +instance HasBounds IOArray where + bounds = boundsIOArray +#endif instance MArray IOArray e IO where newArray = newIOArray @@ -76,6 +68,13 @@ instance MArray IOArray e IO where unsafeWrite = unsafeWriteIOArray +#ifdef __HUGS__ +type IOUArray = StorableArray +#endif + +#ifdef __GLASGOW_HASKELL__ +-- GHC only to the end of file + ----------------------------------------------------------------------------- -- Flat unboxed mutable arrays (IO monad)