[Git][ghc/ghc][master] Clarify where `f` is defined

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Jan 24 17:11:08 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
05e6a2d9 by Tom Ellis at 2023-01-24T12:10:52-05:00
Clarify where `f` is defined

- - - - -


1 changed file:

- docs/users_guide/using-warnings.rst


Changes:

=====================================
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. ::
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05e6a2d939f5f9d468122a6fd9e9514668f3fc20

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05e6a2d939f5f9d468122a6fd9e9514668f3fc20
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230124/a921de4d/attachment-0001.html>


More information about the ghc-commits mailing list