# Listing all names available in a module, part 2

**URL:** https://discourse.julialang.org/t/listing-all-names-available-in-a-module-part-2/33796
**Category:** General Usage
**Tags:** question
**Created:** [January 26, 2020, 2:51am UTC](https://discourse.julialang.org/t/listing-all-names-available-in-a-module-part-2/33796 "2020-01-26T02:51:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gcv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gcv/32/11086_2.png) [@gcv](https://discourse.julialang.org/u/gcv)
#### Post date: [January 26, 2020, 2:51am UTC](https://discourse.julialang.org/t/listing-all-names-available-in-a-module-part-2/33796/1 "2020-01-26T02:51:30Z")

</div>

Follow-up to [Listing all names available in a module](https://discourse.julialang.org/t/listing-all-names-available-in-a-module/32601).

I need a way to introspect all names available in a module, including names implicitly brought in with `using`. The `names` function is helpful, but does not go all the way because even with `imported=true` it only includes names _explicitly_ brought into a module.

Inside a module `MyModule` which states  
`using FunctionalCollections`  
the invocation of `names(MyModule, imported=true)` does _not_ include names from `FunctionalCollections`. On the other hand if `MyModule` states  
`import FunctionalCollections: @Persistent, append`  
the `names` command does include the explicitly imported symbols. (Strangely, `using FunctionalCollections: @Persistent, append` does not have the same effect as the `import` call above.)

In short, is there a more powerful version of `names` I can use to enumerate all names available inside a module?

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [January 26, 2020, 1:14pm UTC](https://discourse.julialang.org/t/listing-all-names-available-in-a-module-part-2/33796/2 "2020-01-26T13:14:31Z")

</div>

You can do it iteratively:

```julia
nms = names(MyModule; imported=true)
for mod in Base.loaded_modules_array()
    if isdefined(MyModule, nameof(mod))
        append!(nms, names(mod))
    end
end

```

---

<div class="post-metadata">

### Author: ![gcv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gcv/32/11086_2.png) [@gcv](https://discourse.julialang.org/u/gcv)
#### Post date: [January 27, 2020, 12:46am UTC](https://discourse.julialang.org/t/listing-all-names-available-in-a-module-part-2/33796/3 "2020-01-27T00:46:50Z")

</div>

Excellent workaround. Thank you.
