Store parameters in function types

Need this so that parameters are properly propagated into definitions
where necessary, and not propagated otherwise.