summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/ghci
diff options
context:
space:
mode:
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2013-02-07 13:59:51 +0000
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2013-02-12 08:44:07 +0000
commit94d8b995aeca1b2fcee9467a0f2bdf0d9dc64069 (patch)
tree38d7b675254bbb238d0d7478b5b7b2cfb610b898 /testsuite/tests/safeHaskell/ghci
parentdc30d9834829a5e68abef5ee9b8b628f68f0b871 (diff)
downloadhaskell-94d8b995aeca1b2fcee9467a0f2bdf0d9dc64069.tar.gz
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.
Diffstat (limited to 'testsuite/tests/safeHaskell/ghci')
-rw-r--r--testsuite/tests/safeHaskell/ghci/p15.script2
-rw-r--r--testsuite/tests/safeHaskell/ghci/p15.stderr8
2 files changed, 9 insertions, 1 deletions
diff --git a/testsuite/tests/safeHaskell/ghci/p15.script b/testsuite/tests/safeHaskell/ghci/p15.script
index 3faeec9df9..81f2033ea6 100644
--- a/testsuite/tests/safeHaskell/ghci/p15.script
+++ b/testsuite/tests/safeHaskell/ghci/p15.script
@@ -4,7 +4,7 @@
:set -XDeriveDataTypeable
:set -XStandaloneDeriving
-:m + Data.Typeable
+:m + Data.OldTypeable
data H = H {h :: String} deriving (Typeable, Show)
diff --git a/testsuite/tests/safeHaskell/ghci/p15.stderr b/testsuite/tests/safeHaskell/ghci/p15.stderr
index bc1069c87f..f50d460ed8 100644
--- a/testsuite/tests/safeHaskell/ghci/p15.stderr
+++ b/testsuite/tests/safeHaskell/ghci/p15.stderr
@@ -1,4 +1,12 @@
+Top level: Warning:
+ Module `Data.OldTypeable' is deprecated: Use Data.Typeable instead
+
+<interactive>:10:36: Warning:
+ In the use of type constructor or class `Typeable'
+ (imported from Data.OldTypeable, but defined in Data.OldTypeable.Internal):
+ Deprecated: "Use Data.Typeable.Internal instead"
+
<interactive>:14:10:
Can't create hand written instances of Typeable in Safe Haskell! Can only derive them