From d8a3e831fb67f86269c4baa99f9f0798a73a7247 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 May 2019 19:06:28 +0200 Subject: s/DoubleVar/AlphaVar/ --- dhall/src/expr.rs | 6 ++--- dhall/src/normalize.rs | 66 +++++++++++++++++++++++++------------------------- dhall/src/typecheck.rs | 16 ++++++------ 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/dhall/src/expr.rs b/dhall/src/expr.rs index 071bb92..7dbbf1c 100644 --- a/dhall/src/expr.rs +++ b/dhall/src/expr.rs @@ -58,7 +58,7 @@ impl std::fmt::Display for Normalized { mod typed { use super::{Type, Typed}; - use crate::normalize::{DoubleVar, Thunk, Value}; + use crate::normalize::{AlphaVar, Thunk, Value}; use crate::typecheck::{ TypeError, TypeInternal, TypeMessage, TypecheckContext, }; @@ -133,7 +133,7 @@ mod typed { } } - pub(crate) fn shift(&self, delta: isize, var: &DoubleVar) -> Self { + pub(crate) fn shift(&self, delta: isize, var: &AlphaVar) -> Self { match self { TypedInternal::Value(th, t) => TypedInternal::Value( th.shift(delta, var), @@ -143,7 +143,7 @@ mod typed { } } - pub(crate) fn subst_shift(&self, var: &DoubleVar, val: &Typed) -> Self { + pub(crate) fn subst_shift(&self, var: &AlphaVar, val: &Typed) -> Self { match self { TypedInternal::Value(th, t) => TypedInternal::Value( th.subst_shift(var, val), diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index f950826..35ab45d 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -34,11 +34,11 @@ impl Typed { Normalized(self.0) } - pub(crate) fn shift(&self, delta: isize, var: &DoubleVar) -> Self { + pub(crate) fn shift(&self, delta: isize, var: &AlphaVar) -> Self { Typed(self.0.shift(delta, var)) } - pub(crate) fn subst_shift(&self, var: &DoubleVar, val: &Typed) -> Self { + pub(crate) fn subst_shift(&self, var: &AlphaVar, val: &Typed) -> Self { Typed(self.0.subst_shift(var, val)) } @@ -54,12 +54,12 @@ impl Typed { /// Stores a pair of variables: a normal one and if relevant one /// that corresponds to the alpha-normalized version of the first one. #[derive(Debug, Clone, Eq)] -pub(crate) struct DoubleVar { +pub(crate) struct AlphaVar { normal: V