In Nim is there a way to get a list of the declarations of all procedures with a given name which are defined at a given point in the code? For example I am looking for a function TYPE where following code
proc Sum(self: seq[int]):int =
do something
echo $TYPE(Sum)
proc Sum(self: seq[float]):float =
do something
echo $TYPE(Sum)
would print
@[proc Sum(self: seq[int]):int]
@[proc Sum(self: seq[int]):int, proc Sum(self: seq[float]):float]
Given a symbol you can do it with a macro and
getImpl, you just need to make sure to iterate over all the sym choices: