Break up SolveEnv

This commit is contained in:
Ayaz Hafiz 2023-06-22 16:00:40 -05:00
parent 15eef74a83
commit 33b1b8236a
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
13 changed files with 127 additions and 91 deletions

View file

@ -10,10 +10,15 @@ use roc_types::{
types::{RecordField, Uls},
};
use crate::env::Env;
use crate::env::SolveEnv;
// TODO: eventually, we could possibly use the arena in Env instead.
pub(crate) fn deep_copy_var_in(env: &mut Env, rank: Rank, var: Variable, arena: &Bump) -> Variable {
pub(crate) fn deep_copy_var_in(
env: &mut SolveEnv,
rank: Rank,
var: Variable,
arena: &Bump,
) -> Variable {
let mut visited = bumpalo::collections::Vec::with_capacity_in(256, arena);
let pool = env.pools.get_mut(rank);