summaryrefslogtreecommitdiff
path: root/dhall/src/typecheck.rs
diff options
context:
space:
mode:
authorNadrieril2019-03-08 18:47:25 +0100
committerNadrieril2019-03-08 18:47:25 +0100
commit0916eafc12b0ccbbf5b524a273903a0a84f30e74 (patch)
treebb00b7028835c54db4787e326abed74678ce3884 /dhall/src/typecheck.rs
parent74719869dc8aae53bf9521de55188c08f4ebaf11 (diff)
Make labels non-Copy
Diffstat (limited to '')
-rw-r--r--dhall/src/typecheck.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs
index c2a2ca3..b7fead3 100644
--- a/dhall/src/typecheck.rs
+++ b/dhall/src/typecheck.rs
@@ -198,7 +198,7 @@ where
Lam(x, ref tA, ref b) => {
let ctx2 = ctx
.insert(x, (**tA).clone())
- .map(|e| core::shift(1, V(x, 0), e));
+ .map(|e| core::shift(1, &V(x, 0), e));
let tB = type_with(&ctx2, b)?;
let p = Pi(x, tA.clone(), bx(tB));
let _ = type_with(ctx, &p)?;
@@ -220,7 +220,7 @@ where
let ctx2 = ctx
.insert(x, (**tA).clone())
- .map(|e| core::shift(1, V(x, 0), e));
+ .map(|e| core::shift(1, &V(x, 0), e));
let tB = normalize(&type_with(&ctx2, tB)?);
let kB = match tB {
Const(k) => k,
@@ -252,7 +252,7 @@ where
};
let tA2 = type_with(ctx, a)?;
if prop_equal(&tA, &tA2) {
- let vx0 = V(x, 0);
+ let vx0 = &V(x, 0);
let a2 = shift::<&str, S, S, X>(1, vx0, a);
let tB2 = subst(vx0, &a2, &tB);
let tB3 = shift::<&str, S, S, X>(-1, vx0, &tB2);