From 54d7e61ad40682ee24e36288980ee4164ea87c34 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 22 Dec 2019 18:38:05 +0000 Subject: Update dhall-lang submodule --- dhall/build.rs | 7 +------ dhall/src/syntax/text/printer.rs | 2 ++ dhall/tests/type-errors/unit/AssertDoubleZeros.txt | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 dhall/tests/type-errors/unit/AssertDoubleZeros.txt (limited to 'dhall') diff --git a/dhall/build.rs b/dhall/build.rs index 3e7c023..e06f9b3 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -224,6 +224,7 @@ fn generate_tests() -> std::io::Result<()> { || path == "hashMismatch" || path == "missing" || path == "referentiallyInsane" + || path == "customHeadersUsingBoundVariable" }), input_type: FileType::Text, output_type: None, @@ -308,9 +309,6 @@ fn generate_tests() -> std::io::Result<()> { variant: "TypeInferenceFailure", path_filter: Box::new(|path: &str| { false - // TODO: Enable imports in typecheck tests - || path == "importBoundary" - || path == "customHeadersUsingBoundVariable" // TODO: projection by expression || path == "unit/RecordProjectionByTypeFieldTypeMismatch" || path == "unit/RecordProjectionByTypeNotPresent" @@ -334,9 +332,6 @@ fn generate_tests() -> std::io::Result<()> { variant: "TypeError", path_filter: Box::new(|path: &str| { false - // TODO: Enable imports in typecheck tests - || path == "importBoundary" - || path == "customHeadersUsingBoundVariable" // TODO: projection by expression || path == "unit/RecordProjectionByTypeFieldTypeMismatch" || path == "unit/RecordProjectionByTypeNotPresent" diff --git a/dhall/src/syntax/text/printer.rs b/dhall/src/syntax/text/printer.rs index 78942ed..dff3479 100644 --- a/dhall/src/syntax/text/printer.rs +++ b/dhall/src/syntax/text/printer.rs @@ -322,6 +322,8 @@ impl Display for NaiveDouble { f.write_str("-Infinity") } else if v.is_nan() { f.write_str("NaN") + } else if v == 0.0 && v.is_sign_negative() { + f.write_str("-0.0") } else { let s = format!("{}", v); if s.contains('e') || s.contains('.') { diff --git a/dhall/tests/type-errors/unit/AssertDoubleZeros.txt b/dhall/tests/type-errors/unit/AssertDoubleZeros.txt new file mode 100644 index 0000000..4b68fea --- /dev/null +++ b/dhall/tests/type-errors/unit/AssertDoubleZeros.txt @@ -0,0 +1 @@ +Type error: Unhandled error -- cgit v1.2.3