Implement poly-kinded Typeable
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Thu, 7 Feb 2013 13:51:19 +0000 (13:51 +0000)
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Tue, 12 Feb 2013 08:41:58 +0000 (08:41 +0000)
commitd99bca9c2007c67f7d9ea00bf35485d0276de869
tree3a17d70774b295cc90815cc6fdd8422b298597b5
parent0c806b207a198938748c69144b0b3b9d845b6f92
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.
Data/Data.hs
Data/OldTypeable.hs [new file with mode: 0644]
Data/OldTypeable.hs-boot [new file with mode: 0644]
Data/OldTypeable/Internal.hs [new file with mode: 0644]
Data/OldTypeable/Internal.hs-boot [new file with mode: 0644]
Data/Typeable.hs
Data/Typeable/Internal.hs
Data/Typeable/Internal.hs-boot
base.cabal
include/OldTypeable.h [new file with mode: 0644]
include/Typeable.h