Commit 58eb623f authored by ross's avatar ross
Browse files

[project @ 2004-04-23 18:13:07 by ross]

Hugs: use the same version of fixIO as GHC
parent 63fecf0a
...@@ -170,6 +170,9 @@ import GHC.Show ...@@ -170,6 +170,9 @@ import GHC.Show
#ifdef __HUGS__ #ifdef __HUGS__
import Hugs.IO import Hugs.IO
import Hugs.IOExts import Hugs.IOExts
import Hugs.IORef
import Hugs.Prelude ( throw, Exception(NonTermination) )
import System.IO.Unsafe ( unsafeInterleaveIO )
#endif #endif
#ifdef __NHC__ #ifdef __NHC__
...@@ -374,7 +377,7 @@ hPrint hdl = hPutStrLn hdl . show ...@@ -374,7 +377,7 @@ hPrint hdl = hPutStrLn hdl . show
-- --------------------------------------------------------------------------- -- ---------------------------------------------------------------------------
-- fixIO -- fixIO
#ifdef __GLASGOW_HASKELL__ #if defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
fixIO :: (a -> IO a) -> IO a fixIO :: (a -> IO a) -> IO a
fixIO k = do fixIO k = do
ref <- newIORef (throw NonTermination) ref <- newIORef (throw NonTermination)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment