+argToPat in_scope con_env (Let _ arg) arg_occ
+ = argToPat in_scope con_env arg arg_occ
+ -- Look through let expressions
+ -- e.g. f (let v = rhs in \y -> ...v...)
+ -- Here we can specialise for f (\y -> ...)
+ -- because the rule-matcher will look through the let.
+
+argToPat in_scope con_env (Cast arg co) arg_occ
+ = do { (interesting, arg') <- argToPat in_scope con_env arg arg_occ
+ ; if interesting then
+ return (interesting, Cast arg' co)
+ else
+ wildCardPat (snd (coercionKind co)) }
+