Skip to content

Commit

Permalink
Don't hold on to meaningless ExtendEnvs when building a closure.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstansifer committed Dec 23, 2019
1 parent 1680d66 commit 82d81f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core_macro_forms.rs
Expand Up @@ -575,6 +575,8 @@ pub fn make_core_macro_forms() -> SynEnv {
// TODO: This is the right thing to do, right?
let macro_params = ::beta::bound_from_export_beta(
&ebeta!(["syntax"]), &parts.this_ast.node_parts(), 0);
let implementation = ::core_forms::strip_ee(
&::core_forms::strip_ee(&parts.get_term(n("implementation")))).clone();

let mut export = ::beta::ExportBeta::Nothing;
let export_names = parts.get_rep_term(n("export")).iter()
Expand All @@ -589,7 +591,7 @@ pub fn make_core_macro_forms() -> SynEnv {
Ok(Scope(macro_invocation(
FormPat::reflect(&parts.get_res(n("syntax"))?),
ast_to_name(&parts.get_term(n("macro_name"))),
::runtime::eval::Closure{ body: parts.get_term(n("implementation")),
::runtime::eval::Closure{ body: implementation,
params: macro_params,
env: parts.env.clone()
},
Expand Down

0 comments on commit 82d81f7

Please sign in to comment.