summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src')
-rw-r--r--dhall/src/lib.rs2
-rw-r--r--dhall/src/semantics/core/context.rs8
-rw-r--r--dhall/src/semantics/core/value.rs14
-rw-r--r--dhall/src/semantics/core/valuef.rs8
-rw-r--r--dhall/src/semantics/error/mod.rs8
-rw-r--r--dhall/src/semantics/phase/binary.rs4
-rw-r--r--dhall/src/semantics/phase/mod.rs8
-rw-r--r--dhall/src/semantics/phase/normalize.rs8
-rw-r--r--dhall/src/semantics/phase/parse.rs8
-rw-r--r--dhall/src/semantics/phase/resolve.rs4
-rw-r--r--dhall/src/semantics/phase/typecheck.rs14
-rw-r--r--dhall/src/tests.rs4
12 files changed, 44 insertions, 46 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index 3c0159a..86af98f 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -13,8 +13,6 @@
mod tests;
pub mod semantics;
-pub use crate::semantics::*;
-
pub mod syntax {
pub use dhall_syntax::*;
}
diff --git a/dhall/src/semantics/core/context.rs b/dhall/src/semantics/core/context.rs
index c3da823..d150e56 100644
--- a/dhall/src/semantics/core/context.rs
+++ b/dhall/src/semantics/core/context.rs
@@ -1,10 +1,10 @@
use std::collections::HashMap;
use std::rc::Rc;
-use crate::core::value::Value;
-use crate::core::valuef::ValueF;
-use crate::core::var::{AlphaVar, Shift, Subst};
-use crate::error::TypeError;
+use crate::semantics::core::value::Value;
+use crate::semantics::core::valuef::ValueF;
+use crate::semantics::core::var::{AlphaVar, Shift, Subst};
+use crate::semantics::error::TypeError;
use crate::syntax::{Label, V};
#[derive(Debug, Clone)]
diff --git a/dhall/src/semantics/core/value.rs b/dhall/src/semantics/core/value.rs
index 68b879b..6e6739f 100644
--- a/dhall/src/semantics/core/value.rs
+++ b/dhall/src/semantics/core/value.rs
@@ -1,13 +1,13 @@
use std::cell::{Ref, RefCell, RefMut};
use std::rc::Rc;
-use crate::core::context::TypecheckContext;
-use crate::core::valuef::ValueF;
-use crate::core::var::{AlphaVar, Shift, Subst};
-use crate::error::{TypeError, TypeMessage};
-use crate::phase::normalize::{apply_any, normalize_whnf};
-use crate::phase::typecheck::{builtin_to_value, const_to_value};
-use crate::phase::{NormalizedExpr, Typed};
+use crate::semantics::core::context::TypecheckContext;
+use crate::semantics::core::valuef::ValueF;
+use crate::semantics::core::var::{AlphaVar, Shift, Subst};
+use crate::semantics::error::{TypeError, TypeMessage};
+use crate::semantics::phase::normalize::{apply_any, normalize_whnf};
+use crate::semantics::phase::typecheck::{builtin_to_value, const_to_value};
+use crate::semantics::phase::{NormalizedExpr, Typed};
use crate::syntax::{Builtin, Const, Span};
#[derive(Debug, Clone, Copy)]
diff --git a/dhall/src/semantics/core/valuef.rs b/dhall/src/semantics/core/valuef.rs
index e11d5d7..73c715a 100644
--- a/dhall/src/semantics/core/valuef.rs
+++ b/dhall/src/semantics/core/valuef.rs
@@ -1,9 +1,9 @@
use std::collections::HashMap;
-use crate::core::value::{ToExprOptions, Value};
-use crate::core::var::{AlphaLabel, AlphaVar, Shift, Subst};
-use crate::phase::typecheck::rc;
-use crate::phase::{Normalized, NormalizedExpr};
+use crate::semantics::core::value::{ToExprOptions, Value};
+use crate::semantics::core::var::{AlphaLabel, AlphaVar, Shift, Subst};
+use crate::semantics::phase::typecheck::rc;
+use crate::semantics::phase::{Normalized, NormalizedExpr};
use crate::syntax;
use crate::syntax::{
Builtin, Const, ExprF, Integer, InterpolatedTextContents, Label,
diff --git a/dhall/src/semantics/error/mod.rs b/dhall/src/semantics/error/mod.rs
index b2f799d..1288c12 100644
--- a/dhall/src/semantics/error/mod.rs
+++ b/dhall/src/semantics/error/mod.rs
@@ -1,9 +1,9 @@
use std::io::Error as IOError;
-use crate::core::context::TypecheckContext;
-use crate::core::value::Value;
-use crate::phase::resolve::ImportStack;
-use crate::phase::NormalizedExpr;
+use crate::semantics::core::context::TypecheckContext;
+use crate::semantics::core::value::Value;
+use crate::semantics::phase::resolve::ImportStack;
+use crate::semantics::phase::NormalizedExpr;
use crate::syntax::{BinOp, Import, Label, ParseError, Span};
pub type Result<T> = std::result::Result<T, Error>;
diff --git a/dhall/src/semantics/phase/binary.rs b/dhall/src/semantics/phase/binary.rs
index a38f08a..9fe31ad 100644
--- a/dhall/src/semantics/phase/binary.rs
+++ b/dhall/src/semantics/phase/binary.rs
@@ -3,8 +3,8 @@ use serde_cbor::value::value as cbor;
use std::iter::FromIterator;
use std::vec;
-use crate::error::{DecodeError, EncodeError};
-use crate::phase::DecodedExpr;
+use crate::semantics::error::{DecodeError, EncodeError};
+use crate::semantics::phase::DecodedExpr;
use crate::syntax;
use crate::syntax::map::DupTreeMap;
use crate::syntax::{
diff --git a/dhall/src/semantics/phase/mod.rs b/dhall/src/semantics/phase/mod.rs
index 9f38308..0d8fc75 100644
--- a/dhall/src/semantics/phase/mod.rs
+++ b/dhall/src/semantics/phase/mod.rs
@@ -1,10 +1,10 @@
use std::fmt::Display;
use std::path::Path;
-use crate::core::value::{ToExprOptions, Value};
-use crate::core::valuef::ValueF;
-use crate::core::var::{AlphaVar, Shift, Subst};
-use crate::error::{EncodeError, Error, ImportError, TypeError};
+use crate::semantics::core::value::{ToExprOptions, Value};
+use crate::semantics::core::valuef::ValueF;
+use crate::semantics::core::var::{AlphaVar, Shift, Subst};
+use crate::semantics::error::{EncodeError, Error, ImportError, TypeError};
use crate::syntax::{Builtin, Const, Expr};
use resolve::ImportRoot;
diff --git a/dhall/src/semantics/phase/normalize.rs b/dhall/src/semantics/phase/normalize.rs
index 59531bd..81c3ce1 100644
--- a/dhall/src/semantics/phase/normalize.rs
+++ b/dhall/src/semantics/phase/normalize.rs
@@ -1,9 +1,9 @@
use std::collections::HashMap;
-use crate::core::value::Value;
-use crate::core::valuef::ValueF;
-use crate::core::var::{AlphaLabel, AlphaVar, Shift, Subst};
-use crate::phase::Normalized;
+use crate::semantics::core::value::Value;
+use crate::semantics::core::valuef::ValueF;
+use crate::semantics::core::var::{AlphaLabel, AlphaVar, Shift, Subst};
+use crate::semantics::phase::Normalized;
use crate::syntax;
use crate::syntax::Const::Type;
use crate::syntax::{
diff --git a/dhall/src/semantics/phase/parse.rs b/dhall/src/semantics/phase/parse.rs
index 601e93d..6e8e8bd 100644
--- a/dhall/src/semantics/phase/parse.rs
+++ b/dhall/src/semantics/phase/parse.rs
@@ -2,10 +2,10 @@ use std::fs::File;
use std::io::Read;
use std::path::Path;
-use crate::error::Error;
-use crate::phase::binary;
-use crate::phase::resolve::ImportRoot;
-use crate::phase::Parsed;
+use crate::semantics::error::Error;
+use crate::semantics::phase::binary;
+use crate::semantics::phase::resolve::ImportRoot;
+use crate::semantics::phase::Parsed;
use crate::syntax::parse_expr;
pub(crate) fn parse_file(f: &Path) -> Result<Parsed, Error> {
diff --git a/dhall/src/semantics/phase/resolve.rs b/dhall/src/semantics/phase/resolve.rs
index d0563c0..86dc7ae 100644
--- a/dhall/src/semantics/phase/resolve.rs
+++ b/dhall/src/semantics/phase/resolve.rs
@@ -1,8 +1,8 @@
use std::collections::HashMap;
use std::path::{Path, PathBuf};
-use crate::error::{Error, ImportError};
-use crate::phase::{Normalized, NormalizedExpr, Parsed, Resolved};
+use crate::semantics::error::{Error, ImportError};
+use crate::semantics::phase::{Normalized, NormalizedExpr, Parsed, Resolved};
use crate::syntax;
use crate::syntax::{FilePath, ImportLocation, URL};
diff --git a/dhall/src/semantics/phase/typecheck.rs b/dhall/src/semantics/phase/typecheck.rs
index cc524c4..59380a3 100644
--- a/dhall/src/semantics/phase/typecheck.rs
+++ b/dhall/src/semantics/phase/typecheck.rs
@@ -1,13 +1,13 @@
use std::cmp::max;
use std::collections::HashMap;
-use crate::core::context::TypecheckContext;
-use crate::core::value::Value;
-use crate::core::valuef::ValueF;
-use crate::core::var::{Shift, Subst};
-use crate::error::{TypeError, TypeMessage};
-use crate::phase::normalize::merge_maps;
-use crate::phase::Normalized;
+use crate::semantics::core::context::TypecheckContext;
+use crate::semantics::core::value::Value;
+use crate::semantics::core::valuef::ValueF;
+use crate::semantics::core::var::{Shift, Subst};
+use crate::semantics::error::{TypeError, TypeMessage};
+use crate::semantics::phase::normalize::merge_maps;
+use crate::semantics::phase::Normalized;
use crate::syntax;
use crate::syntax::{
Builtin, Const, Expr, ExprF, InterpolatedTextContents, Label, RawExpr, Span,
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 1037ef9..9e5c744 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -47,8 +47,8 @@ use std::fs::File;
use std::io::{Read, Write};
use std::path::PathBuf;
-use crate::error::{Error, Result};
-use crate::phase::Parsed;
+use crate::semantics::error::{Error, Result};
+use crate::semantics::phase::Parsed;
#[allow(dead_code)]
#[derive(Clone)]