@which not found in my module

If it is from a script you can try loading InteractiveUtils.

Or you can try using the function which results from the macro, for example, these two are equivalent:

julia> @which sum(2)
sum(a; kw...) in Base at reduce.jl:557

julia> InteractiveUtils.which(sum,(Base.typesof)(2))
sum(a; kw...) in Base at reduce.jl:557

1 Like