summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-04-16 16:15:41 +0200
committerNadrieril2019-04-16 16:17:27 +0200
commitdf3f3785f251bfa84ab7df65e26ff8cbc73c2e2e (patch)
treeaaab642dd379769ad48cae7ece05cbbb54fa98d4 /dhall
parent85dca9313efea9618dc4e3dd2e002ad4b5a02515 (diff)
Naming tweaks
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/normalize.rs20
-rw-r--r--dhall/src/traits/deserialize.rs4
2 files changed, 12 insertions, 12 deletions
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index 58deb87..fa669d8 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -19,10 +19,10 @@ impl<'a> Typed<'a> {
}
}
-fn apply_builtin<S, A>(b: Builtin, args: &[Expr<S, A>]) -> WhatNext<S, A>
+fn apply_builtin<N, E>(b: Builtin, args: &[Expr<N, E>]) -> WhatNext<N, E>
where
- S: fmt::Debug + Clone,
- A: fmt::Debug + Clone,
+ N: fmt::Debug + Clone,
+ E: fmt::Debug + Clone,
{
use dhall_core::Builtin::*;
use dhall_core::ExprF::*;
@@ -209,19 +209,19 @@ where
// Put the remaining arguments back and eval again. In most cases
// ret will not be of a form that can be applied, so this won't go very deep.
// In lots of cases, there are no remaining args so this cann will just return ret.
- let rest: Vec<SubExpr<S, A>> = rest.iter().map(ExprF::roll).collect();
+ let rest: Vec<SubExpr<N, E>> = rest.iter().map(ExprF::roll).collect();
Continue(ExprF::App(ret, rest))
}
// Small enum to help with being DRY
-enum WhatNext<'a, S, A> {
+enum WhatNext<'a, N, E> {
// Recurse on this expression
- Continue(Expr<S, A>),
- ContinueSub(SubExpr<S, A>),
+ Continue(Expr<N, E>),
+ ContinueSub(SubExpr<N, E>),
// The following expression is the normal form
- Done(Expr<S, A>),
- DoneRef(&'a Expr<S, A>),
- DoneRefSub(&'a SubExpr<S, A>),
+ Done(Expr<N, E>),
+ DoneRef(&'a Expr<N, E>),
+ DoneRefSub(&'a SubExpr<N, E>),
// The current expression is already in normal form
DoneAsIs,
}
diff --git a/dhall/src/traits/deserialize.rs b/dhall/src/traits/deserialize.rs
index cbe9aa3..43eb2ac 100644
--- a/dhall/src/traits/deserialize.rs
+++ b/dhall/src/traits/deserialize.rs
@@ -7,9 +7,9 @@ use crate::expr::*;
/// can deserialize.
///
/// This trait cannot be implemented manually.
-pub trait Deserialize<'a>: Sized {
+pub trait Deserialize<'de>: Sized {
/// See [dhall::de::from_str][crate::de::from_str]
- fn from_str(s: &'a str, ty: Option<&Type>) -> Result<Self>;
+ fn from_str(s: &'de str, ty: Option<&Type>) -> Result<Self>;
}
impl<'de: 'a, 'a> Deserialize<'de> for Parsed<'a> {