[project @ 2003-09-02 15:31:02 by malcolm]
authormalcolm <unknown>
Tue, 2 Sep 2003 15:31:02 +0000 (15:31 +0000)
committermalcolm <unknown>
Tue, 2 Sep 2003 15:31:02 +0000 (15:31 +0000)
For nhc98, take the corrected (thanks to Ross Paterson) version of
fixIO from NHC.IOExtras.

System/IO.hs

index 5d0f0a7..f3e0212 100644 (file)
@@ -204,7 +204,7 @@ import IO
   , IO ()
   , FilePath                  -- :: String
   )
-import NHC.Internal (unsafePerformIO)
+import NHC.IOExtras (fixIO)
 #endif
 
 import System.IO.Error (
@@ -377,10 +377,6 @@ hPrint hdl         =  hPutStrLn hdl . show
 fixIO          :: (a -> IO a) -> IO a
 fixIO m         = stToIO (fixST (ioToST . m))
 #endif
-#ifdef __NHC__
-fixIO           :: (a -> IO a) -> IO a
-fixIO f         = let x = unsafePerformIO (f x) in return x
-#endif
 
 -- $locking
 -- Implementations should enforce as far as possible, at least locally to the