julia> module A
foo() = 42
julia> module B
import ..A # Would be simply `import A` if A were in the load path rather than in Main
const foo = A.foo
julia> using .B
Note that this is better than the alternative of import A: foo; export foo because it allows tab completion of A.<TAB> to work. (A binding must not be marked as imported-from-another-module for tab completion to consider it.)
Thank you for your answer. However, I would like to export all symbols exported by A (like what could be done by @reexport import A if Reexport were to support this syntax). With your solution, this would mean doing import A; const foo = A.foo for all symbols exported by A which is equivalent to using A. Is it possible to do it without making the symbols of A accessible inside module B ?