summaryrefslogtreecommitdiff
path: root/dhall_core/src
diff options
context:
space:
mode:
authorNadrieril2019-04-30 21:13:00 +0200
committerNadrieril2019-04-30 21:13:00 +0200
commit8a846a6b0af141b45e7f92da7ecad32c89d581f8 (patch)
treedc305b242dc4c5259989f3aa42648116f1a077d8 /dhall_core/src
parent0ad99aa34994db136f42268cf3cec23b22a86648 (diff)
Fix shifting. This completely destroys sharing so performance is dead.
Diffstat (limited to 'dhall_core/src')
-rw-r--r--dhall_core/src/core.rs4
1 files changed, 3 insertions, 1 deletions
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<N, E> SubExpr<N, E> {
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))
+ },
),
}
}