[commit: ghc] ghc-8.2: Add missing -Wdeprecations flag to the users guide (9057c25)

git at git.haskell.org git at git.haskell.org
Fri Jun 23 18:51:54 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/9057c250e3030a25a6ac3d736a7657ae78889897/ghc

>---------------------------------------------------------------

commit 9057c250e3030a25a6ac3d736a7657ae78889897
Author: erdeszt <erdeszt at gmail.com>
Date:   Sat Jun 17 13:47:10 2017 +0200

    Add missing -Wdeprecations flag to the users guide
    
    (cherry picked from commit 986deaa5539552f84b4f1d1872ae8a4c8240097e)


>---------------------------------------------------------------

9057c250e3030a25a6ac3d736a7657ae78889897
 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 ed2b12b..67c7ae4 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