+-- | Variant for unary type constructors
+class Typeable1 t where
+ typeOf1 :: t a -> TypeRep
+
+
+-- | One Typeable instance for all Typeable1 instances
+instance (Typeable1 s, Typeable a)
+ => Typeable (s a) where
+ typeOf x = typeOf1 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x -> x
+ argType = undefined
+
+
+-- | Variant for binary type constructors
+class Typeable2 t where
+ typeOf2 :: t a b -> TypeRep
+
+
+-- | One Typeable1 instance for all Typeable2 instances
+instance (Typeable2 s, Typeable a)
+ => Typeable1 (s a) where
+ typeOf1 x = typeOf2 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y -> x
+ argType = undefined
+
+
+-- | Variant for 3-ary type constructors
+class Typeable3 t where
+ typeOf3 :: t a b c -> TypeRep
+
+
+-- | One Typeable2 instance for all Typeable3 instances
+instance (Typeable3 s, Typeable a)
+ => Typeable2 (s a) where
+ typeOf2 x = typeOf3 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y z -> x
+ argType = undefined
+
+
+-- | Variant for 4-ary type constructors
+class Typeable4 t where
+ typeOf4 :: t a b c d -> TypeRep
+
+
+-- | One Typeable3 instance for all Typeable4 instances
+instance (Typeable4 s, Typeable a)
+ => Typeable3 (s a) where
+ typeOf3 x = typeOf4 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y z z' -> x
+ argType = undefined
+
+
+-- | Variant for 5-ary type constructors
+class Typeable5 t where
+ typeOf5 :: t a b c d e -> TypeRep
+
+
+-- | One Typeable4 instance for all Typeable5 instances
+instance (Typeable5 s, Typeable a)
+ => Typeable4 (s a) where
+ typeOf4 x = typeOf5 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y z z' z'' -> x
+ argType = undefined
+
+
+-- | Variant for 6-ary type constructors
+class Typeable6 t where
+ typeOf6 :: t a b c d e f -> TypeRep
+
+
+-- | One Typeable5 instance for all Typeable6 instances
+instance (Typeable6 s, Typeable a)
+ => Typeable5 (s a) where
+ typeOf5 x = typeOf6 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y z z' z'' z''' -> x
+ argType = undefined
+
+
+-- | Variant for 7-ary type constructors
+class Typeable7 t where
+ typeOf7 :: t a b c d e f g -> TypeRep
+
+
+-- | One Typeable6 instance for all Typeable7 instances
+instance (Typeable7 s, Typeable a)
+ => Typeable6 (s a) where
+ typeOf6 x = typeOf7 x `popStarTy` typeOf (argType x)
+ where
+ argType :: t x y z z' z'' z''' z'''' -> x
+ argType = undefined
+
+
+