Re: #16411: Inconsistent -Wpartial-fields warnings with (~) vs. (~~)
"GHC" <[email protected]> Wed, 13 Mar 2019 23:43:59 -0000
| Newsgroups | gmane.comp.lang.haskell.glasgow.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============4555531038822985799==
Content-Type: multipart/related;
boundary="===============3760989011719310292=="
--===============3760989011719310292==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
#16411: Inconsistent -Wpartial-fields warnings with (~) vs. (~~)
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/520
-------------------------------------+-------------------------------------
Comment (by Marge Bot <ben+marge-bot@…>):
In [changeset:"36546a43e490ea6f989e6cad369d1a251c94a42b/ghc" 36546a4/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="36546a43e490ea6f989e6cad369d1a251c94a42b"
Fix #16411 by making dataConCannotMatch aware of (~~)
The `dataConCannotMatch` function (which powers the
`-Wpartial-fields` warning, among other things) had special reasoning
for explicit equality constraints of the form `a ~ b`, but it did
not extend that reasoning to `a ~~ b` constraints, leading to #16411.
Easily fixed.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16411#comment:2>