# @which not found in my module

**URL:** https://discourse.julialang.org/t/which-not-found-in-my-module/91878
**Category:** General Usage
**Created:** [December 19, 2022, 11:59pm UTC](https://discourse.julialang.org/t/which-not-found-in-my-module/91878 "2022-12-19T23:59:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)
#### Post date: [December 19, 2022, 11:59pm UTC](https://discourse.julialang.org/t/which-not-found-in-my-module/91878/1 "2022-12-19T23:59:58Z")

</div>

I would like to use `@which` from within a macro to find out where a particular function is called from. But I get a message that the macro is not found. How is this handled? Thanks.

---

<div class="post-metadata">

### Author: ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)
#### Post date: [December 20, 2022, 12:09am UTC](https://discourse.julialang.org/t/which-not-found-in-my-module/91878/2 "2022-12-20T00:09:37Z")

</div>

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
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

```
