summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall')
-rw-r--r--dhall/build.rs13
-rw-r--r--dhall/src/phase/binary.rs13
2 files changed, 22 insertions, 4 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index bcb5d1c..8b23dd9 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -94,8 +94,12 @@ fn main() -> std::io::Result<()> {
// Too slow in debug mode
path == "success/largeExpression"
// TODO: Inline headers
- || path == "success/unit/import/parenthesizeUsing"
|| path == "success/unit/import/inlineUsing"
+ || path == "success/unit/import/Headers"
+ || path == "success/unit/import/HeadersDoubleHash"
+ || path == "success/unit/import/HeadersDoubleHashPrecedence"
+ || path == "success/unit/import/HeadersHashPrecedence"
+ || path == "success/unit/import/HeadersInteriorHash"
// TODO: projection by expression
|| path == "success/recordProjectionByExpression"
|| path == "success/RecordProjectionByType"
@@ -117,6 +121,7 @@ fn main() -> std::io::Result<()> {
|| path == "success/largeExpression"
// TODO: Inline headers
|| path == "success/unit/import/inlineUsing"
+ || path == "success/unit/import/Headers"
// TODO: projection by expression
|| path == "success/recordProjectionByExpression"
|| path == "success/RecordProjectionByType"
@@ -140,13 +145,13 @@ fn main() -> std::io::Result<()> {
path.starts_with("failure/")
// Too slow in debug mode
|| path == "success/largeExpression"
- // Too much of a pain to implement; shouldn't make a difference
- // since lets disappear on normalization.
- || path == "success/multilet"
// See https://github.com/pyfisch/cbor/issues/109
|| path == "success/double"
+ || path == "success/unit/DoubleLitExponentNoDot"
+ || path == "success/unit/DoubleLitSecretelyInt"
// TODO: Inline headers
|| path == "success/unit/import/inlineUsing"
+ || path == "success/unit/import/Headers"
// TODO: projection by expression
|| path == "success/recordProjectionByExpression"
|| path == "success/RecordProjectionByType"
diff --git a/dhall/src/phase/binary.rs b/dhall/src/phase/binary.rs
index 719b1c7..f4a9cc1 100644
--- a/dhall/src/phase/binary.rs
+++ b/dhall/src/phase/binary.rs
@@ -178,6 +178,19 @@ fn cbor_value_to_dhall(
let l = Label::from(l.as_str());
Field(x, l)
}
+ [U64(10), x, rest..] => {
+ let x = cbor_value_to_dhall(&x)?;
+ let labels = rest
+ .iter()
+ .map(|s| match s {
+ String(s) => Ok(Label::from(s.as_str())),
+ _ => Err(DecodeError::WrongFormatError(
+ "projection".to_owned(),
+ )),
+ })
+ .collect::<Result<_, _>>()?;
+ Projection(x, labels)
+ }
[U64(11), Object(map)] => {
let map = cbor_map_to_dhall_opt_map(map)?;
UnionType(map)