case package:ghc-lib-parser
Match the scrutinee of a case and potentially return a new scrutinee
and a function to apply to each literal alternative.
Case rules
It's important that occurrence info are present, hence the use of In*
types.
The x in case scrut of x { (y,z) -> ... }
The y,z in case scrut of x { (y,z) -> ... }
Patterns and guards in a case alternative
Returns the list of non-default branches of the SwitchTargets value
A generalization of
mkBigTupleSelector, allowing the body of
the case to be an arbitrary expression.
To avoid shadowing, we use uniques to invent new variables.
If necessary we pattern match on a "big" tuple.
Make a case expression whose case binder is unused The alts and res_ty
should not have any occurrences of WildId