chore: cargo fmt
This commit is contained in:
@@ -2,7 +2,7 @@ use std::cell::RefCell;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::ty::common::Symbol;
|
||||
use crate::ty::internal::{Const, PrimOp, RecAttrSet, Thunk, Value, _Thunk};
|
||||
use crate::ty::internal::{_Thunk, Const, PrimOp, RecAttrSet, Thunk, Value};
|
||||
use crate::vm::Env;
|
||||
|
||||
pub fn env() -> Arc<Env> {
|
||||
@@ -50,12 +50,17 @@ pub fn env() -> Arc<Env> {
|
||||
Symbol::from(format!("__{}", primop.name)),
|
||||
Value::PrimOp(primop.clone()),
|
||||
);
|
||||
map.borrow_mut().insert_mut(Symbol::from(primop.name), Value::PrimOp(primop));
|
||||
map.borrow_mut()
|
||||
.insert_mut(Symbol::from(primop.name), Value::PrimOp(primop));
|
||||
}
|
||||
let builtins = Value::RecAttrSet(RecAttrSet::from_inner(map.clone()));
|
||||
let thunk= Thunk { thunk: RefCell::new(_Thunk::Value(Box::new(builtins.clone()))), env: RefCell::default() };
|
||||
let thunk = Thunk {
|
||||
thunk: RefCell::new(_Thunk::Value(Box::new(builtins.clone()))),
|
||||
env: RefCell::default(),
|
||||
};
|
||||
thunk.capture(Arc::new(builtins_env));
|
||||
map.borrow_mut().insert_mut(Symbol::from("builtins"), Value::Thunk(thunk));
|
||||
map.borrow_mut()
|
||||
.insert_mut(Symbol::from("builtins"), Value::Thunk(thunk));
|
||||
|
||||
env.insert(Symbol::from("builtins"), builtins);
|
||||
env
|
||||
|
||||
Reference in New Issue
Block a user