From b55e291825e4e7c6899d9bf7051b816660fa43a3 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 30 Jan 2020 11:24:34 +0000 Subject: Clean imports --- dhall/src/semantics/builtins.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'dhall/src/semantics/builtins.rs') diff --git a/dhall/src/semantics/builtins.rs b/dhall/src/semantics/builtins.rs index 4cf1a7c..2efa266 100644 --- a/dhall/src/semantics/builtins.rs +++ b/dhall/src/semantics/builtins.rs @@ -1,8 +1,9 @@ use crate::semantics::phase::Normalized; -use crate::semantics::{type_with, NzEnv, Value, ValueKind}; +use crate::semantics::{typecheck, NzEnv, Value, ValueKind}; +use crate::syntax::map::DupTreeMap; use crate::syntax::Const::Type; use crate::syntax::{ - self, Builtin, Const, Expr, ExprKind, InterpolatedText, + BinOp, Builtin, Const, Expr, ExprKind, InterpolatedText, InterpolatedTextContents, Label, NaiveDouble, Span, UnspannedExpr, V, }; use std::collections::HashMap; @@ -36,7 +37,7 @@ macro_rules! make_type { )) }; ({ $($label:ident : $ty:ident),* }) => {{ - let mut kts = syntax::map::DupTreeMap::new(); + let mut kts = DupTreeMap::new(); $( kts.insert( Label::from(stringify!($label)), @@ -159,7 +160,7 @@ pub(crate) fn type_of_builtin(b: Builtin) -> Expr { // Ad-hoc macro to help construct closures macro_rules! make_closure { (var($var:ident)) => {{ - rc(ExprKind::Var(syntax::V( + rc(ExprKind::Var(V( Label::from(stringify!($var)).into(), 0 ))) @@ -190,7 +191,7 @@ macro_rules! make_closure { }; (1 + $($v:tt)*) => { rc(ExprKind::BinOp( - syntax::BinOp::NaturalPlus, + BinOp::NaturalPlus, make_closure!($($v)*), rc(ExprKind::NaturalLit(1)) )) @@ -199,7 +200,7 @@ macro_rules! make_closure { let head = make_closure!($($head)*); let tail = make_closure!($($tail)*); rc(ExprKind::BinOp( - syntax::BinOp::ListAppend, + BinOp::ListAppend, rc(ExprKind::NEListLit(vec![head])), tail, )) @@ -214,7 +215,7 @@ pub(crate) fn apply_builtin( types: Vec, env: NzEnv, ) -> ValueKind { - use syntax::Builtin::*; + use Builtin::*; use ValueKind::*; // Small helper enum -- cgit v1.2.3