summaryrefslogtreecommitdiff
path: root/dhall/src/traits/static_type.rs
diff options
context:
space:
mode:
authorNadrieril2019-05-02 17:07:11 +0200
committerNadrieril2019-05-02 17:07:11 +0200
commitdb3ca819283f9bd99d197de464717f0b58b52fe4 (patch)
tree51ae89e9b1153a7f9b3aa5dae38cfe4441aef9af /dhall/src/traits/static_type.rs
parentc13a4881b56bf2f5b2d5d4d0018a48927b45e7e0 (diff)
Instead of possibly nonexistent Type, treat Sort specially
Diffstat (limited to 'dhall/src/traits/static_type.rs')
-rw-r--r--dhall/src/traits/static_type.rs8
1 files changed, 3 insertions, 5 deletions
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<X, X>) -> SimpleType<'a> {
impl<T: SimpleStaticType> 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()
}
}