Thank you, and was a temporary workaround in the DSL, but I guess it seems to be an ok solution for this. I thought about also adding or for an union of patterns, but I am not sure how useful would it be.
Honestly, I didn't really know they are already implemented, I looked up now and all I found was https://gist.github.com/Araq/169d1e24b2b996d024a780ef6a4e6c09#file-casestmtmacros-nim
gara's existing macro works exactly on the same input, I just have to change several lines to make it work with caseStmtMacro
The problem is: n is untyped`(or `typed, it doesn't matter, one can pass any possible expression to match in gara), so does this mean the macro would be invoked for every case usage? this would kinda break case
After some more irc discussion, I can summarize my worry as
It seems hard to combine having some "always available" dsl features [e.g. @ for captures, _, if guards etc] with the ability for an user to rewrite freely a branch: which makes reading of very hard, as you need to know if caseStmtMacros were enabled and if a match overload introduced/changed syntax
the last point is important: currently library's match defined a single DSL which is mostly consistent: extensions all use the same syntax of Name(elements)