summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-16 16:32:08 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-08 05:11:40 -0400
commit8af9eba88c84c21a8753ecb5135050d2ac9f0a2b (patch)
tree1217d94560d622a21198f9be1c9d185d2c930451
parent98179a777ecff3dc46ce556a090abb3a032ab711 (diff)
downloadhaskell-8af9eba88c84c21a8753ecb5135050d2ac9f0a2b.tar.gz
base: Document the fact that Typeable is automatically "derived"
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