- -- * The Typeable class
- Typeable( typeOf ), -- :: a -> TypeRep
-
- -- * Type-safe cast
- cast, -- :: (Typeable a, Typeable b) => a -> Maybe b
- gcast, -- a generalisation of cast
-
- -- * Type representations
- TypeRep, -- abstract, instance of: Eq, Show, Typeable
- TyCon, -- abstract, instance of: Eq, Show, Typeable
-
- -- * Construction of type representations
- mkTyCon, -- :: String -> TyCon
- mkAppTy, -- :: TyCon -> [TypeRep] -> TypeRep
- mkFunTy, -- :: TypeRep -> TypeRep -> TypeRep
- applyTy, -- :: TypeRep -> TypeRep -> Maybe TypeRep
- popStarTy, -- :: TypeRep -> TypeRep -> TypeRep
-
- -- * Observation of type representations
- typerepTyCon, -- :: TypeRep -> TyCon
- typerepArgs, -- :: TypeRep -> [TypeRep]
- tyconString, -- :: TyCon -> String
-
- -- * The other Typeable classes
- Typeable1( typeOf1 ), -- :: t a -> TypeRep
- Typeable2( typeOf2 ), -- :: t a b -> TypeRep
- Typeable3( typeOf3 ), -- :: t a b c -> TypeRep
- Typeable4( typeOf4 ), -- :: t a b c d -> TypeRep
- Typeable5( typeOf5 ), -- :: t a b c d e -> TypeRep
- Typeable6( typeOf6 ), -- :: t a b c d e f -> TypeRep
- Typeable7( typeOf7 ), -- :: t a b c d e f g -> TypeRep
- gcast1, -- :: ... => c (t a) -> Maybe (c (t' a))
- gcast2 -- :: ... => c (t a b) -> Maybe (c (t' a b))
+ -- * The Typeable class
+ Typeable( typeOf ), -- :: a -> TypeRep
+
+ -- * Type-safe cast
+ cast, -- :: (Typeable a, Typeable b) => a -> Maybe b
+ gcast, -- a generalisation of cast
+
+ -- * Type representations
+ TypeRep, -- abstract, instance of: Eq, Show, Typeable
+ TyCon, -- abstract, instance of: Eq, Show, Typeable
+ showsTypeRep,
+
+ -- * Construction of type representations
+ mkTyCon, -- :: String -> TyCon
+ mkTyConApp, -- :: TyCon -> [TypeRep] -> TypeRep
+ mkAppTy, -- :: TypeRep -> TypeRep -> TypeRep
+ mkFunTy, -- :: TypeRep -> TypeRep -> TypeRep
+
+ -- * Observation of type representations
+ splitTyConApp, -- :: TypeRep -> (TyCon, [TypeRep])
+ funResultTy, -- :: TypeRep -> TypeRep -> Maybe TypeRep
+ typeRepTyCon, -- :: TypeRep -> TyCon
+ typeRepArgs, -- :: TypeRep -> [TypeRep]
+ tyConString, -- :: TyCon -> String
+ typeRepKey, -- :: TypeRep -> IO Int
+
+ -- * The other Typeable classes
+ -- | /Note:/ The general instances are provided for GHC only.
+ Typeable1( typeOf1 ), -- :: t a -> TypeRep
+ Typeable2( typeOf2 ), -- :: t a b -> TypeRep
+ Typeable3( typeOf3 ), -- :: t a b c -> TypeRep
+ Typeable4( typeOf4 ), -- :: t a b c d -> TypeRep
+ Typeable5( typeOf5 ), -- :: t a b c d e -> TypeRep
+ Typeable6( typeOf6 ), -- :: t a b c d e f -> TypeRep
+ Typeable7( typeOf7 ), -- :: t a b c d e f g -> TypeRep
+ gcast1, -- :: ... => c (t a) -> Maybe (c (t' a))
+ gcast2, -- :: ... => c (t a b) -> Maybe (c (t' a b))
+
+ -- * Default instances
+ -- | /Note:/ These are not needed by GHC, for which these instances
+ -- are generated by general instance declarations.
+ typeOfDefault, -- :: (Typeable1 t, Typeable a) => t a -> TypeRep
+ typeOf1Default, -- :: (Typeable2 t, Typeable a) => t a b -> TypeRep
+ typeOf2Default, -- :: (Typeable3 t, Typeable a) => t a b c -> TypeRep
+ typeOf3Default, -- :: (Typeable4 t, Typeable a) => t a b c d -> TypeRep
+ typeOf4Default, -- :: (Typeable5 t, Typeable a) => t a b c d e -> TypeRep
+ typeOf5Default, -- :: (Typeable6 t, Typeable a) => t a b c d e f -> TypeRep
+ typeOf6Default -- :: (Typeable7 t, Typeable a) => t a b c d e f g -> TypeRep