summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-warnings.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r--docs/users_guide/using-warnings.rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 7c288d3767..2c70006a7c 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -2057,10 +2057,13 @@ of ``-W(no-)*``.
:since: 8.4
- The option :ghc-flag:`-Wpartial-fields` warns about record fields that could
- fail when accessed via a lacking constructor. The function ``f`` below will
- fail when applied to ``Bar``, so the compiler will emit a warning at its
- definition when :ghc-flag:`-Wpartial-fields` is enabled.
+ The option :ghc-flag:`-Wpartial-fields` warns about a record field
+ `f` that is defined in some, but not all, the contructors of a
+ data type, because `f`'s record selector function may fail. For
+ exampe, the record selector function `f`, defined in the `Foo`
+ constructor record below, will fail when applied to ``Bar``, so
+ the compiler will emit a warning at its definition when
+ :ghc-flag:`-Wpartial-fields` is enabled.
The warning is suppressed if the field name begins with an underscore. ::