summaryrefslogtreecommitdiff
path: root/dhall/src/traits/static_type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/traits/static_type.rs')
-rw-r--r--dhall/src/traits/static_type.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/dhall/src/traits/static_type.rs b/dhall/src/traits/static_type.rs
index e92ce78..df6a177 100644
--- a/dhall/src/traits/static_type.rs
+++ b/dhall/src/traits/static_type.rs
@@ -33,17 +33,18 @@ pub trait SimpleStaticType {
}
fn mktype<'a>(x: SubExpr<X, X>) -> SimpleType<'a> {
- SimpleType(x, std::marker::PhantomData)
+ x.into()
}
impl<T: SimpleStaticType> StaticType for T {
fn get_static_type() -> Type<'static> {
- crate::expr::Normalized(
- T::get_simple_static_type().into(),
- Some(Type::const_type()),
- std::marker::PhantomData,
+ crate::expr::Normalized::from_thunk_and_type(
+ crate::normalize::Thunk::from_normalized_expr(
+ T::get_simple_static_type().into(),
+ ),
+ Type::const_type(),
)
- .into_type()
+ .to_type()
}
}