From: ross Date: Fri, 23 Apr 2004 18:13:07 +0000 (+0000) Subject: [project @ 2004-04-23 18:13:07 by ross] X-Git-Tag: nhc98-1-18-release~325 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d80e846fb4f5da3d5da611c6b76e849390a863c7;p=haskell-directory.git [project @ 2004-04-23 18:13:07 by ross] Hugs: use the same version of fixIO as GHC --- diff --git a/System/IO.hs b/System/IO.hs index f2a412c..aed2eb7 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -170,6 +170,9 @@ import GHC.Show #ifdef __HUGS__ import Hugs.IO import Hugs.IOExts +import Hugs.IORef +import Hugs.Prelude ( throw, Exception(NonTermination) ) +import System.IO.Unsafe ( unsafeInterleaveIO ) #endif #ifdef __NHC__ @@ -374,7 +377,7 @@ hPrint hdl = hPutStrLn hdl . show -- --------------------------------------------------------------------------- -- fixIO -#ifdef __GLASGOW_HASKELL__ +#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) fixIO :: (a -> IO a) -> IO a fixIO k = do ref <- newIORef (throw NonTermination)