[GHC] #12957: In a record-update construct:ghc-stage2: panic! (the 'impossible' happened)
GHC
ghc-devs at haskell.org
Thu Feb 2 22:50:50 UTC 2017
#12957: In a record-update construct:ghc-stage2: panic! (the 'impossible' happened)
-------------------------------------+-------------------------------------
Reporter: niteria | Owner: mpickering
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3065,
Wiki Page: | Phab:D3064
-------------------------------------+-------------------------------------
Changes (by mpickering):
* differential: => Phab:D3065, Phab:D3064
Comment:
There was actually a bug in the PM checker which was causing this bug to
show up.
Here is a simpler reproduction. Essentially the checker was seeing that
`[]` was not consistent with `(_:_)` and thus for any nested pattern
matches the initial uncovered set was empty which caused all patterns to
be reported as redundant.
{{{
module T12957 where
data A = N | A { b :: Bool }
f = case [] of (_:_) -> case () of
a -> undefined
}}}
However, it was also good to add the case to `matchSeparator` as these
matches are printed when `-ddump-ec-trace` is used.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12957#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list