diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/src/typecheck.rs | 18 | ||||
-rw-r--r-- | dhall_core/src/core.rs | 12 |
2 files changed, 0 insertions, 30 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index 91846bc..2a527fb 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -24,53 +24,42 @@ impl Resolved { } } impl Typed { - #[inline(always)] fn as_expr(&self) -> &SubExpr<X, X> { &self.0 } - #[inline(always)] fn into_expr(self) -> SubExpr<X, X> { self.0 } - #[inline(always)] pub fn get_type(&self) -> &Type { &self.1 } - #[inline(always)] fn get_type_move(self) -> Type { self.1 } } impl Normalized { - #[inline(always)] fn as_expr(&self) -> &SubExpr<X, X> { &self.0 } - #[inline(always)] pub(crate) fn into_expr(self) -> SubExpr<X, X> { self.0 } - #[inline(always)] pub fn get_type(&self) -> &Type { &self.1 } - #[inline(always)] pub(crate) fn into_type(self) -> Type { crate::expr::Type(TypeInternal::Expr(Box::new(self))) } // Expose the outermost constructor - #[inline(always)] fn unroll_ref(&self) -> &Expr<X, X> { self.as_expr().as_ref() } - #[inline(always)] fn shift(&self, delta: isize, var: &V<Label>) -> Self { // shift the type too ? Normalized(shift(delta, var, &self.0), self.1.clone()) } } impl Type { - #[inline(always)] pub fn as_normalized(&self) -> Result<&Normalized, TypeError<X>> { use TypeInternal::*; match &self.0 { @@ -82,7 +71,6 @@ impl Type { )), } } - #[inline(always)] pub(crate) fn into_normalized(self) -> Result<Normalized, TypeError<X>> { use TypeInternal::*; match self.0 { @@ -95,11 +83,9 @@ impl Type { } } // Expose the outermost constructor - #[inline(always)] fn unroll_ref(&self) -> Result<&Expr<X, X>, TypeError<X>> { Ok(self.as_normalized()?.unroll_ref()) } - #[inline(always)] pub fn get_type(&self) -> &Type { use TypeInternal::*; match &self.0 { @@ -107,7 +93,6 @@ impl Type { Untyped => &UNTYPE, } } - #[inline(always)] fn shift(&self, delta: isize, var: &V<Label>) -> Self { use TypeInternal::*; crate::expr::Type(match &self.0 { @@ -116,16 +101,13 @@ impl Type { }) } - #[inline(always)] pub fn const_sort() -> Self { Normalized(rc(ExprF::Const(Const::Sort)), UNTYPE).into_type() } - #[inline(always)] pub fn const_kind() -> Self { Normalized(rc(ExprF::Const(Const::Kind)), Type::const_sort()) .into_type() } - #[inline(always)] pub fn const_type() -> Self { Normalized(rc(ExprF::Const(Const::Type)), Type::const_kind()) .into_type() diff --git a/dhall_core/src/core.rs b/dhall_core/src/core.rs index 03a34f1..353e5c3 100644 --- a/dhall_core/src/core.rs +++ b/dhall_core/src/core.rs @@ -285,7 +285,6 @@ impl<S, A> Expr<S, A> { self.map_shallow(recurse, S::clone, map_embed, Label::clone) } - #[inline(always)] pub fn traverse_embed<B, Err, F>( &self, map_embed: &F, @@ -317,7 +316,6 @@ impl<S, A> Expr<S, A> { self.map_shallow(recurse, S::clone, A::clone, map_label) } - #[inline(always)] pub fn roll(&self) -> SubExpr<S, A> where S: Clone, @@ -359,7 +357,6 @@ impl<S: Clone, A: Clone> Expr<S, SubExpr<S, A>> { } impl<SE, L, N, E> ExprF<SE, L, N, E> { - #[inline(always)] pub fn as_ref(&self) -> ExprF<&SE, &L, &N, &E> where L: Ord, @@ -407,7 +404,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { } } - #[inline(always)] pub fn traverse<SE2, L2, N2, E2, Err, F1, F2, F3, F4, F5>( self, map_subexpr: F1, @@ -499,7 +495,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { }) } - #[inline(always)] pub fn map<SE2, L2, N2, E2, F1, F2, F3, F4, F5>( self, mut map_subexpr: F1, @@ -526,7 +521,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { )) } - #[inline(always)] pub fn map_ref<'a, SE2, L2, N2, E2, F1, F2, F3, F4, F5>( &'a self, map_subexpr: F1, @@ -554,7 +548,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { ) } - #[inline(always)] pub fn map_ref_simple<'a, SE2, F1>( &'a self, map_subexpr: F1, @@ -575,7 +568,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { ) } - #[inline(always)] pub fn traverse_ref_simple<'a, SE2, Err, F1>( &'a self, map_subexpr: F1, @@ -596,7 +588,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { ) } - // #[inline(always)] // pub fn zip<SE2, L2, N2, E2>( // self, // other: ExprF<SE2, L2, N2, E2> @@ -641,7 +632,6 @@ impl<SE, L, N, E> ExprF<SE, L, N, E> { } impl<N, E> SubExpr<N, E> { - #[inline(always)] pub fn as_ref(&self) -> &Expr<N, E> { self.0.as_ref() } @@ -677,7 +667,6 @@ impl<N, E> SubExpr<N, E> { self.map_ref(&map_expr, |_, e| map_expr(e)) } - #[inline(always)] pub fn unroll(&self) -> Expr<N, E> where N: Clone, @@ -688,7 +677,6 @@ impl<N, E> SubExpr<N, E> { } impl<N, E> Clone for SubExpr<N, E> { - #[inline(always)] fn clone(&self) -> Self { SubExpr(Rc::clone(&self.0)) } |