From eacefc4ec04b67940c74ab797eee34c9f47b7d75 Mon Sep 17 00:00:00 2001 From: malcolm Date: Tue, 2 Sep 2003 15:31:02 +0000 Subject: [PATCH] [project @ 2003-09-02 15:31:02 by malcolm] For nhc98, take the corrected (thanks to Ross Paterson) version of fixIO from NHC.IOExtras. --- System/IO.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/System/IO.hs b/System/IO.hs index 5d0f0a7..f3e0212 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -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 -- 1.7.10.4