diff options
author | Nadrieril | 2019-03-09 15:46:30 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-09 15:46:30 +0100 |
commit | 6037cb224c5e61828ba41cb3d34438ad03a71403 (patch) | |
tree | e3ee6d3a5416d60bf7eaedd7407b931b9063d8bb /dhall/src/normalize.rs | |
parent | a0ac45ccc6bd0168f05626fdf1886560006fcda1 (diff) |
Remove the pervasive Label type parameter
Closes #1
Diffstat (limited to 'dhall/src/normalize.rs')
-rw-r--r-- | dhall/src/normalize.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<S, T, A>(e: &Expr<Label, S, A>) -> Expr<Label, T, A> +pub fn normalize<S, T, A>(e: &Expr<S, A>) -> Expr<T, A> 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) }); |