summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/CSE.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Opt/CSE.hs')
-rw-r--r--compiler/GHC/Core/Opt/CSE.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs
index 03e7a2e7d1..23baf90742 100644
--- a/compiler/GHC/Core/Opt/CSE.hs
+++ b/compiler/GHC/Core/Opt/CSE.hs
@@ -696,7 +696,7 @@ cseOneExpr e = cseExpr env e
where env = emptyCSEnv {cs_subst = mkEmptySubst (mkInScopeSet (exprFreeVars e)) }
cseExpr :: CSEnv -> InExpr -> OutExpr
-cseExpr env (Type t) = Type (substTy (csEnvSubst env) t)
+cseExpr env (Type t) = Type (substTyUnchecked (csEnvSubst env) t)
cseExpr env (Coercion c) = Coercion (substCo (csEnvSubst env) c)
cseExpr _ (Lit lit) = Lit lit
cseExpr env (Var v) = lookupSubst env v
@@ -714,7 +714,7 @@ cseCase env scrut bndr ty alts
= Case scrut1 bndr3 ty' $
combineAlts (map cse_alt alts)
where
- ty' = substTy (csEnvSubst env) ty
+ ty' = substTyUnchecked (csEnvSubst env) ty
(cse_done, scrut1) = try_for_cse env scrut
bndr1 = zapIdOccInfo bndr