From bb1f698c23a83f60020a72bb5be1f9a386c60d44 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 18 Apr 2019 11:58:21 +0200 Subject: Start cleaning up the mess of mapping functions --- dhall_generator/src/quote.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall_generator/src') diff --git a/dhall_generator/src/quote.rs b/dhall_generator/src/quote.rs index c335666..7128511 100644 --- a/dhall_generator/src/quote.rs +++ b/dhall_generator/src/quote.rs @@ -103,7 +103,7 @@ fn quote_subexpr( ctx: &Context, ) -> TokenStream { use dhall_core::ExprF::*; - match expr.as_ref().map_ref( + match expr.as_ref().map_ref_with_special_handling_of_binders( |e| quote_subexpr(e, ctx), |l, e| quote_subexpr(e, &ctx.insert(l.clone(), ())), |_| unreachable!(), @@ -138,7 +138,7 @@ fn quote_subexpr( // to be of type SubExpr<_, _>. fn quote_expr(expr: &Expr, ctx: &Context) -> TokenStream { use dhall_core::ExprF::*; - match expr.map_ref( + match expr.map_ref_with_special_handling_of_binders( |e| quote_subexpr(e, ctx), |l, e| quote_subexpr(e, &ctx.insert(l.clone(), ())), |_| unreachable!(), -- cgit v1.2.3