[commit: base] ghc-kinds: kind annotations for Typeable[1-7] (787b666)
José Pedro Magalhães
jpm at cs.uu.nl
Wed Oct 5 11:27:30 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : ghc-kinds
http://hackage.haskell.org/trac/ghc/changeset/787b6668c2b9114e1d8daefc88613e4d77ff8f0d
>---------------------------------------------------------------
commit 787b6668c2b9114e1d8daefc88613e4d77ff8f0d
Author: Julien Cretin <ghc at ia0.eu>
Date: Wed Sep 21 18:16:05 2011 +0200
kind annotations for Typeable[1-7]
>---------------------------------------------------------------
Data/Typeable/Internal.hs | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Data/Typeable/Internal.hs b/Data/Typeable/Internal.hs
index 70b468e..4c984a6 100644
--- a/Data/Typeable/Internal.hs
+++ b/Data/Typeable/Internal.hs
@@ -14,6 +14,7 @@
, NoImplicitPrelude
, OverlappingInstances
, ScopedTypeVariables
+ , KindSignatures
, FlexibleInstances
, MagicHash #-}
#ifdef __GLASGOW_HASKELL__
@@ -219,7 +220,7 @@ class Typeable a where
-- the argument.
-- | Variant for unary type constructors
-class Typeable1 t where
+class Typeable1 (t :: * -> *) where
typeOf1 :: t a -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -240,7 +241,7 @@ typeOfDefault x = typeOf1 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for binary type constructors
-class Typeable2 t where
+class Typeable2 (t :: * -> * -> *) where
typeOf2 :: t a b -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -261,7 +262,7 @@ typeOf1Default x = typeOf2 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for 3-ary type constructors
-class Typeable3 t where
+class Typeable3 (t :: * -> * -> * -> *) where
typeOf3 :: t a b c -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -282,7 +283,7 @@ typeOf2Default x = typeOf3 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for 4-ary type constructors
-class Typeable4 t where
+class Typeable4 (t :: * -> * -> * -> * -> *) where
typeOf4 :: t a b c d -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -303,7 +304,7 @@ typeOf3Default x = typeOf4 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for 5-ary type constructors
-class Typeable5 t where
+class Typeable5 (t :: * -> * -> * -> * -> * -> *) where
typeOf5 :: t a b c d e -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -324,7 +325,7 @@ typeOf4Default x = typeOf5 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for 6-ary type constructors
-class Typeable6 t where
+class Typeable6 (t :: * -> * -> * -> * -> * -> * -> *) where
typeOf6 :: t a b c d e f -> TypeRep
#ifdef __GLASGOW_HASKELL__
@@ -345,7 +346,7 @@ typeOf5Default x = typeOf6 x `mkAppTy` typeOf (argType x)
#endif
-- | Variant for 7-ary type constructors
-class Typeable7 t where
+class Typeable7 (t :: * -> * -> * -> * -> * -> * -> * -> *) where
typeOf7 :: t a b c d e f g -> TypeRep
#ifdef __GLASGOW_HASKELL__
More information about the Cvs-libraries
mailing list