From d80e846fb4f5da3d5da611c6b76e849390a863c7 Mon Sep 17 00:00:00 2001 From: ross Date: Fri, 23 Apr 2004 18:13:07 +0000 Subject: [PATCH] [project @ 2004-04-23 18:13:07 by ross] Hugs: use the same version of fixIO as GHC --- System/IO.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.7.10.4