Add explicit checks for HyList
This commit is contained in:
parent
dce0e10f3f
commit
52c0e4e221
@ -144,7 +144,7 @@
|
|||||||
(hy-repr (dict x)))))
|
(hy-repr (dict x)))))
|
||||||
|
|
||||||
(for [[types fmt] (partition [
|
(for [[types fmt] (partition [
|
||||||
list "[...]"
|
[list HyList] "[...]"
|
||||||
[set HySet] "#{...}"
|
[set HySet] "#{...}"
|
||||||
frozenset "(frozenset #{...})"
|
frozenset "(frozenset #{...})"
|
||||||
dict-keys "(dict-keys [...])"
|
dict-keys "(dict-keys [...])"
|
||||||
|
@ -201,7 +201,7 @@ Such 'o!' params are available within `body` as the equivalent 'g!' symbol."
|
|||||||
(defn extract-o!-sym [arg]
|
(defn extract-o!-sym [arg]
|
||||||
(cond [(and (symbol? arg) (.startswith arg "o!"))
|
(cond [(and (symbol? arg) (.startswith arg "o!"))
|
||||||
arg]
|
arg]
|
||||||
[(and (list? arg) (.startswith (first arg) "o!"))
|
[(and (instance? HyList arg) (.startswith (first arg) "o!"))
|
||||||
(first arg)]))
|
(first arg)]))
|
||||||
(setv os (list (filter identity (map extract-o!-sym args)))
|
(setv os (list (filter identity (map extract-o!-sym args)))
|
||||||
gs (lfor s os (HySymbol (+ "g!" (cut s 2)))))
|
gs (lfor s os (HySymbol (+ "g!" (cut s 2)))))
|
||||||
|
Loading…
Reference in New Issue
Block a user