rather than having to do a manual switch over some Tag, and map to strings, it would be nice if there was builtin that did this. this could possibly make printing error messages a lot easier. zig's @tagName has made me want this feature.
i know it only works for enums and tagged unions (not for extern unions or untagged unions) in zig.
not sure if roc has any of these considerations and whether the compiler could easily output the tags as strings.
We've talked about abilities similar to Display/Debug in Roc that would automatically print a string representation of a type, that would serve this purpose well.
Last updated: Jun 16 2026 at 16:19 UTC