From 929a34c177f8b18ae791f77bbd4630a862fb1070 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 15 Dec 2019 19:42:57 +0000 Subject: Reexport dhall_syntax as a module in dhall --- dhall/src/phase/binary.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dhall/src/phase/binary.rs') diff --git a/dhall/src/phase/binary.rs b/dhall/src/phase/binary.rs index 0639120..b1e7638 100644 --- a/dhall/src/phase/binary.rs +++ b/dhall/src/phase/binary.rs @@ -3,8 +3,8 @@ use serde_cbor::value::value as cbor; use std::iter::FromIterator; use std::vec; -use dhall_syntax::map::DupTreeMap; -use dhall_syntax::{ +use crate::syntax::map::DupTreeMap; +use crate::syntax::{ Expr, ExprF, FilePath, FilePrefix, Hash, Import, ImportLocation, ImportMode, Integer, InterpolatedText, Label, Natural, RawExpr, Scheme, Span, URL, V, @@ -32,7 +32,7 @@ pub fn rc(x: RawExpr) -> Expr { fn cbor_value_to_dhall(data: &cbor::Value) -> Result { use cbor::Value::*; - use dhall_syntax::{BinOp, Builtin, Const}; + use crate::syntax::{BinOp, Builtin, Const}; use ExprF::*; Ok(rc(match data { String(s) => match Builtin::parse(s) { @@ -350,7 +350,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result { "import/type".to_owned(), ))?, }; - Import(dhall_syntax::Import { + Import(crate::syntax::Import { mode, hash, location, @@ -473,8 +473,8 @@ where S: serde::ser::Serializer, { use cbor::Value::{String, I64, U64}; - use dhall_syntax::Builtin; - use dhall_syntax::ExprF::*; + use crate::syntax::Builtin; + use crate::syntax::ExprF::*; use std::iter::once; use self::Serialize::{RecordMap, UnionMap}; @@ -548,7 +548,7 @@ where once(tag(4)).chain(once(null())).chain(xs.iter().map(expr)), ), TextLit(xs) => { - use dhall_syntax::InterpolatedTextContents::{Expr, Text}; + use crate::syntax::InterpolatedTextContents::{Expr, Text}; ser.collect_seq(once(tag(18)).chain(xs.iter().map(|x| match x { Expr(x) => expr(x), Text(x) => cbor(String(x.clone())), @@ -559,7 +559,7 @@ where UnionType(map) => ser_seq!(ser; tag(11), UnionMap(map)), Field(x, l) => ser_seq!(ser; tag(9), expr(x), label(l)), BinOp(op, x, y) => { - use dhall_syntax::BinOp::*; + use crate::syntax::BinOp::*; let op = match op { BoolOr => 0, BoolAnd => 1, -- cgit v1.2.3