[project @ 1997-11-24 20:13:08 by sof]
authorsof <unknown>
Mon, 24 Nov 1997 20:13:42 +0000 (20:13 +0000)
committersof <unknown>
Mon, 24 Nov 1997 20:13:42 +0000 (20:13 +0000)
fix to have it compile with 2.09 (and later)

ghc/compiler/basicTypes/UniqSupply.lhs
ghc/compiler/main/CmdLineOpts.lhs

index adffd47..1c651cb 100644 (file)
@@ -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#)))
index 09fbaa9..c52b97b 100644 (file)
@@ -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(..))