From 55b5be3407a8528bc47482a591b168a7cb0ce91e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 6 May 2019 23:52:15 +0200 Subject: Move main datatypes into their own modules --- dhall/src/phase/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dhall/src/phase/mod.rs') diff --git a/dhall/src/phase/mod.rs b/dhall/src/phase/mod.rs index 4262dc1..0faf6dd 100644 --- a/dhall/src/phase/mod.rs +++ b/dhall/src/phase/mod.rs @@ -4,11 +4,13 @@ use std::path::Path; use dhall_syntax::{Const, Import, Span, SubExpr, X}; +use crate::core::context::TypecheckContext; +use crate::core::thunk::Thunk; +use crate::core::value::{AlphaVar, Value}; use crate::error::{Error, ImportError, TypeError, TypeMessage}; -use normalize::{AlphaVar, Thunk, Value}; use resolve::ImportRoot; -use typecheck::{const_to_typed, type_of_const, TypecheckContext}; +use typecheck::{const_to_typed, type_of_const}; pub(crate) mod binary; pub(crate) mod normalize; @@ -305,6 +307,10 @@ impl Normalized { pub(crate) fn to_type(self) -> Type { self.0.to_type() } + pub(crate) fn get_type(&self) -> Result, TypeError> { + self.0.get_type() + } + pub(crate) fn shift(&self, delta: isize, var: &AlphaVar) -> Self { Normalized(self.0.shift(delta, var)) } -- cgit v1.2.3