From 7743647137d1914c280e03d6aaee81e507cff97d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 30 Jan 2020 11:17:49 +0000 Subject: Remove old typecheck module --- dhall/src/semantics/phase/mod.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'dhall/src/semantics/phase/mod.rs') diff --git a/dhall/src/semantics/phase/mod.rs b/dhall/src/semantics/phase/mod.rs index 2727a61..f24a668 100644 --- a/dhall/src/semantics/phase/mod.rs +++ b/dhall/src/semantics/phase/mod.rs @@ -2,9 +2,7 @@ use std::fmt::Display; use std::path::Path; use crate::error::{EncodeError, Error, ImportError, TypeError}; -use crate::semantics::core::value::Value; -use crate::semantics::core::value::ValueKind; -use crate::semantics::tck::tyexpr::TyExpr; +use crate::semantics::{typecheck, typecheck_with, TyExpr, Value, ValueKind}; use crate::syntax::binary; use crate::syntax::{Builtin, Const, Expr}; use resolve::ImportRoot; @@ -12,7 +10,6 @@ use resolve::ImportRoot; pub(crate) mod normalize; pub(crate) mod parse; pub(crate) mod resolve; -pub(crate) mod typecheck; pub type ParsedExpr = Expr; pub type DecodedExpr = Expr; @@ -80,23 +77,15 @@ impl Parsed { impl Resolved { pub fn typecheck(&self) -> Result { - Ok(Typed(crate::semantics::tck::typecheck::typecheck(&self.0)?)) + Ok(Typed(typecheck(&self.0)?)) } pub fn typecheck_with(self, ty: &Normalized) -> Result { - Ok(Typed(crate::semantics::tck::typecheck::typecheck_with( - &self.0, - ty.to_expr(), - )?)) + Ok(Typed(typecheck_with(&self.0, ty.to_expr())?)) } /// Converts a value back to the corresponding AST expression. pub fn to_expr(&self) -> ResolvedExpr { self.0.clone() } - pub fn tck_and_normalize_new_flow(&self) -> Result { - let val = crate::semantics::tck::typecheck::typecheck(&self.0)? - .normalize_whnf_noenv(); - Ok(Normalized(val)) - } } impl Typed { -- cgit v1.2.3