Can't figure out how to get function name as string in macro.
The code below should generate rlisten("multiply", multiply)
but it won't compile, playground.
import macros
proc rlisten*[A, B, R](fn: string, op: proc(a: A, b: B): R): void =
echo fn
macro remotefn(fn): void =
quote do:
rlisten($`fn`, `fn`) # It should generte `rlisten("multiply", multiply)`
proc multiply(a, b: int): int = discard
remotefn multiply