summaryrefslogtreecommitdiff
path: root/dhall/build.rs
diff options
context:
space:
mode:
authorNadrieril Feneanar2019-11-11 17:01:02 +0100
committerGitHub2019-11-11 17:01:02 +0100
commit84cd6f386d6f4c7952fbc1da87dcd754f26ee404 (patch)
treed348f580a00c4b97f04f3a2e41ea2a23d67af824 /dhall/build.rs
parentf58ff637c8d53af1fcee43bfba5a9f8de799084c (diff)
parent8b566b2575096562c2e15d6ac9ee8750db2cf14f (diff)
Merge pull request #114 from Nadrieril/nice-type-errors
Ground work for pretty type errors
Diffstat (limited to 'dhall/build.rs')
-rw-r--r--dhall/build.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index c7d339c..337480f 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -394,5 +394,34 @@ fn main() -> std::io::Result<()> {
},
)?;
+ make_test_module(
+ &mut file,
+ TestFeature {
+ module_name: "type_error",
+ directory: spec_tests_dir.join("type-inference/failure/"),
+ variant: "TypeError",
+ path_filter: |path: &str| {
+ false
+ // TODO: Enable imports in typecheck tests
+ || path == "importBoundary"
+ || path == "customHeadersUsingBoundVariable"
+ // TODO: projection by expression
+ || path == "unit/RecordProjectionByTypeFieldTypeMismatch"
+ || path == "unit/RecordProjectionByTypeNotPresent"
+ // TODO: toMap
+ || path == "unit/EmptyToMap"
+ || path == "unit/HeterogenousToMap"
+ || path == "unit/MistypedToMap1"
+ || path == "unit/MistypedToMap2"
+ || path == "unit/MistypedToMap3"
+ || path == "unit/MistypedToMap4"
+ || path == "unit/NonRecordToMap"
+ || path == "unit/ToMapWrongKind"
+ },
+ input_type: FileType::Text,
+ output_type: None,
+ },
+ )?;
+
Ok(())
}