From b6f57069b75febf1d312a98efcd6544c9db2fe59 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 4 May 2019 14:19:43 +0200 Subject: Remove dummy lifetimes --- dhall/src/normalize.rs | 50 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) (limited to 'dhall/src/normalize.rs') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index ab9812d..4636859 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -11,10 +11,10 @@ use dhall_syntax::{ use crate::expr::{Normalized, Type, Typed, TypedInternal}; -type InputSubExpr = SubExpr>; +type InputSubExpr = SubExpr; type OutputSubExpr = SubExpr; -impl<'a> Typed<'a> { +impl Typed { /// Reduce an expression to its normal form, performing beta reduction /// /// `normalize` does not type-check the expression. You may want to type-check @@ -24,7 +24,7 @@ impl<'a> Typed<'a> { /// However, `normalize` will not fail if the expression is ill-typed and will /// leave ill-typed sub-expressions unevaluated. /// - pub fn normalize(self) -> Normalized<'a> { + pub fn normalize(self) -> Normalized { let internal = match self.0 { TypedInternal::Sort => TypedInternal::Sort, TypedInternal::Value(thunk, t) => { @@ -35,19 +35,15 @@ impl<'a> Typed<'a> { TypedInternal::Value(thunk, t) } }; - Normalized(internal, self.1) + Normalized(internal) } pub(crate) fn shift(&self, delta: isize, var: &V