summaryrefslogtreecommitdiff
path: root/docs/users_guide
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2017-02-07 00:16:55 -0500
committerDavid Feuer <David.Feuer@gmail.com>2017-02-07 00:16:56 -0500
commit2219c8cd612ec7920a3bd1661b3c663575737267 (patch)
tree43c944b3fd09c9719a27f871abba1a6ece01e16b /docs/users_guide
parenta28a55211d6fb8d3182b0a9e47656ff9ca8a3766 (diff)
downloadhaskell-2219c8cd612ec7920a3bd1661b3c663575737267.tar.gz
Derive <$
Using the default definition of `<$` for derived `Functor` instance is very bad for recursive data types. Derive the definition instead. Fixes #13218 Reviewers: austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D3072
Diffstat (limited to 'docs/users_guide')
-rw-r--r--docs/users_guide/8.2.1-notes.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst
index 36ed2b90d8..a01ad1a9d5 100644
--- a/docs/users_guide/8.2.1-notes.rst
+++ b/docs/users_guide/8.2.1-notes.rst
@@ -138,6 +138,11 @@ Compiler
-- uses of `Monoid MyMonoid` here are improved
bar :: MonadWriter MyMonoid m => ...
+- GHC now derives the definition of ``<$`` when using ``DeriveFunctor``
+ rather than using the default definition. This prevents unnecessary
+ allocation and a potential space leak when deriving ``Functor`` for
+ a recursive type.
+
GHCi
~~~~