Add a convenience for destructuring and unboxing function types.
Typecheck application.