use crate::eval::{Value, Environment};
use crate::diagnostics::Result;
use std::rc::Rc;
use std::collections::HashMap;
pub trait EnvironmentManager: std::fmt::Debug {
fn create_environment(&self, parent: Option<Rc<Environment>>) -> Rc<Environment>;
fn clone_environment(&self, env: &Rc<Environment>) -> Rc<Environment>;
fn extend_environment(
&self,
env: &Rc<Environment>,
bindings: HashMap<String, Value>
) -> Rc<Environment>;
fn lookup(&self, env: &Rc<Environment>, name: &str) -> Option<Value>;
fn update(&self, env: &mut Rc<Environment>, name: String, value: Value) -> Result<()>;
}