From 3a623acaf70c934ee9dbd74dfadcaa2c612160c5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 6 Dec 2020 20:10:51 +0000 Subject: Make global store of imports and import results --- dhall/src/semantics/resolve/env.rs | 37 +++++------ dhall/src/semantics/resolve/resolve.rs | 113 ++++++++++++++++++++------------- 2 files changed, 88 insertions(+), 62 deletions(-) (limited to 'dhall/src/semantics') diff --git a/dhall/src/semantics/resolve/env.rs b/dhall/src/semantics/resolve/env.rs index 29dd16b..82f21e8 100644 --- a/dhall/src/semantics/resolve/env.rs +++ b/dhall/src/semantics/resolve/env.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use crate::error::{Error, ImportError}; use crate::semantics::{AlphaVar, Cache, ImportLocation, VarEnv}; use crate::syntax::{Hash, Label, V}; -use crate::Typed; +use crate::{Ctxt, ImportResultId, Typed}; /// Environment for resolving names. #[derive(Debug, Clone, Default)] @@ -11,14 +11,13 @@ pub struct NameEnv { names: Vec