summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Abel <andreas.abel@ifi.lmu.de>2022-01-26 19:26:46 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-27 18:34:54 -0500
commit7a8547432505dbf080b0f7b57c5e660f50810cf1 (patch)
tree5d8e901e910740aa728014eed756d3d8b461be92
parent8fd2ac25f2c85e1234c12eae9bd041620f76db41 (diff)
downloadhaskell-7a8547432505dbf080b0f7b57c5e660f50810cf1.tar.gz
Ctd. #18087: complete :since: info for all warnings in users guide
Some warnings have been there "forever" and I could not trace back the exact genesis, so I wrote "since at least 5.04". The flag `helpful-errors` could have been added in 7.2 already. I wrote 7.4 since I have no 7.2 available and it is not recognized by 7.0.
-rw-r--r--compiler/GHC/Driver/Flags.hs4
-rw-r--r--compiler/GHC/Driver/Session.hs1
-rw-r--r--docs/users_guide/exts/defer_type_errors.rst2
-rw-r--r--docs/users_guide/using-warnings.rst34
4 files changed, 39 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
index fa9c79b41d..ce68014d2d 100644
--- a/compiler/GHC/Driver/Flags.hs
+++ b/compiler/GHC/Driver/Flags.hs
@@ -278,8 +278,8 @@ data GeneralFlag
| Opt_LocalGhciHistory
| Opt_NoIt
| Opt_HelpfulErrors
- | Opt_DeferTypeErrors
- | Opt_DeferTypedHoles
+ | Opt_DeferTypeErrors -- Since 7.6
+ | Opt_DeferTypedHoles -- Since 7.10
| Opt_DeferOutOfScopeVariables
| Opt_PIC -- ^ @-fPIC@
| Opt_PIE -- ^ @-fPIE@
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 6fc71e878a..02b1a637ff 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -291,6 +291,7 @@ import qualified GHC.LanguageExtensions as LangExt
-- If you modify anything in this file please make sure that your changes are
-- described in the User's Guide. Please update the flag description in the
-- users guide (docs/users_guide) whenever you add or change a flag.
+-- Please make sure you add ":since:" information to new flags.
-- Note [Supporting CLI completion]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/users_guide/exts/defer_type_errors.rst b/docs/users_guide/exts/defer_type_errors.rst
index 8d502d3708..a2647fc9ef 100644
--- a/docs/users_guide/exts/defer_type_errors.rst
+++ b/docs/users_guide/exts/defer_type_errors.rst
@@ -3,6 +3,8 @@
Deferring type errors to runtime
================================
+Since GHC 7.6.1.
+
While developing, sometimes it is desirable to allow compilation to
succeed even if there are type errors in the code. Consider the
following case: ::
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 3da70bf3f2..7f72b3eb20 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -292,6 +292,8 @@ of ``-W(no-)*``.
:reverse: -Wno-prepositive-qualified-module
:category:
+ :since: 8.10
+
Normally, imports are qualified prepositively: ``import qualified M``.
By using :extension:`ImportQualifiedPost`, the qualified keyword can be used after the module name.
Like so: ``import M qualified``. This will warn when the first, prepositive syntax is used.
@@ -337,6 +339,8 @@ of ``-W(no-)*``.
:reverse: -fno-defer-type-errors
:category:
+ :since: 7.6
+
:implies: :ghc-flag:`-fdefer-typed-holes`, :ghc-flag:`-fdefer-out-of-scope-variables`
Defer as many type errors as possible until runtime. At compile time
@@ -354,6 +358,8 @@ of ``-W(no-)*``.
:reverse: -fno-defer-typed-holes
:category:
+ :since: 7.10
+
Defer typed holes errors (errors about names with a leading underscore
(e.g., “_”, “_foo”, “_bar”)) until runtime. This will turn the errors
produced by :ref:`typed holes <typed-holes>` into warnings. Using a value
@@ -389,6 +395,8 @@ of ``-W(no-)*``.
:reverse: -Wno-deferred-out-of-scope-variables
:category:
+ :since: 8.0
+
Warn when a deferred out-of-scope variable is encountered.
.. ghc-flag:: -Wpartial-type-signatures
@@ -416,6 +424,8 @@ of ``-W(no-)*``.
:reverse: -fno-helpful-errors
:category:
+ :since: 7.4
+
:default: on
When a name or package is not found in scope, make suggestions for
@@ -835,6 +845,8 @@ of ``-W(no-)*``.
:reverse: -Wno-duplicate-exports
:category:
+ :since: at least 5.04
+
:default: on
.. index::
@@ -853,6 +865,8 @@ of ``-W(no-)*``.
:reverse: -Wno-hi-shadowing
:category:
+ :since: at least 5.04, deprecated
+
.. index::
single: shadowing; interface files
@@ -995,6 +1009,8 @@ of ``-W(no-)*``.
:type: dynamic
:category:
+ :since: 8.10
+
:default: 30
The pattern match checker works by assigning symbolic values to each
@@ -1064,6 +1080,8 @@ of ``-W(no-)*``.
:reverse: -Wno-missing-fields
:category:
+ :since: at least 5.04
+
.. index::
single: missing fields, warning
single: fields, missing
@@ -1134,6 +1152,8 @@ of ``-W(no-)*``.
:reverse: -Wno-missing-methods
:category:
+ :since: at least 5.04
+
:default: on
.. index::
@@ -1154,6 +1174,8 @@ of ``-W(no-)*``.
:reverse: -Wno-missing-signatures
:category:
+ :since: at least 5.04
+
:default: off
.. index::
@@ -1304,6 +1326,8 @@ of ``-W(no-)*``.
:reverse: -Wno-name-shadowing
:category:
+ :since: at least 5.04
+
.. index::
single: shadowing, warning
@@ -1354,6 +1378,8 @@ of ``-W(no-)*``.
:reverse: -Wno-overlapping-patterns
:category:
+ :since: at least 5.04
+
.. index::
single: overlapping patterns, warning
single: patterns, overlapping
@@ -1534,6 +1560,8 @@ of ``-W(no-)*``.
:reverse: -Wno-type-defaults
:category:
+ :since: at least 5.04
+
:default: off
.. index::
@@ -1624,6 +1652,8 @@ of ``-W(no-)*``.
:reverse: -Wno-unused-binds
:category:
+ :since: at least 5.04
+
.. index::
single: unused binds, warning
single: binds, unused
@@ -1723,6 +1753,8 @@ of ``-W(no-)*``.
:reverse: -Wno-unused-imports
:category:
+ :since: at least 5.04
+
.. index::
single: unused imports, warning
single: imports, unused
@@ -1738,6 +1770,8 @@ of ``-W(no-)*``.
:reverse: -Wno-unused-matches
:category:
+ :since: at least 5.04
+
.. index::
single: unused matches, warning
single: matches, unused