From 8e2da26650e202f9ccb1531fc8a88cfd89e54b6d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 27 Dec 2019 15:15:08 +0000 Subject: Implement traverse_ref for ValueKind --- dhall/src/syntax/ast/expr.rs | 2 +- dhall/src/syntax/ast/visitor.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'dhall/src/syntax') diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index 68cb524..376480f 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -189,7 +189,7 @@ impl ExprKind { .visit(self) } - fn traverse_ref<'a, SE2, Err>( + pub(crate) fn traverse_ref<'a, SE2, Err>( &'a self, visit_subexpr: impl FnMut(&'a SE) -> Result, ) -> Result, Err> diff --git a/dhall/src/syntax/ast/visitor.rs b/dhall/src/syntax/ast/visitor.rs index 424048b..f9fd379 100644 --- a/dhall/src/syntax/ast/visitor.rs +++ b/dhall/src/syntax/ast/visitor.rs @@ -1,6 +1,7 @@ -use crate::syntax::*; use std::iter::FromIterator; +use crate::syntax::*; + /// A visitor trait that can be used to traverse `ExprKind`s. We need this pattern so that Rust lets /// us have as much mutability as we can. /// For example, `traverse_ref_with_special_handling_of_binders` cannot be made using only -- cgit v1.2.3 From fc1d7b758008643447f17bc9d05adb128d1567cc Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 17 Jan 2020 10:25:28 +0000 Subject: Remove binder ids The underlying purpose of them turned out to be unsound --- dhall/src/syntax/ast/expr.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dhall/src/syntax') diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index 376480f..0ac31a5 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -173,6 +173,15 @@ pub enum ExprKind { Embed(Embed), } +impl