summaryrefslogtreecommitdiff
path: root/dhall/src/phase
diff options
context:
space:
mode:
authorNadrieril2019-08-10 22:48:21 +0200
committerNadrieril2019-08-10 22:48:35 +0200
commit80c8d87db595c91293af75d710464ac5379c7e28 (patch)
treecedc8ca740ca0d0bbc74fc987cc0c041f0391b91 /dhall/src/phase
parent4d94c3bbf955c5c32cee0651820484c4e4b6cd90 (diff)
Update dhall-lang submodule
Diffstat (limited to 'dhall/src/phase')
-rw-r--r--dhall/src/phase/binary.rs13
1 files changed, 13 insertions, 0 deletions
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)