summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/binary/decode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/syntax/binary/decode.rs')
-rw-r--r--dhall/src/syntax/binary/decode.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/dhall/src/syntax/binary/decode.rs b/dhall/src/syntax/binary/decode.rs
index f452666..8b73e46 100644
--- a/dhall/src/syntax/binary/decode.rs
+++ b/dhall/src/syntax/binary/decode.rs
@@ -6,7 +6,7 @@ use crate::error::DecodeError;
use crate::semantics::phase::DecodedExpr;
use crate::syntax;
use crate::syntax::{
- Expr, ExprF, FilePath, FilePrefix, Hash, ImportLocation, ImportMode,
+ Expr, ExprKind, FilePath, FilePrefix, Hash, ImportLocation, ImportMode,
Integer, InterpolatedText, Label, Natural, RawExpr, Scheme, Span, URL, V,
};
@@ -25,10 +25,10 @@ fn rc<E>(x: RawExpr<E>) -> Expr<E> {
fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
use cbor::Value::*;
use syntax::{BinOp, Builtin, Const};
- use ExprF::*;
+ use ExprKind::*;
Ok(rc(match data {
String(s) => match Builtin::parse(s) {
- Some(b) => ExprF::Builtin(b),
+ Some(b) => ExprKind::Builtin(b),
None => match s.as_str() {
"True" => BoolLit(true),
"False" => BoolLit(false),
@@ -123,7 +123,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
}
[U64(4), t] => {
let t = cbor_value_to_dhall(&t)?;
- EmptyListLit(rc(App(rc(ExprF::Builtin(Builtin::List)), t)))
+ EmptyListLit(rc(App(rc(ExprKind::Builtin(Builtin::List)), t)))
}
[U64(4), Null, rest @ ..] => {
let rest = rest
@@ -139,14 +139,14 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> {
// Old-style optional literals
[U64(5), t] => {
let t = cbor_value_to_dhall(&t)?;
- App(rc(ExprF::Builtin(Builtin::OptionalNone)), t)
+ App(rc(ExprKind::Builtin(Builtin::OptionalNone)), t)
}
[U64(5), t, x] => {
let x = cbor_value_to_dhall(&x)?;
let t = cbor_value_to_dhall(&t)?;
Annot(
rc(SomeLit(x)),
- rc(App(rc(ExprF::Builtin(Builtin::Optional)), t)),
+ rc(App(rc(ExprKind::Builtin(Builtin::Optional)), t)),
)
}
[U64(6), x, y] => {