Improve liberate-case to take account of coercions
Note [Scrutinee with cast] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: f = \ t -> case (v `cast` co) of V a b -> a : f t Exactly the same optimistaion (unrolling one call to f) will work here, despite the cast. See mk_alt_env in the Case branch of libCase. This patch does the job. For a change, it was really easy.
Please register or sign in to comment