diff options
author | Nadrieril | 2019-03-21 16:36:46 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-21 16:36:46 +0100 |
commit | 845abbb0404ac15cefeca8b6ac32d9b3f93e5987 (patch) | |
tree | 74a363bafddc951ae08fc722ab8d2f1891e57f28 /dhall/src/binary.rs | |
parent | 427c5e55a6e6768b22c3e7ad40594d451ac024e7 (diff) |
Represent Optional literals more faithfully
Diffstat (limited to '')
-rw-r--r-- | dhall/src/binary.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dhall/src/binary.rs b/dhall/src/binary.rs index 9099afc..e8fcdab 100644 --- a/dhall/src/binary.rs +++ b/dhall/src/binary.rs @@ -105,16 +105,16 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<ParsedExpr, DecodeError> { } [U64(5), t] => { let t = cbor_value_to_dhall(&t)?; - OptionalLit(Some(t), None) + EmptyOptionalLit(t) } [U64(5), Null, x] => { let x = cbor_value_to_dhall(&x)?; - OptionalLit(None, Some(x)) + NEOptionalLit(x) } [U64(5), t, x] => { let x = cbor_value_to_dhall(&x)?; let t = cbor_value_to_dhall(&t)?; - OptionalLit(Some(t), Some(x)) + Annot(rc(NEOptionalLit(x)), t) } [U64(6), x, y] => { let x = cbor_value_to_dhall(&x)?; |