summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/nze
diff options
context:
space:
mode:
authorNadrieril2020-02-15 19:05:26 +0000
committerNadrieril2020-02-15 19:05:26 +0000
commitd65d639ff93691adbf0a208edb99736003bc64bd (patch)
tree39a0a59fdb2deaa26f202d3141b2e6c779533377 /dhall/src/semantics/nze
parent51cf6a28fa56031dbeae0ff378f0ef84eff7fd3e (diff)
Factor some tck code to avoid needing get_type_tyexpr
Diffstat (limited to 'dhall/src/semantics/nze')
-rw-r--r--dhall/src/semantics/nze/normalize.rs2
-rw-r--r--dhall/src/semantics/nze/value.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs
index 4111190..c8dd5ae 100644
--- a/dhall/src/semantics/nze/normalize.rs
+++ b/dhall/src/semantics/nze/normalize.rs
@@ -475,7 +475,7 @@ pub(crate) fn normalize_hir_whnf(env: &NzEnv, hir: &Hir) -> ValueKind {
}
HirKind::Expr(ExprKind::Let(_, None, val, body)) => {
let val = val.eval(env);
- body.eval(&env.insert_value(val, ())).kind().clone()
+ body.eval(env.insert_value(val, ())).kind().clone()
}
HirKind::Expr(e) => {
let e = e.map_ref(|hir| hir.eval(env));
diff --git a/dhall/src/semantics/nze/value.rs b/dhall/src/semantics/nze/value.rs
index 0603fb5..3a5b5b5 100644
--- a/dhall/src/semantics/nze/value.rs
+++ b/dhall/src/semantics/nze/value.rs
@@ -87,7 +87,7 @@ pub(crate) enum ValueKind {
UnionLit(Label, Value, HashMap<Label, Option<Value>>),
TextLit(TextLit),
Equivalence(Value, Value),
- /// Invariant: evaluation must not be able to progress with `normalize_one_layer`?
+ /// Invariant: evaluation must not be able to progress with `normalize_one_layer`.
PartialExpr(ExprKind<Value>),
}
@@ -387,7 +387,7 @@ impl Closure {
pub fn apply(&self, val: Value) -> Value {
match self {
Closure::Closure { env, body, .. } => {
- body.eval(&env.insert_value(val, ()))
+ body.eval(env.insert_value(val, ()))
}
Closure::ConstantClosure { body, .. } => body.clone(),
}