diff --git a/src/vars.rs b/src/vars.rs index f45cce7..a5a15f7 100644 --- a/src/vars.rs +++ b/src/vars.rs @@ -42,14 +42,14 @@ pub fn get_export(env_cfg: bool) -> Function { return Function{ name: String::from("export"), loose_syms: true, - eval_lazy: false, + eval_lazy: true, args: Args::Lazy(2), function: Operation::Internal( |a: Ast, b: Rc>, _c: Rc>| -> Ctr { let inner = a.borrow_mut(); match &inner.car { Ctr::Symbol(identifier) => { - match inner.cdr.clone() { + match eval(inner.cdr) { Ctr::Seg(val) => { let val_tmp = val.borrow().clone(); define(b, identifier.to_string(), Rc::new(val_tmp.car)); @@ -62,6 +62,7 @@ pub fn get_export(env_cfg: bool) -> Function { return Ctr::None; }, _ => { + println!("{:#?}", a); eprintln!("first argument to export must be a symbol"); return Ctr::None; }