From 8a846a6b0af141b45e7f92da7ecad32c89d581f8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 30 Apr 2019 21:13:00 +0200 Subject: Fix shifting. This completely destroys sharing so performance is dead. --- dhall/src/normalize.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 05cb44b..85cadca 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -28,6 +28,10 @@ impl<'a> Typed<'a> { Normalized(self.0.normalize_whnf().normalize_to_expr(), self.1, self.2) } + pub(crate) fn shift0(&self, delta: isize, x: &Label) -> Self { + self.shift(delta, &V(x.clone(), 0)) + } + pub(crate) fn shift(&self, delta: isize, var: &V