Add explicit checks for HyList

This commit is contained in:
Kodi Arfer 2019-08-02 17:09:13 -04:00
parent dce0e10f3f
commit 52c0e4e221
2 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@
(hy-repr (dict x)))))
(for [[types fmt] (partition [
list "[...]"
[list HyList] "[...]"
[set HySet] "#{...}"
frozenset "(frozenset #{...})"
dict-keys "(dict-keys [...])"

View File

@ -201,7 +201,7 @@ Such 'o!' params are available within `body` as the equivalent 'g!' symbol."
(defn extract-o!-sym [arg]
(cond [(and (symbol? arg) (.startswith arg "o!"))
arg]
[(and (list? arg) (.startswith (first arg) "o!"))
[(and (instance? HyList arg) (.startswith (first arg) "o!"))
(first arg)]))
(setv os (list (filter identity (map extract-o!-sym args)))
gs (lfor s os (HySymbol (+ "g!" (cut s 2)))))