Commit e55986a9 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Fix a substitution bug in cseCase

There was a missing substTy in cseCase!  Wow.  I'm surprised
it has not caused problems.  Anyway, easily fixed.
parent 8d401e50
......@@ -392,8 +392,9 @@ cseExpr env (Case e bndr ty alts) = cseCase env e bndr ty alts
cseCase :: CSEnv -> InExpr -> InId -> InType -> [InAlt] -> OutExpr
cseCase env scrut bndr ty alts
= Case scrut1 bndr3 ty (map cse_alt alts)
= Case scrut1 bndr3 ty' (map cse_alt alts)
where
ty' = substTy (csEnvSubst env) ty
scrut1 = tryForCSE False env scrut
bndr1 = zapIdOccInfo bndr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment