From 8da4445e6d06cf79d43112042b69c798f86884f3 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 17 Feb 2020 17:58:03 +0000 Subject: Extract resolve-relevant envs together --- dhall/src/semantics/resolve/env.rs | 104 +++++++++++++++++++++++++++++++++ dhall/src/semantics/resolve/mod.rs | 4 +- dhall/src/semantics/resolve/resolve.rs | 63 +++----------------- dhall/src/semantics/tck/env.rs | 59 ++----------------- 4 files changed, 118 insertions(+), 112 deletions(-) diff --git a/dhall/src/semantics/resolve/env.rs b/dhall/src/semantics/resolve/env.rs index e69de29..ff743d3 100644 --- a/dhall/src/semantics/resolve/env.rs +++ b/dhall/src/semantics/resolve/env.rs @@ -0,0 +1,104 @@ +use std::collections::HashMap; + +use crate::error::{Error, ImportError}; +use crate::semantics::{AlphaVar, Hir, Import, VarEnv}; +use crate::syntax::{Label, V}; + +/// Environment for resolving names. +#[derive(Debug, Clone)] +pub(crate) struct NameEnv { + names: Vec