summaryrefslogtreecommitdiff
path: root/dhall/src/traits
diff options
context:
space:
mode:
authorNadrieril2019-05-06 22:09:55 +0200
committerNadrieril2019-05-06 22:09:55 +0200
commit423fdeebe9247b16744fae4b50df415bbd08be04 (patch)
treef2f16407d7e365e6fecee400a1959ca08b2a5156 /dhall/src/traits
parent2075cba6d883278a534afd2d8fe8f0a5e9b2f0d0 (diff)
Reorganize dhall into a phase structure
Diffstat (limited to 'dhall/src/traits')
-rw-r--r--dhall/src/traits/deserialize.rs2
-rw-r--r--dhall/src/traits/dynamic_type.rs7
-rw-r--r--dhall/src/traits/static_type.rs6
3 files changed, 6 insertions, 9 deletions
diff --git a/dhall/src/traits/deserialize.rs b/dhall/src/traits/deserialize.rs
index e3ff2d5..9673cf9 100644
--- a/dhall/src/traits/deserialize.rs
+++ b/dhall/src/traits/deserialize.rs
@@ -1,5 +1,5 @@
use crate::error::*;
-use crate::expr::*;
+use crate::phase::*;
/// A data structure that can be deserialized from a Dhall expression
///
diff --git a/dhall/src/traits/dynamic_type.rs b/dhall/src/traits/dynamic_type.rs
index 4c8e1fd..3f8d117 100644
--- a/dhall/src/traits/dynamic_type.rs
+++ b/dhall/src/traits/dynamic_type.rs
@@ -1,9 +1,6 @@
-use crate::expr::*;
+use crate::phase::typecheck::TypeError;
+use crate::phase::*;
use crate::traits::StaticType;
-#[allow(unused_imports)]
-use crate::typecheck::{TypeError, TypeMessage, TypecheckContext};
-#[allow(unused_imports)]
-use dhall_syntax::{Const, ExprF};
use std::borrow::Cow;
pub trait DynamicType {
diff --git a/dhall/src/traits/static_type.rs b/dhall/src/traits/static_type.rs
index f90b8df..8b141a0 100644
--- a/dhall/src/traits/static_type.rs
+++ b/dhall/src/traits/static_type.rs
@@ -1,4 +1,4 @@
-use crate::expr::*;
+use crate::phase::*;
use dhall_proc_macros as dhall;
use dhall_syntax::*;
@@ -38,8 +38,8 @@ fn mktype(x: SubExpr<X, X>) -> SimpleType {
impl<T: SimpleStaticType> StaticType for T {
fn get_static_type() -> Type {
- crate::expr::Normalized::from_thunk_and_type(
- crate::normalize::Thunk::from_normalized_expr(
+ crate::phase::Normalized::from_thunk_and_type(
+ crate::phase::normalize::Thunk::from_normalized_expr(
T::get_simple_static_type().into(),
),
Type::const_type(),