From: ross Date: Tue, 21 Dec 2004 16:42:06 +0000 (+0000) Subject: [project @ 2004-12-21 16:42:06 by ross] X-Git-Tag: nhc98-1-18-release~150 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3e23aaae1a1f07fd28f1092d0f79e13d66b72f09;p=ghc-base.git [project @ 2004-12-21 16:42:06 by ross] 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. --- diff --git a/Control/Monad/ST.hs b/Control/Monad/ST.hs index ec4cc7e..0e34857 100644 --- a/Control/Monad/ST.hs +++ b/Control/Monad/ST.hs @@ -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)) diff --git a/Data/Typeable.hs b/Data/Typeable.hs index e563129..7f0e974 100644 --- a/Data/Typeable.hs +++ b/Data/Typeable.hs @@ -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,",")