What’s the best practice for the management of a package and its modules?
Please take a look at the following example.
In this example, module A
is a kind of a Base module, and module B
is a corresponding module.
Also, I’d like to make functions accessible as MyPackage.my_func
(without exporting my_func
like using Reexport
).
What should I do?
src/MyPackage.jl
module MyPackage
# `include("A.jl"); using .A` does not make support `MyPackage.A`.
end
src/A.jl
module A
abstract type AbstractA end
function my_func(a::AbstractA)
# do something
end
end
src/B.jl
module B
# how to use AbstractA here?
end