summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2020-01-30 14:17:50 +0000
committerNadrieril2020-01-30 14:18:01 +0000
commitda55a72717b247444a31b1932f85ce4abec03c14 (patch)
tree6068deda748e2dc9688e5afc66c1ef851e067c20 /dhall
parentadbf51213a0df5d645d3d9423f0b284f5aff9a4e (diff)
Tweak
Diffstat (limited to '')
-rw-r--r--dhall/src/semantics/core/value.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/dhall/src/semantics/core/value.rs b/dhall/src/semantics/core/value.rs
index f6d273c..e69d220 100644
--- a/dhall/src/semantics/core/value.rs
+++ b/dhall/src/semantics/core/value.rs
@@ -338,11 +338,7 @@ impl Value {
))
}
self_kind => {
- let self_kind = self_kind
- .map_ref_with_special_handling_of_binders(
- |v| v.to_tyexpr(venv),
- |_, _, v| v.to_tyexpr(venv.insert()),
- );
+ let self_kind = self_kind.map_ref(|v| v.to_tyexpr(venv));
let expr = match self_kind {
ValueKind::Var(..)
| ValueKind::LamClosure { .. }
@@ -537,7 +533,7 @@ impl ValueKind<Value> {
}
impl<V> ValueKind<V> {
- pub(crate) fn traverse_ref_with_special_handling_of_binders<'a, V2, E>(
+ fn traverse_ref_with_special_handling_of_binders<'a, V2, E>(
&'a self,
visit_val: impl FnMut(&'a V) -> Result<V2, E>,
visit_under_binder: impl for<'b> FnMut(
@@ -555,7 +551,7 @@ impl<V> ValueKind<V> {
.visit(self)
}
- pub(crate) fn map_ref_with_special_handling_of_binders<'a, V2>(
+ fn map_ref_with_special_handling_of_binders<'a, V2>(
&'a self,
mut map_val: impl FnMut(&'a V) -> V2,
mut map_under_binder: impl for<'b> FnMut(&'a Binder, &'b V, &'a V) -> V2,
@@ -567,8 +563,7 @@ impl<V> ValueKind<V> {
))
}
- #[allow(dead_code)]
- pub(crate) fn map_ref<'a, V2>(
+ fn map_ref<'a, V2>(
&'a self,
map_val: impl Fn(&'a V) -> V2,
) -> ValueKind<V2> {