macroize some boilerplate in reprs.c