Add support for generic types