Implement poly-kinded Typeable
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Thu, 7 Feb 2013 13:59:51 +0000 (13:59 +0000)
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>
Tue, 12 Feb 2013 08:44:07 +0000 (08:44 +0000)
commit94d8b995aeca1b2fcee9467a0f2bdf0d9dc64069
tree38d7b675254bbb238d0d7478b5b7b2cfb610b898
parentdc30d9834829a5e68abef5ee9b8b628f68f0b871
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.
26 files changed:
testsuite/tests/annotations/should_fail/annfail06.hs
testsuite/tests/deriving/should_compile/T2378.hs
testsuite/tests/deriving/should_compile/T3965.hs
testsuite/tests/deriving/should_compile/T4302.hs
testsuite/tests/deriving/should_compile/all.T
testsuite/tests/deriving/should_compile/drv021.hs
testsuite/tests/deriving/should_compile/drv021.stderr [new file with mode: 0644]
testsuite/tests/deriving/should_compile/drv022.hs [moved from testsuite/tests/deriving/should_fail/drvfail010.hs with 70% similarity]
testsuite/tests/deriving/should_fail/T2604.stderr
testsuite/tests/deriving/should_fail/all.T
testsuite/tests/deriving/should_fail/drvfail010.stderr [deleted file]
testsuite/tests/deriving/should_fail/drvfail010.stderr-hugs [deleted file]
testsuite/tests/deriving/should_fail/drvfail014.hs
testsuite/tests/driver/T4437.hs
testsuite/tests/indexed-types/should_compile/T1769.hs
testsuite/tests/perf/should_run/T3245.hs
testsuite/tests/rename/should_compile/T4003A.hs-boot
testsuite/tests/safeHaskell/ghci/p15.script
testsuite/tests/safeHaskell/ghci/p15.stderr
testsuite/tests/safeHaskell/safeInfered/UnsafeInfered07.stderr
testsuite/tests/safeHaskell/safeInfered/UnsafeInfered07_A.hs
testsuite/tests/safeHaskell/safeLanguage/SafeLang13.hs
testsuite/tests/safeHaskell/safeLanguage/SafeLang14.hs
testsuite/tests/safeHaskell/unsafeLibs/BadImport02.hs
testsuite/tests/safeHaskell/unsafeLibs/BadImport03.hs
testsuite/tests/typecheck/should_compile/T2433.hs