We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hy.core.macros
Qualified macro imports don't seem to work as expected.
$ > hy --repl-output-fn=hy.contrib.pprint.pformat hy 0.20.0 using CPython(default) 3.9.1 on Linux => (require [hy.contrib.walk :as w]) => (w.let [a 1] (+ a 1)) 2 ; as expected => (w.cond [True :true]) :true ; unexpected - why is `w.cond` defined? => (lfor [k v] (.items --macros--) (unmangle k)) ["koan" "ideas" "defmacro" "if" "deftag" "macro-error" "defn" "defn/a" "as->" "assoc" "with" "with/a" "cond" "->" "doto" "->>" "of" "if-not" "lif" "lif-not" "when" "unless" "with-gensyms" "defmacro/g!" "defmacro!" "defmain" "comment" "doc" "w.defmacro" "w.hyx-if" "w.deftag" "w.macro-error" "w.defn" ; where "w.hyx-defnXsolidusXa" "w.hyx-as-XgreaterHthan-signX" ; do "w.assoc" "w.hyx-with" "w.hyx-withXsolidusXa" "w.cond" ; all "w.-hyx-XgreaterHthan-signX" "w.doto" "w.-hyx-XgreaterHthan-ignXXgreaterHthan-signX" ; of "w.of" "w.if-not" "w.lif" "w.lif-not" "w.when" "w.unless" "w.with-gensyms" ; these "w.hyx-efmacroXsolidusXgXexclamation-markX" "w.hyx-defmacroXexclamation-markX" ; come "w.defmain" "w.comment" "w.doc" "w.smacrolet" "w.let"] ; from?
Surely only macros from the specified module should be imported as qualified, and not anything else?
The text was updated successfully, but these errors were encountered:
That's the same way Python imports work. Why would you expect otherwise?
Sorry, something went wrong.
I guess I didn't realise that Hy implicitly imports everything from hy.core in every module. Then this would make sense.
hy.core
Yeah, that's the sort of namespace pollution that we'd like to avoid in the future.
Successfully merging a pull request may close this issue.
Qualified macro imports don't seem to work as expected.
Surely only macros from the specified module should be imported as qualified, and not anything else?
The text was updated successfully, but these errors were encountered: