# Help with modules and types

**URL:** <https://discourse.julialang.org/t/help-with-modules-and-types/71782>\
**Category:** New to Julia\
**Tags:** module\
**Created:** [November 19, 2021, 2:05pm UTC](https://discourse.julialang.org/t/help-with-modules-and-types/71782 "2021-11-19T14:05:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mmiller](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmiller/32/20805_2.png) [@mmiller](https://discourse.julialang.org/u/mmiller)\
**Post date:** [November 19, 2021, 2:12pm UTC](https://discourse.julialang.org/t/help-with-modules-and-types/71782/2 "2021-11-19T14:12:19Z")

</div>

Hi @cesarmarinhorj ! How about something like this (I’ve assumed each module is in a separate script)

In `HR.jl`

```nohighlight
module HR

include("Model.jl")
using .Model # . means look in local scope rather than registry

include("Staff.jl")
using .Staff

end # module

```

In `Model.jl`

```nohighlight
module Model

struct Person
    age::Int
end

end # module

```

In `Staff.jl`

```nohighlight
module Staff

using ..Model # .. means look in scope of parent module

function age(p::Model.Person)
    return p.age
end

end # module

```

Alternatively `Person` could be exported from `Model` and then you could just use `Person` in `Staff`.

---

_[View the full topic](https://discourse.julialang.org/t/help-with-modules-and-types/71782)._
