summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/core/value.rs11
-rw-r--r--dhall/src/core/valuef.rs7
2 files changed, 2 insertions, 16 deletions
diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs
index 3cccb1d..b4b6b08 100644
--- a/dhall/src/core/value.rs
+++ b/dhall/src/core/value.rs
@@ -212,17 +212,6 @@ impl Value {
WHNF | NF => {}
}
}
- pub(crate) fn normalize_nf(&self) {
- let borrow = self.as_internal();
- match borrow.form {
- Unevaled | WHNF => {
- drop(borrow);
- self.as_internal_mut().normalize_nf();
- }
- // Already in NF
- NF => {}
- }
- }
pub(crate) fn app(&self, v: Value) -> Value {
let body_t = match &*self.get_type_not_sort().as_whnf() {
diff --git a/dhall/src/core/valuef.rs b/dhall/src/core/valuef.rs
index 7ecec86..7a2b51c 100644
--- a/dhall/src/core/valuef.rs
+++ b/dhall/src/core/valuef.rs
@@ -189,7 +189,7 @@ impl ValueF {
for x in elts.iter_mut() {
use InterpolatedTextContents::{Expr, Text};
match x {
- Expr(n) => n.normalize_mut(),
+ Expr(v) => v.normalize_mut(),
Text(_) => {}
}
}
@@ -199,10 +199,7 @@ impl ValueF {
y.normalize_mut();
}
ValueF::PartialExpr(e) => {
- // TODO: need map_mut
- e.map_ref(|v| {
- v.normalize_nf();
- });
+ e.map_mut(Value::normalize_mut);
}
}
}