fix: thunk & function

This commit is contained in:
imxyy1soope1 committed 2025-05-15 11:11:11 +08:00
1 parent bcb6c48cfa
commit 2293b9e2de
10 files changed
+76 -112

No files matched your search

+1 -3
View File
@@ -54,10 +54,8 @@ pub fn env<'vm>() -> Rc<Env<'vm>> {
}
let builtins = Value::RecAttrSet(RecAttrSet::from_inner(map.clone()));
let thunk = Thunk {
thunk: RefCell::new(_Thunk::Value(Box::new(builtins.clone()))),
env: RefCell::default(),
thunk: Rc::new(RefCell::new(_Thunk::Value(Box::new(builtins.clone())))),
};
thunk.capture(builtins_env);
map.insert(Symbol::from("builtins"), Value::Thunk(thunk));
env.insert(Symbol::from("builtins"), builtins);