Rearrange the contents of Control.Monad.ST; no functionality changes
authorIan Lynagh <igloo@earth.li>
Mon, 23 Nov 2009 22:27:02 +0000 (22:27 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 23 Nov 2009 22:27:02 +0000 (22:27 +0000)
Control/Monad/ST.hs

index 4260d0e..3ce5001 100644 (file)
@@ -36,11 +36,17 @@ import Control.Monad.Fix
 
 #include "Typeable.h"
 
-#ifdef __HUGS__
+#if defined(__GLASGOW_HASKELL__)
+import GHC.ST           ( ST, runST, fixST, unsafeInterleaveST )
+import GHC.Base         ( RealWorld )
+import GHC.IO           ( stToIO, unsafeIOToST, unsafeSTToIO )
+#elif defined(__HUGS__)
 import Data.Typeable
 import Hugs.ST
 import qualified Hugs.LazyST as LazyST
+#endif
 
+#if defined(__HUGS__)
 INSTANCE_TYPEABLE2(ST,sTTc,"ST")
 INSTANCE_TYPEABLE0(RealWorld,realWorldTc,"RealWorld")
 
@@ -52,12 +58,6 @@ unsafeInterleaveST =
     LazyST.lazyToStrictST . LazyST.unsafeInterleaveST . LazyST.strictToLazyST
 #endif
 
-#ifdef __GLASGOW_HASKELL__
-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