This bug was causing a Lint error on the stable branch. For some
reason it doesn't show up in HEAD, but it's still worth fixing.
The point is that ((f `cast` co) a) is cheap if f has arity>1.
This was being gratuitously missed before.
= go other_expr []
where
-- Accumulate value arguments, then decide
= go other_expr []
where
-- Accumulate value arguments, then decide
+ go (Cast e _) val_args = go e val_args
go (App f a) val_args | isRuntimeArg a = go f (a:val_args)
| otherwise = go f val_args
go (App f a) val_args | isRuntimeArg a = go f (a:val_args)
| otherwise = go f val_args