X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fspecialise%2FSpecConstr.lhs;fp=compiler%2Fspecialise%2FSpecConstr.lhs;h=0b61a57c0d1fb45cd246ebea5240534d00ebb61f;hp=cbe1c0b76aa47f3eda59ba84ce570bbc70c3c034;hb=45a61df30f95b22d4818b6e3e3622707911bde03;hpb=8d022fe21d265d3ab982ae2826d9d9e1438c3b68 diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index cbe1c0b..0b61a57 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -1549,6 +1549,9 @@ argToPat env in_scope val_env (Case scrut _ _ [(_, _, rhs)]) arg_occ -} argToPat env in_scope val_env (Cast arg co) arg_occ + | isIdentityCoercion co -- Substitution in the SpecConstr itself + -- can lead to identity coercions + = argToPat env in_scope val_env arg arg_occ | not (ignoreType env ty2) = do { (interesting, arg') <- argToPat env in_scope val_env arg arg_occ ; if not interesting then