summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-warnings.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r--docs/users_guide/using-warnings.rst21
1 files changed, 21 insertions, 0 deletions
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