Fix the pruning of dead case alternatives
authorsimonpj@microsoft.com <unknown>
Fri, 4 May 2007 11:06:50 +0000 (11:06 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 4 May 2007 11:06:50 +0000 (11:06 +0000)
commit19e7eb5734f11505cea7a3405eb8e8610bc80234
treef0bc319aa25c2774cdf87c951a727959141346a4
parentfc867aa70e3bc8753287cf1f5e9a5adb05c38dc6
Fix the pruning of dead case alternatives

This fixes Trac #1251; test case is gadt/CasePrune

GHC was being over-eager about pruning dead alternatives from case
expressions, and that led to a crash because the case expression
ended up with no alternatives at all!

See the long comments Note [Pruning dead case alternatives] in Unify.
compiler/simplCore/SimplUtils.lhs
compiler/types/Unify.lhs