Implemented generic types using macros