diff --git a/impls/rpython/step8_macros.py b/impls/rpython/step8_macros.py index eaecd35ec9..ffc22afadf 100644 --- a/impls/rpython/step8_macros.py +++ b/impls/rpython/step8_macros.py @@ -93,8 +93,10 @@ def EVAL(ast, env): ast = quasiquote(ast[1]) # Continue loop (TCO) elif u"defmacro!" == a0sym: func = EVAL(ast[2], env) - func.ismacro = True - return env.set(ast[1], func) + return env.set(ast[1], + MalFunc(func.fn, ast=func.ast, env=func.env, + params=func.params, EvalFunc=func.EvalFunc, + ismacro=True)) elif u"do" == a0sym: if len(ast) == 0: return nil diff --git a/impls/rpython/step9_try.py b/impls/rpython/step9_try.py index f98074dfbb..f322655542 100644 --- a/impls/rpython/step9_try.py +++ b/impls/rpython/step9_try.py @@ -93,8 +93,10 @@ def EVAL(ast, env): ast = quasiquote(ast[1]) # Continue loop (TCO) elif u"defmacro!" == a0sym: func = EVAL(ast[2], env) - func.ismacro = True - return env.set(ast[1], func) + return env.set(ast[1], + MalFunc(func.fn, ast=func.ast, env=func.env, + params=func.params, EvalFunc=func.EvalFunc, + ismacro=True)) elif u"try*" == a0sym: if len(ast) < 3: return EVAL(ast[1], env); diff --git a/impls/rpython/stepA_mal.py b/impls/rpython/stepA_mal.py index 624a9b0e7b..088f6b74eb 100644 --- a/impls/rpython/stepA_mal.py +++ b/impls/rpython/stepA_mal.py @@ -102,8 +102,10 @@ def EVAL(ast, env): ast = quasiquote(ast[1]) # Continue loop (TCO) elif u"defmacro!" == a0sym: func = EVAL(ast[2], env) - func.ismacro = True - return env.set(ast[1], func) + return env.set(ast[1], + MalFunc(func.fn, ast=func.ast, env=func.env, + params=func.params, EvalFunc=func.EvalFunc, + ismacro=True)) elif u"try*" == a0sym: if len(ast) < 3: return EVAL(ast[1], env);