From 4d2aad1b0f4a85ee3e000f84f3f698db1e87a902 Mon Sep 17 00:00:00 2001 From: Ian Denhardt Date: Sun, 21 Sep 2014 11:36:40 -0400 Subject: [PATCH] Call _wrap_value recursively on HyExpressions. Without this, cases like: (defmacro foo [] `(~0)) (foo) throw exceptions, because the embedded zero is not a HyObject. --- hy/macros.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hy/macros.py b/hy/macros.py index 937e7b8..57fcea6 100644 --- a/hy/macros.py +++ b/hy/macros.py @@ -117,6 +117,7 @@ _wrappers = { list: lambda l: HyList(_wrap_value(x) for x in l), tuple: lambda t: HyList(_wrap_value(x) for x in t), type(None): lambda foo: HySymbol("None"), + HyExpression: lambda e: HyExpression(_wrap_value(x) for x in e), } if sys.version_info[0] < 3: # do not add long on python3