Typecheck (lambda args body) as (arg1 -> result).
Use information of application site, to reduce possible arities.

Closes PR12905.