-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# LANGUAGE CPP #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.ST
unsafeSTToIO -- :: ST s a -> IO a
) where
-import Prelude
-
+#if defined(__GLASGOW_HASKELL__)
+import Control.Monad.Fix ()
+#else
import Control.Monad.Fix
+#endif
#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")
LazyST.lazyToStrictST . LazyST.unsafeInterleaveST . LazyST.strictToLazyST
#endif
-#ifdef __GLASGOW_HASKELL__
-import GHC.ST ( ST, runST, fixST, unsafeInterleaveST )
-import GHC.Base ( RealWorld )
-import GHC.IOBase ( stToIO, unsafeIOToST, unsafeSTToIO )
-#endif
-
+#if !defined(__GLASGOW_HASKELL__)
instance MonadFix (ST s) where
mfix = fixST
+#endif