diff options
author | Nadrieril | 2019-05-02 17:23:40 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-02 17:23:40 +0200 |
commit | 9d3c0d6aa23e4123515a1d7e949fc71509db803c (patch) | |
tree | d657fd50678dd8a562621d91c3caecbb2396fc7a /dhall/src/traits/static_type.rs | |
parent | 9042db26ced0c56714c48bf2f6322e0a1c2a6973 (diff) | |
parent | 17ab417aeb5aea6cd21240a491607b9017194737 (diff) |
Merge branch 'refactor-typechecking'
Diffstat (limited to 'dhall/src/traits/static_type.rs')
-rw-r--r-- | dhall/src/traits/static_type.rs | 13 |
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() } } |