diff options
author | Nadrieril Feneanar | 2019-12-24 20:41:22 +0000 |
---|---|---|
committer | GitHub | 2019-12-24 20:41:22 +0000 |
commit | 057d645a90a6b57f40f72eb7e347ba2c6219777e (patch) | |
tree | 151473a0a6cb7222fd6b4eb3abf1cfacca012aad /dhall/src/syntax/binary | |
parent | 06e75c919d999c310f8ca1c151c6a5ad6918ca08 (diff) | |
parent | 18dd5ba3ae94fd89dd27c0ae3891ac3e43ace350 (diff) |
Merge pull request #124 from Nadrieril/catchup-spec
Catchup on standard changes
Diffstat (limited to 'dhall/src/syntax/binary')
-rw-r--r-- | dhall/src/syntax/binary/decode.rs | 5 | ||||
-rw-r--r-- | dhall/src/syntax/binary/encode.rs | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/dhall/src/syntax/binary/decode.rs b/dhall/src/syntax/binary/decode.rs index 254ab07..c18deb5 100644 --- a/dhall/src/syntax/binary/decode.rs +++ b/dhall/src/syntax/binary/decode.rs @@ -98,6 +98,11 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> { let l = Label::from(l.as_str()); Pi(l, x, y) } + [U64(3), U64(13), x, y] => { + let x = cbor_value_to_dhall(&x)?; + let y = cbor_value_to_dhall(&y)?; + Completion(x, y) + } [U64(3), U64(n), x, y] => { let x = cbor_value_to_dhall(&x)?; let y = cbor_value_to_dhall(&y)?; diff --git a/dhall/src/syntax/binary/encode.rs b/dhall/src/syntax/binary/encode.rs index 25a545c..5e79f2d 100644 --- a/dhall/src/syntax/binary/encode.rs +++ b/dhall/src/syntax/binary/encode.rs @@ -164,6 +164,7 @@ where ProjectionByExpr(x, y) => { ser_seq!(ser; tag(10), expr(x), vec![expr(y)]) } + Completion(x, y) => ser_seq!(ser; tag(3), tag(13), expr(x), expr(y)), Import(import) => serialize_import(ser, import), Embed(_) => unimplemented!( "An expression with resolved imports cannot be binary-encoded" |