From a928c3c4f51d87fd942e8a81727962c00abf6808 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 29 Jan 2020 22:06:01 +0000 Subject: Cleanup variable handling --- dhall/src/semantics/tck/env.rs | 10 +++++----- dhall/src/semantics/tck/tyexpr.rs | 26 ++++++++++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) (limited to 'dhall/src/semantics/tck') diff --git a/dhall/src/semantics/tck/env.rs b/dhall/src/semantics/tck/env.rs index 32c2f21..1276a48 100644 --- a/dhall/src/semantics/tck/env.rs +++ b/dhall/src/semantics/tck/env.rs @@ -37,7 +37,7 @@ impl VarEnv { } pub fn lookup_fallible(&self, var: &NzVar) -> Option { let idx = self.size.checked_sub(var.idx() + 1)?; - Some(AlphaVar::new(V((), idx))) + Some(AlphaVar::new(idx)) } } @@ -68,7 +68,7 @@ impl NameEnv { self.names.pop(); } - pub fn unlabel_var(&self, var: &V