From 6037cb224c5e61828ba41cb3d34438ad03a71403 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 9 Mar 2019 15:46:30 +0100 Subject: Remove the pervasive Label type parameter Closes #1 --- dhall/src/normalize.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall/src/normalize.rs') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 6344c52..b2ee0f6 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -12,7 +12,7 @@ use std::fmt; /// However, `normalize` will not fail if the expression is ill-typed and will /// leave ill-typed sub-expressions unevaluated. /// -pub fn normalize(e: &Expr) -> Expr +pub fn normalize(e: &Expr) -> Expr where S: Clone + fmt::Debug, T: Clone + fmt::Debug, @@ -93,7 +93,7 @@ where normalize(&dhall_expr!(k (List a0) (λ(a : a0) -> λ(as : List a1) -> [ a ] # as) ([] : List a0))) } (App(box App(box App(box App(box Builtin(ListFold), _), box ListLit(_, xs)), _), cons), nil) => { - let e2: Expr<_, _, _> = xs.into_iter().rev().fold(nil, |y, ys| { + let e2: Expr<_, _> = xs.into_iter().rev().fold(nil, |y, ys| { let y = bx(y); let ys = bx(ys); dhall_expr!(cons y ys) @@ -130,7 +130,7 @@ where ] */ (App(box App(box App(box App(box Builtin(OptionalFold), _), box OptionalLit(_, xs)), _), just), nothing) => { - let e2: Expr<_, _, _> = xs.into_iter().fold(nothing, |y, _| { + let e2: Expr<_, _> = xs.into_iter().fold(nothing, |y, _| { let y = bx(y); dhall_expr!(just y) }); -- cgit v1.2.3