From ef78a50f580b829e39cc91bc71e9308c0952f8f5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 15 Mar 2000 11:11:08 +0000 Subject: [PATCH] [project @ 2000-03-15 11:11:08 by simonmar] sigh, add some more #ifdefs to this file (MutableArray/STArray changes). --- ghc/compiler/utils/FastString.lhs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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#)) -- 1.7.10.4