simonster / Reexport.jl

Julia macro for re-exporting one module from another
Other
161 stars 19 forks source link

How to not reexport a symbol? #44

Open WuSiren opened 7 months ago

WuSiren commented 7 months ago
module Y
export f, g
    f(x) = x + 1
    g(x) = x + 2
end

module X
export h
    using Reexport
    @reexport using ..Y: f
    h(x) = f(x) + 3
    # Place-1: let `f` available here.
end

using ..X
# Place-2: let `g` available and `f` not available here.

If I want to let f available at Place-1 and let g available and f not available at Place-2, how should I code?

Thanks in advance!