summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-16 16:32:08 -0400
committerBen Gamari <ben@well-typed.com>2019-10-06 23:35:21 -0400
commit2736e8182eeeac592211103916fa9bdc1a416624 (patch)
tree5b63eceaef76f7c682f582fdf69a518fc3f438e0
parent241921a0c238a047326b0c0f599f1c24222ff66c (diff)
downloadhaskell-wip/T17060.tar.gz
base: Document the fact that Typeable is automatically "derived"wip/T17060
This fixes #17060.
-rw-r--r--docs/users_guide/glasgow_exts.rst2
-rw-r--r--libraries/base/Data/Typeable.hs4
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index de0aabbbbb..60f708284a 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -4603,7 +4603,7 @@ The class ``Typeable`` is very special:
:extension:`DeriveDataTypeable` extension is enabled, but they are ignored,
and they may be reported as an error in a later version of the compiler.
-- The rules for solving \`Typeable\` constraints are as follows:
+- The rules for solving ``Typeable`` constraints are as follows:
- A concrete type constructor applied to some types. ::
diff --git a/libraries/base/Data/Typeable.hs b/libraries/base/Data/Typeable.hs
index ba0650c8f2..2b4d63b271 100644
--- a/libraries/base/Data/Typeable.hs
+++ b/libraries/base/Data/Typeable.hs
@@ -33,6 +33,10 @@
-- index, providing an interface very similar to the "Typeable" notion seen in
-- previous releases. For the type-indexed interface, see "Type.Reflection".
--
+-- Since GHC 7.10, all types automatically have 'Typeable' instances derived.
+-- This is in contrast to previous releases where 'Typeable' had to be
+-- explicitly derived using the @DeriveDataTypeable@ language extension.
+--
-- Since GHC 7.8, 'Typeable' is poly-kinded. The changes required for this might
-- break some old programs involving 'Typeable'. More details on this, including
-- how to fix your code, can be found on the