summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-12-15 19:50:15 +0000
committerNadrieril2019-12-15 19:50:15 +0000
commitec761bbd0de807bf1cb0da9389d714e3d812dd6d (patch)
tree2313e16ad60995fcdc697f26e51a8ea8e294ac4c /dhall
parent7abd49772643ee4e131ef47de66db22ba7c1e037 (diff)
fixup! Reexport dhall_syntax as a module in dhall
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/semantics/phase/binary.rs4
-rw-r--r--dhall/src/semantics/phase/typecheck.rs4
2 files changed, 5 insertions, 3 deletions
diff --git a/dhall/src/semantics/phase/binary.rs b/dhall/src/semantics/phase/binary.rs
index b1e7638..1fc41d4 100644
--- a/dhall/src/semantics/phase/binary.rs
+++ b/dhall/src/semantics/phase/binary.rs
@@ -31,8 +31,8 @@ pub fn rc<E>(x: RawExpr<E>) -> Expr<E> {
}
fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
- use cbor::Value::*;
use crate::syntax::{BinOp, Builtin, Const};
+ use cbor::Value::*;
use ExprF::*;
Ok(rc(match data {
String(s) => match Builtin::parse(s) {
@@ -472,9 +472,9 @@ fn serialize_subexpr<S, E>(ser: S, e: &Expr<E>) -> Result<S::Ok, S::Error>
where
S: serde::ser::Serializer,
{
- use cbor::Value::{String, I64, U64};
use crate::syntax::Builtin;
use crate::syntax::ExprF::*;
+ use cbor::Value::{String, I64, U64};
use std::iter::once;
use self::Serialize::{RecordMap, UnionMap};
diff --git a/dhall/src/semantics/phase/typecheck.rs b/dhall/src/semantics/phase/typecheck.rs
index 9a41be9..97a29ca 100644
--- a/dhall/src/semantics/phase/typecheck.rs
+++ b/dhall/src/semantics/phase/typecheck.rs
@@ -457,7 +457,9 @@ fn type_last_layer(
return mkerr(InvalidListType(t));
}
- RetTypeOnly(Value::from_builtin(crate::syntax::Builtin::List).app(t))
+ RetTypeOnly(
+ Value::from_builtin(crate::syntax::Builtin::List).app(t),
+ )
}
SomeLit(x) => {
let t = x.get_type()?;