From 833cb91cec6ae708e17a0f9589eba9560e81bd07 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 7 May 2019 19:47:04 +0200 Subject: Unify typecheck and normalization contexts --- dhall/src/phase/mod.rs | 3 --- dhall/src/phase/typecheck.rs | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'dhall/src/phase') diff --git a/dhall/src/phase/mod.rs b/dhall/src/phase/mod.rs index 5c910bc..d658638 100644 --- a/dhall/src/phase/mod.rs +++ b/dhall/src/phase/mod.rs @@ -223,9 +223,6 @@ impl Normalized { pub(crate) fn to_value(&self) -> Value { self.0.to_value() } - pub(crate) fn to_thunk(&self) -> Thunk { - self.0.to_thunk() - } pub(crate) fn to_type(self) -> Type { self.0.to_type() } diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index f8ee559..bfe85b9 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -378,8 +378,8 @@ fn type_with( v.clone() }; - let v = type_with(ctx, v)?.normalize(); - let e = type_with(&ctx.insert_value(x, v.clone()), e.clone())?; + let v = type_with(ctx, v)?; + let e = type_with(&ctx.insert_value(x, v.clone())?, e.clone())?; Ok(RetType(e.get_type()?.into_owned())) } -- cgit v1.2.3