If I understand correctly what you want, then have a look at Traits.jl where I check method signatures of trait-definitions against methods of a generic function. See the loop at: https://github.com/mauro3/Traits.jl/blob/master/src/Traits.jl#L158 and in particular isfitting.
Turns out that this is a relatively hard problem (unless I made a mess of it), in particular once parametric methods are involved. However, your problem might be a bit easier than what Traits does as it test for equality. Let me know if you got questions. On Mon, 2015-07-06 at 19:25, Simon Byrne <[email protected]> wrote: > If I have a generic method foo, is there a way I can tell if a particular > signature has been defined? > > Note that I don't want method_exists (which simply determines if something > can be dispatched), I want to determine if a particular definition has been > made, e.g. if > > foo(x) = x > > then I want > > method_defined(foo,(Int,)) == false > method_defined(foo,(Any,)) == true
