Add some missing imports
This commit is contained in:
parent
1f95da2b0b
commit
4a6b633ad2
@ -41,6 +41,7 @@
|
|||||||
(if ~@(cut args 2))))))
|
(if ~@(cut args 2))))))
|
||||||
|
|
||||||
(defmacro deftag [tag-name lambda-list &rest body]
|
(defmacro deftag [tag-name lambda-list &rest body]
|
||||||
|
(import hy.models)
|
||||||
(if (and (not (isinstance tag-name hy.models.HySymbol))
|
(if (and (not (isinstance tag-name hy.models.HySymbol))
|
||||||
(not (isinstance tag-name hy.models.HyString)))
|
(not (isinstance tag-name hy.models.HyString)))
|
||||||
(raise (hy.errors.HyTypeError
|
(raise (hy.errors.HyTypeError
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
;; This file is part of Hy, which is free software licensed under the Expat
|
;; This file is part of Hy, which is free software licensed under the Expat
|
||||||
;; license. See the LICENSE.
|
;; license. See the LICENSE.
|
||||||
|
|
||||||
(import [hy [HyExpression HySymbol HyString HyBytes]])
|
(import [hy [HyExpression HySymbol HyString HyBytes HyDict]])
|
||||||
|
|
||||||
|
|
||||||
(defn test-quote []
|
(defn test-quote []
|
||||||
@ -43,7 +43,7 @@
|
|||||||
(assert (= (get q 1) (quote bar)))
|
(assert (= (get q 1) (quote bar)))
|
||||||
(assert (= (get q 2) (quote baz)))
|
(assert (= (get q 2) (quote baz)))
|
||||||
(assert (= (get q 3) (quote quux)))
|
(assert (= (get q 3) (quote quux)))
|
||||||
(assert (= (type q) hy.HyDict)))
|
(assert (= (type q) HyDict)))
|
||||||
|
|
||||||
|
|
||||||
(defn test-quote-expr-in-dict []
|
(defn test-quote-expr-in-dict []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user