summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-12-22 18:38:05 +0000
committerNadrieril2019-12-22 18:38:05 +0000
commit54d7e61ad40682ee24e36288980ee4164ea87c34 (patch)
tree29c2fa76d225fee479a748b5dbdca0f9bb8a4acc
parentfa6de4c077ab4f1c28d2ec64a33a3be8c5a9bb1c (diff)
Update dhall-lang submodule
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