summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------dhall-lang0
-rw-r--r--dhall/build.rs7
-rw-r--r--dhall/src/syntax/text/printer.rs2
-rw-r--r--dhall/tests/type-errors/unit/AssertDoubleZeros.txt1
4 files changed, 4 insertions, 6 deletions
diff --git a/dhall-lang b/dhall-lang
-Subproject 145798835f4ea7e4b30f1eccd651e9f25cca1e2
+Subproject b760b4183c8c589e3572a7f9e049d60e69ca53d
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