[commit: ghc] ghc-8.0: rel-notes: Group together warning-related items, add (91222fc)
git at git.haskell.org
git at git.haskell.org
Tue May 10 13:05:17 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/91222fc3ccce791637267f3aa26f30180c54f35e/ghc
>---------------------------------------------------------------
commit 91222fc3ccce791637267f3aa26f30180c54f35e
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sat May 7 10:55:31 2016 +0200
rel-notes: Group together warning-related items, add
Mention -fshow-warning-groups, etc.
>---------------------------------------------------------------
91222fc3ccce791637267f3aa26f30180c54f35e
docs/users_guide/8.0.1-notes.rst | 105 +++++++++++++++++++++------------------
1 file changed, 57 insertions(+), 48 deletions(-)
diff --git a/docs/users_guide/8.0.1-notes.rst b/docs/users_guide/8.0.1-notes.rst
index 5fdb328..b2131ec 100644
--- a/docs/users_guide/8.0.1-notes.rst
+++ b/docs/users_guide/8.0.1-notes.rst
@@ -262,13 +262,6 @@ Compiler
code that does not exist in the .hs file and a comment for the splice
location in the original file.
-- After a long hiatus (see :ghc-ticket:`10935`) the
- :ghc-flag:`-Wmonomorphism-restriction` (formerly
- :ghc-flag:`-fwarn-monomorphism-restriction`) flag has returned.
- The functionality of this flag was inadvertently removed by a commit in 2010;
- this has been fixed and the flag should now issue warnings as it
- previously did.
-
- Added the option :ghc-flag:`-fprint-expanded-types`. When enabled, GHC also
prints type-synonym-expanded types in type errors.
@@ -283,21 +276,47 @@ Compiler
Enabling :ghc-flag:`-fworker-wrapper` while strictness analysis is disabled (by
:ghc-flag:`-fno-strictness`) has no effect.
-- Added the options :ghc-flag:`-Wmissed-specialisations` and
- :ghc-flag:`-Wall-missed-specialisations`. When enabled, the simplifier will
- produce a warning when a overloaded imported function cannot be
- specialised (typically due to a missing ``INLINEABLE`` pragma). This
- is intended to alert users to cases where they apply ``INLINEABLE`` but
- may not get the speed-up they expect.
+- :ghc-flag:`-ddump-strsigs` has been renamed to
+ :ghc-flag:`-ddump-str-signatures`.
-- Added the option :ghc-flag:`-Wnoncanonical-monad-instances` and
- :ghc-flag:`-Wnoncanonical-monadfail-instances` which help detect noncanonical
- ``Applicative``/``Monad``/``MonadFail`` instance definitions.
- See flag description in :ref:`options-sanity` for more details.
+- :ghc-flag:`-XDeriveGeneric` is now less picky about instantiating type
+ arguments when deriving (:ghc-ticket:`11732`). As a consequence, the
+ following code is now legal (whereas before it would have been rejected). ::
+
+ data T a b = T a b
+ deriving instance Generic (T Int b)
+
+- Added the :ghc-flag:`-fmax-pmcheck-iterations` to control how many times
+ the pattern match checker iterates. Since coverage checking is exponential
+ in the general case, setting a default number of iterations prevents memory
+ and performance blowups. By default, the number of iterations is set to
+ 2000000 but it can be set with: ``-fmax-pmcheck-iterations=<n>``.
+ If the set number of iterations is exceeded, an informative warning is
+ issued.
+
+- :ghc-flag:`-this-package-key` has been renamed again (hopefully for the last time!)
+ to :ghc-flag:`-this-unit-id`. The renaming was motivated by the fact that
+ the identifier you pass to GHC here doesn't have much to do with packages:
+ you may provide different unit IDs for libraries which are in the same
+ package. :ghc-flag:`-this-package-key` is deprecated; you should use
+ :ghc-flag:`-this-unit-id` or, if you need compatibility over multiple
+ versions of GHC, :ghc-flag:`-package-name`.
+
+- When :ghc-flag:`-fdefer-type-errors` is enabled and an expression fails to
+ typecheck, ``Control.Exception.TypeError`` will now be thrown instead of
+ ``Control.Exception.ErrorCall``.
+
+Warnings
+^^^^^^^^
- When printing an out-of-scope error message, GHC will give helpful advice if
the error might be caused by too restrictive imports.
+- Warning messages now mention the name of the warning flag which the message is
+ controlled by (:ghc-ticket:`10752`) If the flag was implied via a warning
+ group then the name of the group will also be shown if
+ :ghc-flag:`-fshow-warning-groups` is used.
+
- Added the :ghc-flag:`-Weverything` warning group, along with its opposite
:ghc-flag:`-Wno-everything`. This group includes all warnings supported by
GHC. This is in contrast to `-Wall` which excludes some stylistic or
@@ -308,7 +327,7 @@ Compiler
which ``ghc`` enables by default (e.g. when no additional ``-W`` flags are
used).
-- Added the :ghc-flag:`-Wcompat` warning group, along with its opposite
+- Added the :ghc-flag:`-Wcompat` warning group (:ghc-ticket:`11000`), along with its opposite
:ghc-flag:`-Wno-compat`. Turns on warnings that will be enabled by default in the
future, but remain off in normal compilations for the time being. This
allows library authors eager to make their code future compatible to adapt
@@ -326,6 +345,26 @@ Compiler
warnings makes sure the definition of ``Semigroup`` as a superclass of
``Monoid`` does not break any code.
+- After a long hiatus (see :ghc-ticket:`10935`) the
+ :ghc-flag:`-Wmonomorphism-restriction` (formerly
+ :ghc-flag:`-fwarn-monomorphism-restriction`) flag has returned.
+ The functionality of this flag was inadvertently removed by a commit in 2010;
+ this has been fixed and the flag should now issue warnings as it
+ previously did.
+
+- Added the options :ghc-flag:`-Wmissed-specialisations` and
+ :ghc-flag:`-Wall-missed-specialisations`. When enabled, the simplifier will
+ produce a warning when a overloaded imported function cannot be
+ specialised (typically due to a missing ``INLINEABLE`` pragma). This
+ is intended to alert users to cases where they apply ``INLINEABLE`` but
+ may not get the speed-up they expect.
+
+- Added the option :ghc-flag:`-Wnoncanonical-monad-instances` and
+ :ghc-flag:`-Wnoncanonical-monadfail-instances` which help detect noncanonical
+ ``Applicative``/``Monad``/``MonadFail`` instance definitions.
+ See flag description in :ref:`options-sanity` for more details.
+
+
- Added the :ghc-flag:`-Wmissing-pattern-synonym-signatures`
flag. When enabled, this will issue a warning when a pattern
synonym definition doesn't have a type signature. It is turned off
@@ -346,42 +385,12 @@ Compiler
warns in the case of unused term-level patterns. Both flags are implied by
:ghc-flag:`-W`.
-- Added the :ghc-flag:`-fmax-pmcheck-iterations` to control how many times
- the pattern match checker iterates. Since coverage checking is exponential
- in the general case, setting a default number of iterations prevents memory
- and performance blowups. By default, the number of iterations is set to
- 2000000 but it can be set with: ``-fmax-pmcheck-iterations=<n>``.
- If the set number of iterations is exceeded, an informative warning is
- issued.
-
-- :ghc-flag:`-this-package-key` has been renamed again (hopefully for the last time!)
- to :ghc-flag:`-this-unit-id`. The renaming was motivated by the fact that
- the identifier you pass to GHC here doesn't have much to do with packages:
- you may provide different unit IDs for libraries which are in the same
- package. :ghc-flag:`-this-package-key` is deprecated; you should use
- :ghc-flag:`-this-unit-id` or, if you need compatibility over multiple
- versions of GHC, :ghc-flag:`-package-name`.
-
-- When :ghc-flag:`-fdefer-type-errors` is enabled and an expression fails to
- typecheck, ``Control.Exception.TypeError`` will now be thrown instead of
- ``Control.Exception.ErrorCall``.
-
- :ghc-flag:`-Wmissing-local-sigs` is now deprecated in favor of
:ghc-flag:`-Wmissing-local-signatures`.
- :ghc-flag:`-Wmissing-exported-sigs` is now deprecated in favor of
:ghc-flag:`-Wmissing-exported-signatures`.
-- :ghc-flag:`-ddump-strsigs` has been renamed to
- :ghc-flag:`-ddump-str-signatures`.
-
-- :ghc-flag:`-XDeriveGeneric` is now less picky about instantiating type
- arguments when deriving (:ghc-ticket:`11732`). As a consequence, the
- following code is now legal (whereas before it would have been rejected). ::
-
- data T a b = T a b
- deriving instance Generic (T Int b)
-
GHCi
~~~~
More information about the ghc-commits
mailing list