hy - How to require a reader(defreader)? - Stack Overflow

admin2025-04-17  2

In Hy manual it says to use require for readers, but it doesn't work for me, what i am doing wrong? The macro and the function works fine

;;f2.hy
(defmacro x []
  "")

(defreader y []
  "")

(defn z []
  "")
;;f1.hy
(require f2 [x y])
(import f2 [z])


(x)
(z)
#y

I get :

hy.errors.HyRequireError: Could not require name y from <module 'f2'
转载请注明原文地址:http://anycun.com/QandA/1744882510a88962.html