Yes, I’m not the brightest candle on the cake, so I made similar errors.
The next rule in question is
type_params ::= (variadic_type_pack | generic_type_pack | type_pack | type) (',' type_params)?
It parses generic parameters inside the types. The type that gives the error is
return something :: T<(string) -> string>