macros for generic function types