From d9b4bd8d4019ca9ab999c0c4657663604158101c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 6 Apr 2019 17:50:47 +0200 Subject: s/Type/StaticType/ --- dhall/src/dhall_type.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'dhall/src/dhall_type.rs') diff --git a/dhall/src/dhall_type.rs b/dhall/src/dhall_type.rs index 6b0e06e..64e07d9 100644 --- a/dhall/src/dhall_type.rs +++ b/dhall/src/dhall_type.rs @@ -4,37 +4,37 @@ use dhall_generator::*; #[derive(Debug, Clone)] pub enum ConversionError {} -pub trait Type { +pub trait StaticType { fn get_type() -> DhallExpr; // fn as_dhall(&self) -> DhallExpr; // fn from_dhall(e: DhallExpr) -> Result; } -impl Type for bool { +impl StaticType for bool { fn get_type() -> DhallExpr { dhall_expr!(Bool) } } -impl Type for Natural { +impl StaticType for Natural { fn get_type() -> DhallExpr { dhall_expr!(Natural) } } -impl Type for Integer { +impl StaticType for Integer { fn get_type() -> DhallExpr { dhall_expr!(Integer) } } -impl Type for String { +impl StaticType for String { fn get_type() -> DhallExpr { dhall_expr!(Text) } } -impl Type for (A, B) { +impl StaticType for (A, B) { fn get_type() -> DhallExpr { let ta = A::get_type(); let tb = B::get_type(); @@ -42,33 +42,33 @@ impl Type for (A, B) { } } -impl Type for Option { +impl StaticType for Option { fn get_type() -> DhallExpr { let t = T::get_type(); dhall_expr!(Optional t) } } -impl Type for Vec { +impl StaticType for Vec { fn get_type() -> DhallExpr { let t = T::get_type(); dhall_expr!(List t) } } -impl<'a, T: Type> Type for &'a T { +impl<'a, T: StaticType> StaticType for &'a T { fn get_type() -> DhallExpr { T::get_type() } } -impl Type for std::marker::PhantomData { +impl StaticType for std::marker::PhantomData { fn get_type() -> DhallExpr { dhall_expr!({}) } } -impl Type for Result { +impl StaticType for Result { fn get_type() -> DhallExpr { let tt = T::get_type(); let te = E::get_type(); -- cgit v1.2.3