- ; return [(con, args, munge_rhs rhs) | (con, args, rhs) <- inner_alts] }
+ ; return [(con, args, munge_rhs rhs) | (con, args, rhs) <- inner_alts,
+ not (con `elem` imposs_cons) ]
+ -- NB: filter out any imposs_cons. Example:
+ -- case x of
+ -- A -> e1
+ -- DEFAULT -> case x of
+ -- A -> e2
+ -- B -> e3
+ -- When we merge, we must ensure that e1 takes
+ -- precedence over e2 as the value for A!
+ }