The Julia JIT compiler compiles separate versions of generic functions for each unique function signature that gets called at the REPL. For example, if foo is defined as
foo(x, y) = (x * y) ^ 2
then calling foo(2, 3) and foo("a", "b") will compile two different versions of foo that correspond to the signatures foo(::Int, ::Int) and foo(::String, ::String), respectively. Is there a way to get a list of the different function signatures that have been compiled for a generic function?
I know about the methods function, but methods only lists the methods of a generic function that have been written by the programmer. And, of course, as the foo example above demonstrates, one method written by a programmer can spawn many separate compiled functions.
I'm just asking this for educational purposes. I don't have any code in which I plan to use the results of a hypothetical function that shows all the function signatures that have been compiled.