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

whichModule (subsumes canImport / moduleExists) #376

Open
timotheecour opened this issue Nov 23, 2020 · 0 comments
Open

whichModule (subsumes canImport / moduleExists) #376

timotheecour opened this issue Nov 23, 2020 · 0 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Nov 23, 2020

const path = whichModule("exitprocs")
when path.len > 0 : import exitprocs)

other names: findModule.

links

note

see also this comment: https://forum.nim-lang.org/t/7222#45666

Please bring it on, add a std / moduletraits module featuring whichModule. Also add LINE and FILE like capabilities while you're at it. But these probably need an RFC so that we figure out how they should work wrt template expansions etc.

@timotheecour timotheecour changed the title canImport / moduleExists canImport / moduleExists / whichModule Nov 23, 2020
@timotheecour timotheecour changed the title canImport / moduleExists / whichModule whichModule (subsumes canImport / moduleExists) Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant