summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/8.8.1-notes.rst4
-rw-r--r--docs/users_guide/extending_ghc.rst1
-rw-r--r--docs/users_guide/using-warnings.rst21
3 files changed, 26 insertions, 0 deletions
diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst
index 69d539748d..cd4c00d1a4 100644
--- a/docs/users_guide/8.8.1-notes.rst
+++ b/docs/users_guide/8.8.1-notes.rst
@@ -84,6 +84,10 @@ Compiler
- The deprecated ghc-flag ``-Wamp`` has been removed.
+- Add new :ghc-flag:`-Wmissing-deriving-strategies` flag that warns users when they are not
+ taking advantage of :extension:`DerivingStrategies`. The warning is supplied at each
+ ``deriving`` site.
+
Runtime system
~~~~~~~~~~~~~~
diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst
index a913684a15..02847c9b86 100644
--- a/docs/users_guide/extending_ghc.rst
+++ b/docs/users_guide/extending_ghc.rst
@@ -851,6 +851,7 @@ In general, the ``pluginRecompile`` field has the following type::
The ``PluginRecompile`` data type is an enumeration determining how the plugin
should affect recompilation. ::
+
data PluginRecompile = ForceRecompile | NoForceRecompile | MaybeRecompile Fingerprint
A plugin which declares itself impure using ``ForceRecompile`` will always
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 6a6166bf0d..03ca184531 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -904,6 +904,27 @@ of ``-W(no-)*``.
This option isn't enabled by default because it can be very noisy,
and it often doesn't indicate a bug in the program.
+.. ghc-flag:: -Wmissing-deriving-strategies
+ :shortdesc: warn when a deriving clause is missing a deriving strategy
+ :type: dynamic
+ :reverse: -Wno-missing-deriving-strategies
+ :category:
+
+ :since: 8.8.1
+
+ The datatype below derives the ``Eq`` typeclass, but doesn't specify a
+ strategy. When :ghc-flag:`-Wmissing-deriving-strategies` is enabled,
+ the compiler will emit a warning about this. ::
+
+ data Foo a = Foo a
+ deriving (Eq)
+
+ The compiler will warn here that the deriving clause doesn't specify a
+ strategy. If the warning is enabled, but :extension:`DerivingStrategies` is
+ not enabled, the compiler will suggest turning on the
+ :extension:`DerivingStrategies` extension. This option is not on by default,
+ having to be turned on manually or with :ghc-flag:`-Weverything`.
+
.. ghc-flag:: -Wmissing-fields
:shortdesc: warn when fields of a record are uninitialised
:type: dynamic