diff --git a/hy/macros.py b/hy/macros.py index 20d0cac..d3f08d8 100644 --- a/hy/macros.py +++ b/hy/macros.py @@ -84,7 +84,8 @@ _wrappers = { complex: HyComplex, str_type: HyString, dict: lambda d: HyDict(_wrap_value(x) for x in sum(d.items(), ())), - list: lambda l: HyList(_wrap_value(x) for x in l) + list: lambda l: HyList(_wrap_value(x) for x in l), + type(None): lambda foo: HySymbol("None"), } diff --git a/tests/native_tests/native_macros.hy b/tests/native_tests/native_macros.hy index f5b1b74..b9f1cf0 100644 --- a/tests/native_tests/native_macros.hy +++ b/tests/native_tests/native_macros.hy @@ -34,6 +34,9 @@ (defmacro a-dict [] {1 2}) (assert (= (a-dict) {1 2})) +(defmacro a-none []) +(assert (= (a-none) None)) + ; A macro calling a previously defined function (eval-when-compile (defn foo [x y]