From 5a3d63ecb46ee0b4ab3a7b49cf9feb286b164803 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 29 Apr 2019 16:34:13 +0200 Subject: Don't need to store original expression in TypeError --- dhall/src/traits/dynamic_type.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'dhall/src/traits') diff --git a/dhall/src/traits/dynamic_type.rs b/dhall/src/traits/dynamic_type.rs index f783950..c15b277 100644 --- a/dhall/src/traits/dynamic_type.rs +++ b/dhall/src/traits/dynamic_type.rs @@ -23,15 +23,6 @@ impl<'a> DynamicType for Type<'a> { Ok(Cow::Owned( self.clone().into_normalized()?.get_type()?.into_owned(), )) - // match &self.0 { - // TypeInternal::Expr(e) => e.get_type(), - // TypeInternal::Const(c) => Ok(Cow::Owned(type_of_const(*c))), - // TypeInternal::SuperType => Err(TypeError::new( - // &TypecheckContext::new(), - // dhall_core::rc(ExprF::Const(Const::Sort)), - // TypeMessage::Untyped, - // )), - // } } } @@ -41,7 +32,6 @@ impl<'a> DynamicType for Normalized<'a> { Some(t) => Ok(Cow::Borrowed(t)), None => Err(TypeError::new( &TypecheckContext::new(), - self.0.embed_absurd(), TypeMessage::Untyped, )), } @@ -54,7 +44,6 @@ impl<'a> DynamicType for Typed<'a> { Some(t) => Ok(Cow::Borrowed(t)), None => Err(TypeError::new( &TypecheckContext::new(), - self.0.clone(), TypeMessage::Untyped, )), } -- cgit v1.2.3