Sum types with type parameters