I think the problem is, that the macro's implementation has to exist
on the macro class in macro context. So you could try to use
reflection to inject an implementation. Marc Weber recently showed a
trick to evaluate expressions with macro-in-macro, so you could
evaluate the expression that returns the implementation.
I vaguely remember talk of some plans to actually support this.
Alternatively you could use using macros or something like that.
Regards,
Juraj