Printer and parser for EnumAttr

I am about to introduce an EnumAttr in an upcoming revision and have a question regarding the default printer and parser. The following syntax worked for me:

%0 = linalg.matmul {cast = #linalg<"type_fn cast">} ...

Vector dialect has a CombiningKind attribute with a handwritten printer and parser. It uses the following slightly more elegant notation (which is of course a matter of taste…):


Is there a way to get a similar syntax, e.g.

%0 = linalg.matmul {cast = #linalg.type_fn<cast>} ...

without writing a custom parser or printer? Or is there even a strong reason against the vector kind syntax since it would conflict with some other construct?

@Mogball maybe?


EnumAttr is an AttrDef so you can give it an assemblyFormat: `<` $foo `>`

nice, thanks!