import Control.Monad.Fix
import Data.Typeable
+#include "Typeable.h"
+
#ifdef __HUGS__
import Hugs.ST
import qualified Hugs.LazyST as LazyST
-- ---------------------------------------------------------------------------
-- Typeable instance
-sTTc :: TyCon
-sTTc = mkTyCon "ST"
-
-instance (Typeable a, Typeable b) => Typeable (ST a b) where
- typeOf st = mkAppTy sTTc [typeOf ((undefined :: ST a b -> a) st),
- typeOf ((undefined :: ST a b -> b) st)]
+INSTANCE_TYPEABLE2(ST,sTTc,"ST")
-----------------------------------------------------------------------------
-- Typeable instance for STArray
-sTArrayTc :: TyCon
-sTArrayTc = mkTyCon "STArray"
-
-instance (Typeable a, Typeable b, Typeable c) => Typeable (STArray a b c) where
- typeOf a = mkAppTy sTArrayTc [typeOf ((undefined :: STArray a b c -> a) a),
- typeOf ((undefined :: STArray a b c -> b) a),
- typeOf ((undefined :: STArray a b c -> c) a)]
+INSTANCE_TYPEABLE3(STArray,sTArrayTc,"STArray")
-----------------------------------------------------------------------------
-- Flat unboxed mutable arrays (ST monad)
import GHC.Base
#endif /* __GLASGOW_HASKELL__ */
-iOArrayTc :: TyCon
-iOArrayTc = mkTyCon "IOArray"
+#include "Typeable.h"
-instance (Typeable a, Typeable b) => Typeable (IOArray a b) where
- typeOf a = mkAppTy iOArrayTc [typeOf ((undefined :: IOArray a b -> a) a),
- typeOf ((undefined :: IOArray a b -> b) a)]
+INSTANCE_TYPEABLE2(IOArray,iOArrayTc,"IOArray")
-----------------------------------------------------------------------------
-- | Instance declarations for 'IOArray's
--
newtype IOUArray i e = IOUArray (STUArray RealWorld i e)
-iOUArrayTc :: TyCon
-iOUArrayTc = mkTyCon "IOUArray"
-
-instance (Typeable a, Typeable b) => Typeable (IOUArray a b) where
- typeOf a = mkAppTy iOUArrayTc [typeOf ((undefined :: IOUArray a b -> a) a),
- typeOf ((undefined :: IOUArray a b -> b) a)]
+INSTANCE_TYPEABLE2(IOUArray,iOUArrayTc,"IOUArray")
instance HasBounds IOUArray where
{-# INLINE bounds #-}