From db3ca819283f9bd99d197de464717f0b58b52fe4 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 2 May 2019 17:07:11 +0200 Subject: Instead of possibly nonexistent Type, treat Sort specially --- dhall/src/traits/static_type.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 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 4dd9961..df6a177 100644 --- a/dhall/src/traits/static_type.rs +++ b/dhall/src/traits/static_type.rs @@ -38,15 +38,13 @@ fn mktype<'a>(x: SubExpr) -> SimpleType<'a> { impl StaticType for T { fn get_static_type() -> Type<'static> { - crate::expr::Normalized( + crate::expr::Normalized::from_thunk_and_type( crate::normalize::Thunk::from_normalized_expr( T::get_simple_static_type().into(), ), - Some(Type::const_type()), - std::marker::PhantomData, + Type::const_type(), ) - .into_type() - .unwrap() + .to_type() } } -- cgit v1.2.3