diff options
author | Nadrieril | 2019-03-21 21:27:36 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-21 21:27:36 +0100 |
commit | 8d527e88168885ab754a039219d0ae682fa4508b (patch) | |
tree | b26d26902ba84d611f9905add97b3a29d0dcf025 /dhall | |
parent | 6cbe21b84ffd274f92791ab8dbf9af6527978688 (diff) |
Follow the spec for handling Doubles
Diffstat (limited to 'dhall')
-rw-r--r-- | dhall/src/binary.rs | 2 | ||||
-rw-r--r-- | dhall/tests/parser.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dhall/src/binary.rs b/dhall/src/binary.rs index e8fcdab..8c5b902 100644 --- a/dhall/src/binary.rs +++ b/dhall/src/binary.rs @@ -34,7 +34,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<ParsedExpr, DecodeError> { }, }, U64(n) => Var(V(Label::from("_"), *n as usize)), - F64(x) => DoubleLit(*x), + F64(x) => DoubleLit((*x).into()), Bool(b) => BoolLit(*b), Array(vec) => match vec.as_slice() { [String(l), U64(n)] => { diff --git a/dhall/tests/parser.rs b/dhall/tests/parser.rs index 678c198..4fa0ff7 100644 --- a/dhall/tests/parser.rs +++ b/dhall/tests/parser.rs @@ -18,7 +18,7 @@ parser_success!(spec_parser_success_annotations, "annotations"); parser_success!(spec_parser_success_blockComment, "blockComment"); parser_success!(spec_parser_success_builtins, "builtins"); // parser_success!(spec_parser_success_collectionImportType, "collectionImportType"); -// parser_success!(spec_parser_success_double, "double"); +parser_success!(spec_parser_success_double, "double"); parser_success!(spec_parser_success_doubleQuotedString, "doubleQuotedString"); // parser_success!(spec_parser_success_environmentVariables, "environmentVariables"); // parser_success!(spec_parser_success_escapedDoubleQuotedString, "escapedDoubleQuotedString"); |