update contrib and macro to use the new list? function

This commit is contained in:
Tristan Cacqueray 2019-04-09 00:01:41 +00:00
parent b0ed103931
commit 1c7ca7ac1f
3 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
(setv -registry {})
(defn hy-repr-register [types f &optional placeholder]
(for [typ (if (instance? list types) types [types])]
(for [typ (if (list? types) types [types])]
(setv (get -registry typ) (, f placeholder))))
(setv -quoting False)

View File

@ -19,7 +19,7 @@
(outer (HyExpression (map inner form)))]
[(instance? HyDict form)
(HyDict (outer (HyExpression (map inner form))))]
[(instance? list form)
[(list? form)
((type form) (outer (HyExpression (map inner form))))]
[(coll? form)
(walk inner outer (list form))]

View File

@ -213,7 +213,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 (instance? list arg) (.startswith (first arg) "o!"))
[(and (list? 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)))))