summaryrefslogtreecommitdiff
path: root/dhall/src/phase/binary.rs
diff options
context:
space:
mode:
authorNadrieril2019-05-07 18:12:04 +0200
committerNadrieril2019-05-07 18:12:04 +0200
commit3da450aa3fae23214aa982643b9bc4dd0ea4eaa6 (patch)
tree02e00cd008d2e7dc899b9211379596fe792f41c8 /dhall/src/phase/binary.rs
parentd8a3e831fb67f86269c4baa99f9f0798a73a7247 (diff)
parent14dfeb8e7d2aa87a361a711a485243449426b144 (diff)
Merge branch 'reorganize'
Diffstat (limited to '')
-rw-r--r--dhall/src/phase/binary.rs (renamed from dhall/src/binary.rs)17
1 files changed, 9 insertions, 8 deletions
diff --git a/dhall/src/binary.rs b/dhall/src/phase/binary.rs
index 9c31d4c..30aa7a0 100644
--- a/dhall/src/binary.rs
+++ b/dhall/src/phase/binary.rs
@@ -1,14 +1,15 @@
-use dhall_syntax::*;
-use itertools::*;
+use itertools::Itertools;
use serde_cbor::value::value as cbor;
-type ParsedExpr = SubExpr<X, Import>;
+use dhall_syntax::{
+ rc, ExprF, FilePrefix, Hash, Import, ImportHashed, ImportLocation,
+ ImportMode, Integer, InterpolatedText, Label, Natural, Scheme, SubExpr,
+ URL, V, X,
+};
-#[derive(Debug)]
-pub enum DecodeError {
- CBORError(serde_cbor::error::Error),
- WrongFormatError(String),
-}
+use crate::error::DecodeError;
+
+type ParsedExpr = SubExpr<X, Import>;
pub fn decode(data: &[u8]) -> Result<ParsedExpr, DecodeError> {
match serde_cbor::de::from_slice(data) {