Move derive Env to a util module

This commit is contained in:
Ayaz Hafiz 2022-08-01 16:25:56 -05:00
parent e2179348c6
commit 44984d289c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 173 additions and 163 deletions

View file

@ -14,9 +14,12 @@ use roc_region::all::Loc;
use roc_types::subs::{
copy_import_to, Content, Descriptor, Mark, OptVariable, Rank, Subs, Variable,
};
use util::Env;
mod encoding;
mod util;
pub(crate) const DERIVED_SYNTH: ModuleId = ModuleId::DERIVED_SYNTH;
pub fn synth_var(subs: &mut Subs, content: Content) -> Variable {
@ -62,7 +65,7 @@ fn build_derived_body(
specialization_lambda_sets,
} = match derive_key {
DeriveKey::ToEncoder(to_encoder_key) => {
let mut env = encoding::Env {
let mut env = Env {
subs: derived_subs,
exposed_types: exposed_by_module,
derived_ident_ids,