throw in a few macroses to generate type-specific code