[project @ 2004-12-21 16:42:06 by ross]
authorross <unknown>
Tue, 21 Dec 2004 16:42:06 +0000 (16:42 +0000)
committerross <unknown>
Tue, 21 Dec 2004 16:42:06 +0000 (16:42 +0000)
Hugs only: move the Typeable instance for ST back to Control.Monad.ST.

Having it in Data.Typeable, which is imported by Data.Dynamic, would mean
that every invocation of runhugs or ffihugs would need the -98 option.

Control/Monad/ST.hs
Data/Typeable.hs

index ec4cc7e..0e34857 100644 (file)
@@ -37,9 +37,13 @@ import Control.Monad.Fix
 #include "Typeable.h"
 
 #ifdef __HUGS__
+import Data.Typeable
 import Hugs.ST
 import qualified Hugs.LazyST as LazyST
 
+INSTANCE_TYPEABLE2(ST,sTTc,"ST")
+INSTANCE_TYPEABLE0(RealWorld,realWorldTc,"RealWorld")
+
 fixST :: (a -> ST s a) -> ST s a
 fixST f = LazyST.lazyToStrictST (LazyST.fixST (LazyST.strictToLazyST . f))
 
index e563129..7f0e974 100644 (file)
@@ -105,7 +105,6 @@ import GHC.Stable       -- So we can give Typeable instance for StablePtr
 import Hugs.Prelude
 import Hugs.IO
 import Hugs.IORef
-import Hugs.ST
 import Hugs.IOExts
 #endif
 
@@ -465,7 +464,9 @@ INSTANCE_TYPEABLE1(Ratio,ratioTc,"Ratio")
 INSTANCE_TYPEABLE2(Either,eitherTc,"Either")
 INSTANCE_TYPEABLE2((->),funTc,"->")
 INSTANCE_TYPEABLE1(IO,ioTc,"IO")
+#ifdef __GLASGOW_HASKELL__
 INSTANCE_TYPEABLE2(ST,stTc,"ST")
+#endif
 INSTANCE_TYPEABLE0((),unitTc,"()")
 #ifndef __NHC__
 INSTANCE_TYPEABLE2((,),pairTc,",")