From: simonmar Date: Wed, 15 Mar 2000 11:11:08 +0000 (+0000) Subject: [project @ 2000-03-15 11:11:08 by simonmar] X-Git-Tag: Approximately_9120_patches~4981 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ef78a50f580b829e39cc91bc71e9308c0952f8f5;p=ghc-hetmet.git [project @ 2000-03-15 11:11:08 by simonmar] sigh, add some more #ifdefs to this file (MutableArray/STArray changes). --- diff --git a/ghc/compiler/utils/FastString.lhs b/ghc/compiler/utils/FastString.lhs index 1765b72..d7f8b09 100644 --- a/ghc/compiler/utils/FastString.lhs +++ b/ghc/compiler/utils/FastString.lhs @@ -87,7 +87,11 @@ import PrelIOBase ( Handle__(..), IOError(..), IOErrorType(..), import PrimPacked import GlaExts import Addr ( Addr(..) ) +#if __GLASGOW_HASKELL__ < 407 import MutableArray ( MutableArray(..) ) +#else +import PrelArr ( STArray(..), newSTArray ) +#endif -- ForeignObj is now exported abstractly. #if __GLASGOW_HASKELL__ >= 303 @@ -232,11 +236,15 @@ type FastStringTableVar = IORef FastStringTable string_table :: FastStringTableVar string_table = unsafePerformIO ( - stToIO (newArray (0::Int,hASH_TBL_SIZE) []) #if __GLASGOW_HASKELL__ < 405 + stToIO (newArray (0::Int,hASH_TBL_SIZE) []) >>= \ (MutableArray _ arr#) -> -#else +#elif __GLASGOW_HASKELL__ < 407 + stToIO (newArray (0::Int,hASH_TBL_SIZE) []) >>= \ (MutableArray _ _ arr#) -> +#else + stToIO (newSTArray (0::Int,hASH_TBL_SIZE) []) + >>= \ (STArray _ _ arr#) -> #endif newIORef (FastStringTable 0# arr#))