Making types available across all submodules

What you should not do is to include the same the same file twice. Otherwise it should be fine to use the modules property everywhere. For example:

julia> module MainModule
           # could be "include("typesmodule.jl")
           module TypesModule
               struct A x::Int end
           end

           using .TypesModule

           module Submodule
               export f
               using ..TypesModule: A
               f(x) = A(x) 
           end

           # now you can use Submodule normally
           using .Submodule
           a_in_Main = f(1)

       end

julia> using .MainModule

julia> MainModule.a_in_Main
Main.MainModule.TypesModule.A(1)
2 Likes