diff options
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r-- | docs/users_guide/using-warnings.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index 252b6a5383..198be8713e 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -52,6 +52,7 @@ To reverse ``-Werror``, which makes all warnings into errors, use ``-Wwarn``. * :ghc-flag:`-Winaccessible-code` * :ghc-flag:`-Wstar-binder` * :ghc-flag:`-Woperator-whitespace-ext-conflict` + * :ghc-flag:`-Wambiguous-fields` The following flags are simple ways to select standard "packages" of warnings: @@ -1946,6 +1947,25 @@ of ``-W(no-)*``. Since GHC 7.10, ``Typeable`` is automatically derived for all types. Thus, deriving ``Typeable`` yourself is redundant. +.. ghc-flag:: -Wambiguous-fields + :shortdesc: warn about ambiguous field selectors or updates + :type: dynamic + :category: + + :since: 9.2 + + When :extension:`DuplicateRecordFields` is enabled, the option + :ghc-flag:`-Wambiguous-fields` warns about occurrences of fields in + selectors or updates that depend on the deprecated mechanism for + type-directed disambiguation. This mechanism will be removed in a future + GHC release, at which point these occurrences will be rejected as ambiguous. + See the proposal `DuplicateRecordFields without ambiguous field access + <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst>`_ + and the documentation on :extension:`DuplicateRecordFields` for further details. + + This warning has no effect when :extension:`DuplicateRecordFields` is + disabled. + If you're feeling really paranoid, the :ghc-flag:`-dcore-lint` option is a good choice. It turns on heavyweight intra-pass sanity-checking within GHC. (It checks GHC's sanity, not yours.) |