macro based type-inference example