From: sof Date: Mon, 24 Nov 1997 20:13:42 +0000 (+0000) Subject: [project @ 1997-11-24 20:13:08 by sof] X-Git-Tag: Approx_2487_patches~1272 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=003a62090be4ad204165cc09f7950fdde089b956;p=ghc-hetmet.git [project @ 1997-11-24 20:13:08 by sof] fix to have it compile with 2.09 (and later) --- diff --git a/ghc/compiler/basicTypes/UniqSupply.lhs b/ghc/compiler/basicTypes/UniqSupply.lhs index adffd47..1c651cb 100644 --- a/ghc/compiler/basicTypes/UniqSupply.lhs +++ b/ghc/compiler/basicTypes/UniqSupply.lhs @@ -42,6 +42,10 @@ import PreludeGlaST # define WHASH W# #endif +#if __GLASGOW_HASKELL__ >= 209 +import Unsafe ( unsafeInterleaveIO ) +#endif + w2i x = word2Int# x i2w x = int2Word# x i2w_s x = (x :: Int#) @@ -101,13 +105,16 @@ mkSplitUniqSupply (C# c#) -- in the compiler.... -- Too bad it's not 1.3-portable... unsafe_interleave m = +#if __GLASGOW_HASKELL__ >= 209 + unsafeInterleaveIO m +#else MkST ( \ s -> let (MkST m') = m - (r, new_s) = m' s + ST_RET(r, new_s) = m' s in - (r, s)) --- + ST_RET(r, s)) +#endif mk_unique = _ccall_ genSymZh `thenPrimIO` \ (WHASH u#) -> returnPrimIO (I# (w2i (mask# `or#` u#))) diff --git a/ghc/compiler/main/CmdLineOpts.lhs b/ghc/compiler/main/CmdLineOpts.lhs index 09fbaa9..c52b97b 100644 --- a/ghc/compiler/main/CmdLineOpts.lhs +++ b/ghc/compiler/main/CmdLineOpts.lhs @@ -106,6 +106,9 @@ import PreludeGlaST -- bad bad bad boy, Will (_Array internals) #else import GlaExts import ArrBase +#if __GLASGOW_HASKELL__ >= 209 +import Addr +#endif -- 2.04 and later exports Lift from GlaExts #if __GLASGOW_HASKELL__ < 204 import PrelBase (Lift(..))