[project @ 2002-10-09 17:24:12 by malcolm]
[haskell-directory.git] / System / IO / Unsafe.hs
index db67a20..98dfe2b 100644 (file)
@@ -1,24 +1,35 @@
+{-# OPTIONS -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  System.IO.Unsafe
 -- Copyright   :  (c) The University of Glasgow 2001
--- License     :  BSD-style (see the file libraries/core/LICENSE)
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- "Unsafe" IO operations.
+-- \"Unsafe\" IO operations.
 --
 -----------------------------------------------------------------------------
 
 module System.IO.Unsafe (
+   -- * Unsafe 'IO' operations
    unsafePerformIO,    -- :: IO a -> a
    unsafeInterleaveIO, -- :: IO a -> IO a
   ) where
 
-import Prelude
-
 #ifdef __GLASGOW_HASKELL__
 import GHC.IOBase
 #endif
+
+#ifdef __HUGS__
+import Hugs.IOExts
+#endif
+
+#ifdef __NHC__
+import NHC.Internal (unsafePerformIO)
+
+unsafeInterleaveIO :: IO a -> IO a
+unsafeInterleaveIO f = let x = unsafePerformIO f in return x
+#endif