Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to not reexport a symbol? #44

Open
WuSiren opened this issue Apr 3, 2024 · 0 comments
Open

How to not reexport a symbol? #44

WuSiren opened this issue Apr 3, 2024 · 0 comments

Comments

@WuSiren
Copy link

WuSiren commented Apr 3, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant