mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
make it abstract
This commit is contained in:
parent
751ae125a5
commit
9d82f795b7
3 changed files with 7 additions and 5 deletions
|
@ -78,10 +78,14 @@ pub enum TypeError {
|
|||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct Env {
|
||||
pub vars_by_symbol: MutMap<Symbol, Variable>,
|
||||
vars_by_symbol: MutMap<Symbol, Variable>,
|
||||
}
|
||||
|
||||
impl Env {
|
||||
pub fn vars_by_symbol(&self) -> MutMap<Symbol, Variable> {
|
||||
self.vars_by_symbol.clone()
|
||||
}
|
||||
|
||||
fn get_var_by_symbol(&self, symbol: &Symbol) -> Option<Variable> {
|
||||
self.vars_by_symbol.get(symbol).copied()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue