Remove unused imports from base
[ghc-base.git] / Control / Monad / ST.hs
index 0e34857..4260d0e 100644 (file)
@@ -1,3 +1,4 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Monad.ST
 --
 -- This library provides support for /strict/ state threads, as
 -- described in the PLDI \'94 paper by John Launchbury and Simon Peyton
--- Jones /Lazy State Threads/.
+-- Jones /Lazy Functional State Threads/.
 --
 -----------------------------------------------------------------------------
 
 module Control.Monad.ST
   (
-       -- * The 'ST' Monad
-       ST,             -- abstract, instance of Functor, Monad, Typeable.
-       runST,          -- :: (forall s. ST s a) -> a
-       fixST,          -- :: (a -> ST s a) -> ST s a
-
-       -- * Converting 'ST' to 'IO'
-       RealWorld,              -- abstract
-       stToIO,                 -- :: ST RealWorld a -> IO a
-
-       -- * Unsafe operations
-       unsafeInterleaveST,     -- :: ST s a -> ST s a
-       unsafeIOToST            -- :: IO a -> ST s a
+        -- * The 'ST' Monad
+        ST,             -- abstract, instance of Functor, Monad, Typeable.
+        runST,          -- :: (forall s. ST s a) -> a
+        fixST,          -- :: (a -> ST s a) -> ST s a
+
+        -- * Converting 'ST' to 'IO'
+        RealWorld,              -- abstract
+        stToIO,                 -- :: ST RealWorld a -> IO a
+
+        -- * Unsafe operations
+        unsafeInterleaveST,     -- :: ST s a -> ST s a
+        unsafeIOToST,           -- :: IO a -> ST s a
+        unsafeSTToIO            -- :: ST s a -> IO a
       ) where
 
-import Prelude
-
 import Control.Monad.Fix
 
 #include "Typeable.h"
@@ -53,11 +53,11 @@ unsafeInterleaveST =
 #endif
 
 #ifdef __GLASGOW_HASKELL__
-import GHC.ST          ( ST, runST, fixST, unsafeInterleaveST )
-import GHC.Base                ( RealWorld )
-import GHC.IOBase      ( stToIO, unsafeIOToST )
+import GHC.ST           ( ST, runST, fixST, unsafeInterleaveST )
+import GHC.Base         ( RealWorld )
+import GHC.IO           ( stToIO, unsafeIOToST, unsafeSTToIO )
 #endif
 
 instance MonadFix (ST s) where
-       mfix = fixST
+        mfix = fixST