[commit: containers] master: Implement poly-kinded Typeable (a172709)

José Pedro Magalhães jpm at cs.uu.nl
Tue Feb 12 11:40:19 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a172709589717865aa2fab5f683839b0aadecb4c

>---------------------------------------------------------------

commit a172709589717865aa2fab5f683839b0aadecb4c
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date:   Thu Feb 7 14:00:21 2013 +0000

    Implement poly-kinded Typeable
    
    This patch makes the Data.Typeable.Typeable class work with arguments of any
    kind. In particular, this removes the Typeable1..7 class hierarchy, greatly
    simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable
    language extension, which will automatically derive Typeable for all types and
    classes declared in that module. Since there is now no good reason to give
    handwritten instances of the Typeable class, those are ignored (for backwards
    compatibility), and a warning is emitted.
    
    The old, kind-* Typeable class is now called OldTypeable, and lives in the
    Data.OldTypeable module. It is deprecated, and should be removed in some future
    version of GHC.

>---------------------------------------------------------------

 include/Typeable.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/Typeable.h b/include/Typeable.h
index d21804c..1f198ef 100644
--- a/include/Typeable.h
+++ b/include/Typeable.h
@@ -20,9 +20,9 @@
 --  // generate the instances.
 
 #define INSTANCE_TYPEABLE0(tycon,tcname,str) deriving instance Typeable tycon
-#define INSTANCE_TYPEABLE1(tycon,tcname,str) deriving instance Typeable1 tycon
-#define INSTANCE_TYPEABLE2(tycon,tcname,str) deriving instance Typeable2 tycon
-#define INSTANCE_TYPEABLE3(tycon,tcname,str) deriving instance Typeable3 tycon
+#define INSTANCE_TYPEABLE1(tycon,tcname,str) deriving instance Typeable tycon
+#define INSTANCE_TYPEABLE2(tycon,tcname,str) deriving instance Typeable tycon
+#define INSTANCE_TYPEABLE3(tycon,tcname,str) deriving instance Typeable tycon
 
 #else /* !__GLASGOW_HASKELL__ */
 





More information about the ghc-commits mailing list