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_core/src/core.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dhall_core') diff --git a/dhall_core/src/core.rs b/dhall_core/src/core.rs index 54d7cee..ebd95e7 100644 --- a/dhall_core/src/core.rs +++ b/dhall_core/src/core.rs @@ -458,7 +458,9 @@ impl SubExpr { ExprF::Var(v) => rc(ExprF::Var(v.shift(-1, var))), _ => self.map_subexprs_with_special_handling_of_binders( |e| e.subst_shift(var, val), - |x: &Label, e| e.subst_shift(&var.shift0(1, x), val), + |x: &Label, e| { + e.subst_shift(&var.shift0(1, x), &val.shift0(1, x)) + }, ), } } -- cgit v1.2.3