diff --git a/hy/contrib/hy_repr.hy b/hy/contrib/hy_repr.hy index 3baaebb..a3c7631 100644 --- a/hy/contrib/hy_repr.hy +++ b/hy/contrib/hy_repr.hy @@ -144,7 +144,7 @@ (hy-repr (dict x))))) (for [[types fmt] (partition [ - list "[...]" + [list HyList] "[...]" [set HySet] "#{...}" frozenset "(frozenset #{...})" dict-keys "(dict-keys [...])" diff --git a/hy/core/macros.hy b/hy/core/macros.hy index 90ddc22..e1d5d48 100644 --- a/hy/core/macros.hy +++ b/hy/core/macros.hy @@ -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)))))