[GHC] #14773: MultiWayIf makes it easy to write partial programs that are not catched by -Wall
GHC
ghc-devs at haskell.org
Fri Mar 2 21:07:30 UTC 2018
#14773: MultiWayIf makes it easy to write partial programs that are not catched by
-Wall
-------------------------------------+-------------------------------------
Reporter: SimonHengel | Owner: sighingnow
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
| PatternMatchWarnings
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| T14773a,T14773b
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4400
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"e8e9f6a7a6d857efe6e3b2aec0c4964f9a8fa09a/ghc"
e8e9f6a7/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="e8e9f6a7a6d857efe6e3b2aec0c4964f9a8fa09a"
Improve exhaustive checking for guards in pattern bindings and MultiIf.
Previously we didn't do exhaustive checking on MultiIf expressions
and guards in pattern bindings.
We can construct the `LMatch` directly from GRHSs or [LHsExpr]
(MultiIf's alts) then feed it to checkMatches, without construct the
MatchGroup and using function `matchWrapper`.
Signed-off-by: HE, Tao <sighingnow at gmail.com>
Test Plan: make test TEST="T14773a T14773b"
Reviewers: bgamari, RyanGlScott, simonpj
Reviewed By: bgamari, simonpj
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14773
Differential Revision: https://phabricator.haskell.org/D4400
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14773#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list