From ab100be616932dab22a5309df86107b66e93db37 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 4 May 2019 18:41:22 +0200 Subject: Revert "Make SubExpr generic in the variable labels type" This reverts commit 4c159640e5ee77ffa48b85a5bffa56350cf933ef. --- dhall/src/traits/static_type.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dhall/src/traits/static_type.rs') diff --git a/dhall/src/traits/static_type.rs b/dhall/src/traits/static_type.rs index c3f323b..f90b8df 100644 --- a/dhall/src/traits/static_type.rs +++ b/dhall/src/traits/static_type.rs @@ -32,7 +32,7 @@ pub trait SimpleStaticType { fn get_simple_static_type() -> SimpleType; } -fn mktype(x: SubExpr) -> SimpleType { +fn mktype(x: SubExpr) -> SimpleType { x.into() } @@ -106,22 +106,22 @@ impl SimpleStaticType for String { impl SimpleStaticType for (A, B) { fn get_simple_static_type() -> SimpleType { - let ta: SubExpr<_, _, _> = A::get_simple_static_type().into(); - let tb: SubExpr<_, _, _> = B::get_simple_static_type().into(); + let ta: SubExpr<_, _> = A::get_simple_static_type().into(); + let tb: SubExpr<_, _> = B::get_simple_static_type().into(); mktype(dhall::subexpr!({ _1: ta, _2: tb })) } } impl SimpleStaticType for Option { fn get_simple_static_type() -> SimpleType { - let t: SubExpr<_, _, _> = T::get_simple_static_type().into(); + let t: SubExpr<_, _> = T::get_simple_static_type().into(); mktype(dhall::subexpr!(Optional t)) } } impl SimpleStaticType for Vec { fn get_simple_static_type() -> SimpleType { - let t: SubExpr<_, _, _> = T::get_simple_static_type().into(); + let t: SubExpr<_, _> = T::get_simple_static_type().into(); mktype(dhall::subexpr!(List t)) } } @@ -142,8 +142,8 @@ impl SimpleStaticType for std::result::Result { fn get_simple_static_type() -> SimpleType { - let tt: SubExpr<_, _, _> = T::get_simple_static_type().into(); - let te: SubExpr<_, _, _> = E::get_simple_static_type().into(); + let tt: SubExpr<_, _> = T::get_simple_static_type().into(); + let te: SubExpr<_, _> = E::get_simple_static_type().into(); mktype(dhall::subexpr!(< Ok: tt | Err: te>)) } } -- cgit v1.2.3