+dmdAnal sigs dmd (Cast e co)
+ = (dmd_ty, Cast e' co)
+ where
+ (dmd_ty, e') = dmdAnal sigs dmd' e
+ to_co = snd (coercionKind co)
+ dmd'
+ | Just (tc, args) <- splitTyConApp_maybe to_co
+ , isRecursiveTyCon tc = evalDmd
+ | otherwise = dmd
+ -- This coerce usually arises from a recursive
+ -- newtype, and we don't want to look inside them
+ -- for exactly the same reason that we don't look
+ -- inside recursive products -- we might not reach
+ -- a fixpoint. So revert to a vanilla Eval demand
+