[commit: ghc] master: Add missing -Wdeprecations flag to the users guide (986deaa)
git at git.haskell.org
git at git.haskell.org
Mon Jun 19 14:59:36 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/986deaa5539552f84b4f1d1872ae8a4c8240097e/ghc
>---------------------------------------------------------------
commit 986deaa5539552f84b4f1d1872ae8a4c8240097e
Author: erdeszt <erdeszt at gmail.com>
Date: Sat Jun 17 13:47:10 2017 +0200
Add missing -Wdeprecations flag to the users guide
>---------------------------------------------------------------
986deaa5539552f84b4f1d1872ae8a4c8240097e
docs/users_guide/using-warnings.rst | 13 +++++++++++++
utils/mkUserGuidePart/Options/Warnings.hs | 7 +++++++
2 files changed, 20 insertions(+)
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 9bc1c35..9f10efb 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -17,6 +17,7 @@ generally likely to indicate bugs in your program. These are:
* :ghc-flag:`-Woverlapping-patterns`
* :ghc-flag:`-Wwarnings-deprecations`
+ * :ghc-flag:`-Wdeprecations`
* :ghc-flag:`-Wdeprecated-flags`
* :ghc-flag:`-Wunrecognised-pragmas`
* :ghc-flag:`-Wduplicate-constraints`
@@ -246,6 +247,18 @@ of ``-W(no-)*``.
This option is on by default.
+.. ghc-flag:: -Wdeprecations
+
+ .. index::
+ single: deprecations
+
+ Causes a warning to be emitted when a module, function or type with
+ a ``WARNING`` or ``DEPRECATED pragma`` is used. See
+ :ref:`warning-deprecated-pragma` for more details on the pragmas.
+ An alias for :ghc-flag:`-Wwarnings-deprecations`.
+
+ This option is on by default.
+
.. ghc-flag:: -Wamp
.. index::
diff --git a/utils/mkUserGuidePart/Options/Warnings.hs b/utils/mkUserGuidePart/Options/Warnings.hs
index 48ee32c..620c731 100644
--- a/utils/mkUserGuidePart/Options/Warnings.hs
+++ b/utils/mkUserGuidePart/Options/Warnings.hs
@@ -401,6 +401,13 @@ warningsOptions =
, flagType = DynamicFlag
, flagReverse = "-Wno-warnings-deprecations"
}
+ , flag { flagName = "-Wdeprecations"
+ , flagDescription =
+ "warn about uses of functions & types that have warnings or "++
+ "deprecated pragmas. Alias for :ghc-flag:`-Wwarnings-deprecations`"
+ , flagType = DynamicFlag
+ , flagReverse = "-Wno-deprecations"
+ }
, flag { flagName = "-Wamp"
, flagDescription =
"*(deprecated)* warn on definitions conflicting with the "++
More information about the ghc-commits
mailing list