X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fspecialise%2FSpecialise.lhs;h=fa9d2536215aa4709924276af4466987facace42;hb=4d10902274c8a4f6c0a2f7bab069f0ebc49db1dd;hp=3646f916534fc9a95d95dc20abc3c4a5e65b6e94;hpb=8d227e35da15330084dccbd67069d0804adccf4c;p=ghc-hetmet.git diff --git a/compiler/specialise/Specialise.lhs b/compiler/specialise/Specialise.lhs index 3646f91..fa9d253 100644 --- a/compiler/specialise/Specialise.lhs +++ b/compiler/specialise/Specialise.lhs @@ -624,7 +624,9 @@ specExpr :: Subst -> CoreExpr -> SpecM (CoreExpr, UsageDetails) specExpr subst (Type ty) = returnSM (Type (substTy subst ty), emptyUDs) specExpr subst (Var v) = returnSM (specVar subst v, emptyUDs) specExpr subst (Lit lit) = returnSM (Lit lit, emptyUDs) - +specExpr subst (Cast e co) = + specExpr subst e `thenSM` \ (e', uds) -> + returnSM ((Cast e' (substTy subst co)), uds) specExpr subst (Note note body) = specExpr subst body `thenSM` \ (body', uds) -> returnSM (Note (specNote subst note) body', uds) @@ -688,7 +690,6 @@ specExpr subst (Let bind body) returnSM (foldr Let body' binds', uds) -- Must apply the type substitution to coerceions -specNote subst (Coerce t1 t2) = Coerce (substTy subst t1) (substTy subst t2) specNote subst note = note \end{code}