summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to 'dhall')
-rw-r--r--dhall/tests/common/mod.rs (renamed from dhall/tests/macros.rs)3
-rw-r--r--dhall/tests/normalization.rs (renamed from dhall/tests/tests.rs)238
-rw-r--r--dhall/tests/parser.rs70
-rw-r--r--dhall/tests/typecheck.rs168
4 files changed, 241 insertions, 238 deletions
diff --git a/dhall/tests/macros.rs b/dhall/tests/common/mod.rs
index b67f720..b60262b 100644
--- a/dhall/tests/macros.rs
+++ b/dhall/tests/common/mod.rs
@@ -23,7 +23,7 @@ macro_rules! make_spec_test {
#[test]
#[allow(non_snake_case)]
fn $name() {
- use crate::macros::*;
+ use crate::common::*;
use std::thread;
// The parser stack overflows even on small files
@@ -44,6 +44,7 @@ use dhall::*;
use dhall_core::*;
use std::path::PathBuf;
+#[allow(dead_code)]
pub enum Feature {
ParserSuccess,
ParserFailure,
diff --git a/dhall/tests/tests.rs b/dhall/tests/normalization.rs
index f431341..243cf24 100644
--- a/dhall/tests/tests.rs
+++ b/dhall/tests/normalization.rs
@@ -1,32 +1,12 @@
#![feature(custom_inner_attributes)]
#![rustfmt::skip]
-mod macros;
+mod common;
-macro_rules! parser_success {
- ($name:ident, $path:expr) => {
- make_spec_test!(ParserSuccess, $name, $path);
- };
-}
-macro_rules! parser_failure {
- ($name:ident, $path:expr) => {
- make_spec_test!(ParserFailure, $name, $path);
- };
-}
macro_rules! norm {
($name:ident, $path:expr) => {
make_spec_test!(Normalization, $name, $path);
};
}
-macro_rules! tc_success {
- ($name:ident, $path:expr) => {
- make_spec_test!(TypecheckSuccess, $name, $path);
- };
-}
-macro_rules! tc_failure {
- ($name:ident, $path:expr) => {
- make_spec_test!(TypecheckFailure, $name, $path);
- };
-}
norm!(spec_normalization_success_haskell_tutorial_access_0, "haskell-tutorial/access/0");
// norm!(spec_normalization_success_haskell_tutorial_access_1, "haskell-tutorial/access/1");
@@ -364,219 +344,3 @@ norm!(spec_normalization_success_unit_UnionType, "unit/UnionType");
norm!(spec_normalization_success_unit_UnionTypeEmpty, "unit/UnionTypeEmpty");
norm!(spec_normalization_success_unit_UnionTypeNormalizeArguments, "unit/UnionTypeNormalizeArguments");
norm!(spec_normalization_success_unit_Variable, "unit/Variable");
-
-
-
-parser_success!(spec_parser_success_annotations, "annotations");
-// parser_success!(spec_parser_success_asText, "asText");
-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_doubleQuotedString, "doubleQuotedString");
-// parser_success!(spec_parser_success_environmentVariables, "environmentVariables");
-// parser_success!(spec_parser_success_escapedDoubleQuotedString, "escapedDoubleQuotedString");
-parser_success!(spec_parser_success_escapedSingleQuotedString, "escapedSingleQuotedString");
-parser_success!(spec_parser_success_fields, "fields");
-parser_success!(spec_parser_success_forall, "forall");
-parser_success!(spec_parser_success_functionType, "functionType");
-parser_success!(spec_parser_success_identifier, "identifier");
-parser_success!(spec_parser_success_ifThenElse, "ifThenElse");
-// parser_success!(spec_parser_success_importAlt, "importAlt");
-parser_success!(spec_parser_success_interpolatedDoubleQuotedString, "interpolatedDoubleQuotedString");
-parser_success!(spec_parser_success_interpolatedSingleQuotedString, "interpolatedSingleQuotedString");
-parser_success!(spec_parser_success_label, "label");
-parser_success!(spec_parser_success_lambda, "lambda");
-// parser_success!(spec_parser_success_largeExpression, "largeExpression");
-parser_success!(spec_parser_success_let, "let");
-parser_success!(spec_parser_success_lineComment, "lineComment");
-parser_success!(spec_parser_success_list, "list");
-parser_success!(spec_parser_success_merge, "merge");
-parser_success!(spec_parser_success_multilet, "multilet");
-parser_success!(spec_parser_success_natural, "natural");
-parser_success!(spec_parser_success_nestedBlockComment, "nestedBlockComment");
-parser_success!(spec_parser_success_operators, "operators");
-// parser_success!(spec_parser_success_parenthesizeUsing, "parenthesizeUsing");
-// parser_success!(spec_parser_success_pathTermination, "pathTermination");
-// parser_success!(spec_parser_success_paths, "paths");
-// parser_success!(spec_parser_success_quotedLabel, "quotedLabel");
-// parser_success!(spec_parser_success_quotedPaths, "quotedPaths");
-parser_success!(spec_parser_success_record, "record");
-parser_success!(spec_parser_success_reservedPrefix, "reservedPrefix");
-parser_success!(spec_parser_success_singleQuotedString, "singleQuotedString");
-parser_success!(spec_parser_success_sort, "sort");
-parser_success!(spec_parser_success_template, "template");
-parser_success!(spec_parser_success_unicodeComment, "unicodeComment");
-parser_success!(spec_parser_success_unicodeDoubleQuotedString, "unicodeDoubleQuotedString");
-// parser_success!(spec_parser_success_unicodePaths, "unicodePaths");
-parser_success!(spec_parser_success_union, "union");
-// parser_success!(spec_parser_success_urls, "urls");
-parser_success!(spec_parser_success_whitespace, "whitespace");
-parser_success!(spec_parser_success_whitespaceBuffet, "whitespaceBuffet");
-
-parser_failure!(spec_parser_failure_annotation, "annotation");
-// parser_failure!(spec_parser_failure_doubleBoundsNeg, "doubleBoundsNeg");
-// parser_failure!(spec_parser_failure_doubleBoundsPos, "doubleBoundsPos");
-parser_failure!(spec_parser_failure_importAccess, "importAccess");
-parser_failure!(spec_parser_failure_incompleteIf, "incompleteIf");
-parser_failure!(spec_parser_failure_mandatoryNewline, "mandatoryNewline");
-parser_failure!(spec_parser_failure_missingSpace, "missingSpace");
-// parser_failure!(spec_parser_failure_spaceAfterListAppend, "spaceAfterListAppend");
-
-
-// tc_success!(spec_typecheck_success_accessEncodedType, "accessEncodedType");
-// tc_success!(spec_typecheck_success_accessType, "accessType");
-tc_success!(spec_typecheck_success_prelude_Bool_and_0, "prelude/Bool/and/0");
-tc_success!(spec_typecheck_success_prelude_Bool_and_1, "prelude/Bool/and/1");
-tc_success!(spec_typecheck_success_prelude_Bool_build_0, "prelude/Bool/build/0");
-tc_success!(spec_typecheck_success_prelude_Bool_build_1, "prelude/Bool/build/1");
-tc_success!(spec_typecheck_success_prelude_Bool_even_0, "prelude/Bool/even/0");
-tc_success!(spec_typecheck_success_prelude_Bool_even_1, "prelude/Bool/even/1");
-tc_success!(spec_typecheck_success_prelude_Bool_even_2, "prelude/Bool/even/2");
-tc_success!(spec_typecheck_success_prelude_Bool_even_3, "prelude/Bool/even/3");
-tc_success!(spec_typecheck_success_prelude_Bool_fold_0, "prelude/Bool/fold/0");
-tc_success!(spec_typecheck_success_prelude_Bool_fold_1, "prelude/Bool/fold/1");
-tc_success!(spec_typecheck_success_prelude_Bool_not_0, "prelude/Bool/not/0");
-tc_success!(spec_typecheck_success_prelude_Bool_not_1, "prelude/Bool/not/1");
-tc_success!(spec_typecheck_success_prelude_Bool_odd_0, "prelude/Bool/odd/0");
-tc_success!(spec_typecheck_success_prelude_Bool_odd_1, "prelude/Bool/odd/1");
-tc_success!(spec_typecheck_success_prelude_Bool_odd_2, "prelude/Bool/odd/2");
-tc_success!(spec_typecheck_success_prelude_Bool_odd_3, "prelude/Bool/odd/3");
-tc_success!(spec_typecheck_success_prelude_Bool_or_0, "prelude/Bool/or/0");
-tc_success!(spec_typecheck_success_prelude_Bool_or_1, "prelude/Bool/or/1");
-tc_success!(spec_typecheck_success_prelude_Bool_show_0, "prelude/Bool/show/0");
-tc_success!(spec_typecheck_success_prelude_Bool_show_1, "prelude/Bool/show/1");
-// tc_success!(spec_typecheck_success_prelude_Double_show_0, "prelude/Double/show/0");
-// tc_success!(spec_typecheck_success_prelude_Double_show_1, "prelude/Double/show/1");
-// tc_success!(spec_typecheck_success_prelude_Integer_show_0, "prelude/Integer/show/0");
-// tc_success!(spec_typecheck_success_prelude_Integer_show_1, "prelude/Integer/show/1");
-// tc_success!(spec_typecheck_success_prelude_Integer_toDouble_0, "prelude/Integer/toDouble/0");
-// tc_success!(spec_typecheck_success_prelude_Integer_toDouble_1, "prelude/Integer/toDouble/1");
-tc_success!(spec_typecheck_success_prelude_List_all_0, "prelude/List/all/0");
-tc_success!(spec_typecheck_success_prelude_List_all_1, "prelude/List/all/1");
-tc_success!(spec_typecheck_success_prelude_List_any_0, "prelude/List/any/0");
-tc_success!(spec_typecheck_success_prelude_List_any_1, "prelude/List/any/1");
-tc_success!(spec_typecheck_success_prelude_List_build_0, "prelude/List/build/0");
-tc_success!(spec_typecheck_success_prelude_List_build_1, "prelude/List/build/1");
-tc_success!(spec_typecheck_success_prelude_List_concat_0, "prelude/List/concat/0");
-tc_success!(spec_typecheck_success_prelude_List_concat_1, "prelude/List/concat/1");
-tc_success!(spec_typecheck_success_prelude_List_concatMap_0, "prelude/List/concatMap/0");
-tc_success!(spec_typecheck_success_prelude_List_concatMap_1, "prelude/List/concatMap/1");
-tc_success!(spec_typecheck_success_prelude_List_filter_0, "prelude/List/filter/0");
-tc_success!(spec_typecheck_success_prelude_List_filter_1, "prelude/List/filter/1");
-tc_success!(spec_typecheck_success_prelude_List_fold_0, "prelude/List/fold/0");
-tc_success!(spec_typecheck_success_prelude_List_fold_1, "prelude/List/fold/1");
-tc_success!(spec_typecheck_success_prelude_List_fold_2, "prelude/List/fold/2");
-tc_success!(spec_typecheck_success_prelude_List_generate_0, "prelude/List/generate/0");
-tc_success!(spec_typecheck_success_prelude_List_generate_1, "prelude/List/generate/1");
-tc_success!(spec_typecheck_success_prelude_List_head_0, "prelude/List/head/0");
-tc_success!(spec_typecheck_success_prelude_List_head_1, "prelude/List/head/1");
-tc_success!(spec_typecheck_success_prelude_List_indexed_0, "prelude/List/indexed/0");
-tc_success!(spec_typecheck_success_prelude_List_indexed_1, "prelude/List/indexed/1");
-tc_success!(spec_typecheck_success_prelude_List_iterate_0, "prelude/List/iterate/0");
-tc_success!(spec_typecheck_success_prelude_List_iterate_1, "prelude/List/iterate/1");
-tc_success!(spec_typecheck_success_prelude_List_last_0, "prelude/List/last/0");
-tc_success!(spec_typecheck_success_prelude_List_last_1, "prelude/List/last/1");
-tc_success!(spec_typecheck_success_prelude_List_length_0, "prelude/List/length/0");
-tc_success!(spec_typecheck_success_prelude_List_length_1, "prelude/List/length/1");
-tc_success!(spec_typecheck_success_prelude_List_map_0, "prelude/List/map/0");
-tc_success!(spec_typecheck_success_prelude_List_map_1, "prelude/List/map/1");
-tc_success!(spec_typecheck_success_prelude_List_null_0, "prelude/List/null/0");
-tc_success!(spec_typecheck_success_prelude_List_null_1, "prelude/List/null/1");
-tc_success!(spec_typecheck_success_prelude_List_replicate_0, "prelude/List/replicate/0");
-tc_success!(spec_typecheck_success_prelude_List_replicate_1, "prelude/List/replicate/1");
-tc_success!(spec_typecheck_success_prelude_List_reverse_0, "prelude/List/reverse/0");
-tc_success!(spec_typecheck_success_prelude_List_reverse_1, "prelude/List/reverse/1");
-tc_success!(spec_typecheck_success_prelude_List_shifted_0, "prelude/List/shifted/0");
-tc_success!(spec_typecheck_success_prelude_List_shifted_1, "prelude/List/shifted/1");
-tc_success!(spec_typecheck_success_prelude_List_unzip_0, "prelude/List/unzip/0");
-tc_success!(spec_typecheck_success_prelude_List_unzip_1, "prelude/List/unzip/1");
-// tc_success!(spec_typecheck_success_prelude_Monoid_00, "prelude/Monoid/00");
-// tc_success!(spec_typecheck_success_prelude_Monoid_01, "prelude/Monoid/01");
-// tc_success!(spec_typecheck_success_prelude_Monoid_02, "prelude/Monoid/02");
-// tc_success!(spec_typecheck_success_prelude_Monoid_03, "prelude/Monoid/03");
-// tc_success!(spec_typecheck_success_prelude_Monoid_04, "prelude/Monoid/04");
-// tc_success!(spec_typecheck_success_prelude_Monoid_05, "prelude/Monoid/05");
-// tc_success!(spec_typecheck_success_prelude_Monoid_06, "prelude/Monoid/06");
-// tc_success!(spec_typecheck_success_prelude_Monoid_07, "prelude/Monoid/07");
-// tc_success!(spec_typecheck_success_prelude_Monoid_08, "prelude/Monoid/08");
-// tc_success!(spec_typecheck_success_prelude_Monoid_09, "prelude/Monoid/09");
-// tc_success!(spec_typecheck_success_prelude_Monoid_10, "prelude/Monoid/10");
-tc_success!(spec_typecheck_success_prelude_Natural_build_0, "prelude/Natural/build/0");
-tc_success!(spec_typecheck_success_prelude_Natural_build_1, "prelude/Natural/build/1");
-tc_success!(spec_typecheck_success_prelude_Natural_enumerate_0, "prelude/Natural/enumerate/0");
-tc_success!(spec_typecheck_success_prelude_Natural_enumerate_1, "prelude/Natural/enumerate/1");
-tc_success!(spec_typecheck_success_prelude_Natural_even_0, "prelude/Natural/even/0");
-tc_success!(spec_typecheck_success_prelude_Natural_even_1, "prelude/Natural/even/1");
-tc_success!(spec_typecheck_success_prelude_Natural_fold_0, "prelude/Natural/fold/0");
-tc_success!(spec_typecheck_success_prelude_Natural_fold_1, "prelude/Natural/fold/1");
-tc_success!(spec_typecheck_success_prelude_Natural_fold_2, "prelude/Natural/fold/2");
-tc_success!(spec_typecheck_success_prelude_Natural_isZero_0, "prelude/Natural/isZero/0");
-tc_success!(spec_typecheck_success_prelude_Natural_isZero_1, "prelude/Natural/isZero/1");
-tc_success!(spec_typecheck_success_prelude_Natural_odd_0, "prelude/Natural/odd/0");
-tc_success!(spec_typecheck_success_prelude_Natural_odd_1, "prelude/Natural/odd/1");
-tc_success!(spec_typecheck_success_prelude_Natural_product_0, "prelude/Natural/product/0");
-tc_success!(spec_typecheck_success_prelude_Natural_product_1, "prelude/Natural/product/1");
-// tc_success!(spec_typecheck_success_prelude_Natural_show_0, "prelude/Natural/show/0");
-// tc_success!(spec_typecheck_success_prelude_Natural_show_1, "prelude/Natural/show/1");
-tc_success!(spec_typecheck_success_prelude_Natural_sum_0, "prelude/Natural/sum/0");
-tc_success!(spec_typecheck_success_prelude_Natural_sum_1, "prelude/Natural/sum/1");
-// tc_success!(spec_typecheck_success_prelude_Natural_toDouble_0, "prelude/Natural/toDouble/0");
-// tc_success!(spec_typecheck_success_prelude_Natural_toDouble_1, "prelude/Natural/toDouble/1");
-// tc_success!(spec_typecheck_success_prelude_Natural_toInteger_0, "prelude/Natural/toInteger/0");
-// tc_success!(spec_typecheck_success_prelude_Natural_toInteger_1, "prelude/Natural/toInteger/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_all_0, "prelude/Optional/all/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_all_1, "prelude/Optional/all/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_any_0, "prelude/Optional/any/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_any_1, "prelude/Optional/any/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_build_0, "prelude/Optional/build/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_build_1, "prelude/Optional/build/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_concat_0, "prelude/Optional/concat/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_concat_1, "prelude/Optional/concat/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_concat_2, "prelude/Optional/concat/2");
-// tc_success!(spec_typecheck_success_prelude_Optional_filter_0, "prelude/Optional/filter/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_filter_1, "prelude/Optional/filter/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_fold_0, "prelude/Optional/fold/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_fold_1, "prelude/Optional/fold/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_head_0, "prelude/Optional/head/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_head_1, "prelude/Optional/head/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_head_2, "prelude/Optional/head/2");
-// tc_success!(spec_typecheck_success_prelude_Optional_last_0, "prelude/Optional/last/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_last_1, "prelude/Optional/last/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_last_2, "prelude/Optional/last/2");
-// tc_success!(spec_typecheck_success_prelude_Optional_length_0, "prelude/Optional/length/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_length_1, "prelude/Optional/length/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_map_0, "prelude/Optional/map/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_map_1, "prelude/Optional/map/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_null_0, "prelude/Optional/null/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_null_1, "prelude/Optional/null/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_toList_0, "prelude/Optional/toList/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_toList_1, "prelude/Optional/toList/1");
-// tc_success!(spec_typecheck_success_prelude_Optional_unzip_0, "prelude/Optional/unzip/0");
-// tc_success!(spec_typecheck_success_prelude_Optional_unzip_1, "prelude/Optional/unzip/1");
-tc_success!(spec_typecheck_success_prelude_Text_concat_0, "prelude/Text/concat/0");
-tc_success!(spec_typecheck_success_prelude_Text_concat_1, "prelude/Text/concat/1");
-tc_success!(spec_typecheck_success_prelude_Text_concatMap_0, "prelude/Text/concatMap/0");
-tc_success!(spec_typecheck_success_prelude_Text_concatMap_1, "prelude/Text/concatMap/1");
-// tc_success!(spec_typecheck_success_prelude_Text_concatMapSep_0, "prelude/Text/concatMapSep/0");
-// tc_success!(spec_typecheck_success_prelude_Text_concatMapSep_1, "prelude/Text/concatMapSep/1");
-// tc_success!(spec_typecheck_success_prelude_Text_concatSep_0, "prelude/Text/concatSep/0");
-// tc_success!(spec_typecheck_success_prelude_Text_concatSep_1, "prelude/Text/concatSep/1");
-// tc_success!(spec_typecheck_success_recordOfRecordOfTypes, "recordOfRecordOfTypes");
-// tc_success!(spec_typecheck_success_recordOfTypes, "recordOfTypes");
-// tc_success!(spec_typecheck_success_simple_access_0, "simple/access/0");
-// tc_success!(spec_typecheck_success_simple_access_1, "simple/access/1");
-// tc_success!(spec_typecheck_success_simple_alternativesAreTypes, "simple/alternativesAreTypes");
-// tc_success!(spec_typecheck_success_simple_anonymousFunctionsInTypes, "simple/anonymousFunctionsInTypes");
-// tc_success!(spec_typecheck_success_simple_fieldsAreTypes, "simple/fieldsAreTypes");
-// tc_success!(spec_typecheck_success_simple_kindParameter, "simple/kindParameter");
-// tc_success!(spec_typecheck_success_simple_mergeEquivalence, "simple/mergeEquivalence");
-// tc_success!(spec_typecheck_success_simple_mixedFieldAccess, "simple/mixedFieldAccess");
-// tc_success!(spec_typecheck_success_simple_unionsOfTypes, "simple/unionsOfTypes");
-
-// tc_failure!(spec_typecheck_failure_combineMixedRecords, "combineMixedRecords");
-// tc_failure!(spec_typecheck_failure_duplicateFields, "duplicateFields");
-tc_failure!(spec_typecheck_failure_hurkensParadox, "hurkensParadox");
-// tc_failure!(spec_typecheck_failure_mixedUnions, "mixedUnions");
-// tc_failure!(spec_typecheck_failure_preferMixedRecords, "preferMixedRecords");
-
diff --git a/dhall/tests/parser.rs b/dhall/tests/parser.rs
new file mode 100644
index 0000000..678c198
--- /dev/null
+++ b/dhall/tests/parser.rs
@@ -0,0 +1,70 @@
+#![feature(custom_inner_attributes)]
+#![rustfmt::skip]
+mod common;
+
+macro_rules! parser_success {
+ ($name:ident, $path:expr) => {
+ make_spec_test!(ParserSuccess, $name, $path);
+ };
+}
+macro_rules! parser_failure {
+ ($name:ident, $path:expr) => {
+ make_spec_test!(ParserFailure, $name, $path);
+ };
+}
+
+parser_success!(spec_parser_success_annotations, "annotations");
+// parser_success!(spec_parser_success_asText, "asText");
+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_doubleQuotedString, "doubleQuotedString");
+// parser_success!(spec_parser_success_environmentVariables, "environmentVariables");
+// parser_success!(spec_parser_success_escapedDoubleQuotedString, "escapedDoubleQuotedString");
+parser_success!(spec_parser_success_escapedSingleQuotedString, "escapedSingleQuotedString");
+parser_success!(spec_parser_success_fields, "fields");
+parser_success!(spec_parser_success_forall, "forall");
+parser_success!(spec_parser_success_functionType, "functionType");
+parser_success!(spec_parser_success_identifier, "identifier");
+parser_success!(spec_parser_success_ifThenElse, "ifThenElse");
+// parser_success!(spec_parser_success_importAlt, "importAlt");
+parser_success!(spec_parser_success_interpolatedDoubleQuotedString, "interpolatedDoubleQuotedString");
+parser_success!(spec_parser_success_interpolatedSingleQuotedString, "interpolatedSingleQuotedString");
+parser_success!(spec_parser_success_label, "label");
+parser_success!(spec_parser_success_lambda, "lambda");
+// parser_success!(spec_parser_success_largeExpression, "largeExpression");
+parser_success!(spec_parser_success_let, "let");
+parser_success!(spec_parser_success_lineComment, "lineComment");
+parser_success!(spec_parser_success_list, "list");
+parser_success!(spec_parser_success_merge, "merge");
+parser_success!(spec_parser_success_multilet, "multilet");
+parser_success!(spec_parser_success_natural, "natural");
+parser_success!(spec_parser_success_nestedBlockComment, "nestedBlockComment");
+parser_success!(spec_parser_success_operators, "operators");
+// parser_success!(spec_parser_success_parenthesizeUsing, "parenthesizeUsing");
+// parser_success!(spec_parser_success_pathTermination, "pathTermination");
+// parser_success!(spec_parser_success_paths, "paths");
+// parser_success!(spec_parser_success_quotedLabel, "quotedLabel");
+// parser_success!(spec_parser_success_quotedPaths, "quotedPaths");
+parser_success!(spec_parser_success_record, "record");
+parser_success!(spec_parser_success_reservedPrefix, "reservedPrefix");
+parser_success!(spec_parser_success_singleQuotedString, "singleQuotedString");
+parser_success!(spec_parser_success_sort, "sort");
+parser_success!(spec_parser_success_template, "template");
+parser_success!(spec_parser_success_unicodeComment, "unicodeComment");
+parser_success!(spec_parser_success_unicodeDoubleQuotedString, "unicodeDoubleQuotedString");
+// parser_success!(spec_parser_success_unicodePaths, "unicodePaths");
+parser_success!(spec_parser_success_union, "union");
+// parser_success!(spec_parser_success_urls, "urls");
+parser_success!(spec_parser_success_whitespace, "whitespace");
+parser_success!(spec_parser_success_whitespaceBuffet, "whitespaceBuffet");
+
+parser_failure!(spec_parser_failure_annotation, "annotation");
+// parser_failure!(spec_parser_failure_doubleBoundsNeg, "doubleBoundsNeg");
+// parser_failure!(spec_parser_failure_doubleBoundsPos, "doubleBoundsPos");
+parser_failure!(spec_parser_failure_importAccess, "importAccess");
+parser_failure!(spec_parser_failure_incompleteIf, "incompleteIf");
+parser_failure!(spec_parser_failure_mandatoryNewline, "mandatoryNewline");
+parser_failure!(spec_parser_failure_missingSpace, "missingSpace");
+// parser_failure!(spec_parser_failure_spaceAfterListAppend, "spaceAfterListAppend");
diff --git a/dhall/tests/typecheck.rs b/dhall/tests/typecheck.rs
new file mode 100644
index 0000000..875b14a
--- /dev/null
+++ b/dhall/tests/typecheck.rs
@@ -0,0 +1,168 @@
+#![feature(custom_inner_attributes)]
+#![rustfmt::skip]
+mod common;
+
+macro_rules! tc_success {
+ ($name:ident, $path:expr) => {
+ make_spec_test!(TypecheckSuccess, $name, $path);
+ };
+}
+macro_rules! tc_failure {
+ ($name:ident, $path:expr) => {
+ make_spec_test!(TypecheckFailure, $name, $path);
+ };
+}
+
+// tc_success!(spec_typecheck_success_accessEncodedType, "accessEncodedType");
+// tc_success!(spec_typecheck_success_accessType, "accessType");
+tc_success!(spec_typecheck_success_prelude_Bool_and_0, "prelude/Bool/and/0");
+tc_success!(spec_typecheck_success_prelude_Bool_and_1, "prelude/Bool/and/1");
+tc_success!(spec_typecheck_success_prelude_Bool_build_0, "prelude/Bool/build/0");
+tc_success!(spec_typecheck_success_prelude_Bool_build_1, "prelude/Bool/build/1");
+tc_success!(spec_typecheck_success_prelude_Bool_even_0, "prelude/Bool/even/0");
+tc_success!(spec_typecheck_success_prelude_Bool_even_1, "prelude/Bool/even/1");
+tc_success!(spec_typecheck_success_prelude_Bool_even_2, "prelude/Bool/even/2");
+tc_success!(spec_typecheck_success_prelude_Bool_even_3, "prelude/Bool/even/3");
+tc_success!(spec_typecheck_success_prelude_Bool_fold_0, "prelude/Bool/fold/0");
+tc_success!(spec_typecheck_success_prelude_Bool_fold_1, "prelude/Bool/fold/1");
+tc_success!(spec_typecheck_success_prelude_Bool_not_0, "prelude/Bool/not/0");
+tc_success!(spec_typecheck_success_prelude_Bool_not_1, "prelude/Bool/not/1");
+tc_success!(spec_typecheck_success_prelude_Bool_odd_0, "prelude/Bool/odd/0");
+tc_success!(spec_typecheck_success_prelude_Bool_odd_1, "prelude/Bool/odd/1");
+tc_success!(spec_typecheck_success_prelude_Bool_odd_2, "prelude/Bool/odd/2");
+tc_success!(spec_typecheck_success_prelude_Bool_odd_3, "prelude/Bool/odd/3");
+tc_success!(spec_typecheck_success_prelude_Bool_or_0, "prelude/Bool/or/0");
+tc_success!(spec_typecheck_success_prelude_Bool_or_1, "prelude/Bool/or/1");
+tc_success!(spec_typecheck_success_prelude_Bool_show_0, "prelude/Bool/show/0");
+tc_success!(spec_typecheck_success_prelude_Bool_show_1, "prelude/Bool/show/1");
+// tc_success!(spec_typecheck_success_prelude_Double_show_0, "prelude/Double/show/0");
+// tc_success!(spec_typecheck_success_prelude_Double_show_1, "prelude/Double/show/1");
+// tc_success!(spec_typecheck_success_prelude_Integer_show_0, "prelude/Integer/show/0");
+// tc_success!(spec_typecheck_success_prelude_Integer_show_1, "prelude/Integer/show/1");
+// tc_success!(spec_typecheck_success_prelude_Integer_toDouble_0, "prelude/Integer/toDouble/0");
+// tc_success!(spec_typecheck_success_prelude_Integer_toDouble_1, "prelude/Integer/toDouble/1");
+tc_success!(spec_typecheck_success_prelude_List_all_0, "prelude/List/all/0");
+tc_success!(spec_typecheck_success_prelude_List_all_1, "prelude/List/all/1");
+tc_success!(spec_typecheck_success_prelude_List_any_0, "prelude/List/any/0");
+tc_success!(spec_typecheck_success_prelude_List_any_1, "prelude/List/any/1");
+tc_success!(spec_typecheck_success_prelude_List_build_0, "prelude/List/build/0");
+tc_success!(spec_typecheck_success_prelude_List_build_1, "prelude/List/build/1");
+tc_success!(spec_typecheck_success_prelude_List_concat_0, "prelude/List/concat/0");
+tc_success!(spec_typecheck_success_prelude_List_concat_1, "prelude/List/concat/1");
+tc_success!(spec_typecheck_success_prelude_List_concatMap_0, "prelude/List/concatMap/0");
+tc_success!(spec_typecheck_success_prelude_List_concatMap_1, "prelude/List/concatMap/1");
+tc_success!(spec_typecheck_success_prelude_List_filter_0, "prelude/List/filter/0");
+tc_success!(spec_typecheck_success_prelude_List_filter_1, "prelude/List/filter/1");
+tc_success!(spec_typecheck_success_prelude_List_fold_0, "prelude/List/fold/0");
+tc_success!(spec_typecheck_success_prelude_List_fold_1, "prelude/List/fold/1");
+tc_success!(spec_typecheck_success_prelude_List_fold_2, "prelude/List/fold/2");
+tc_success!(spec_typecheck_success_prelude_List_generate_0, "prelude/List/generate/0");
+tc_success!(spec_typecheck_success_prelude_List_generate_1, "prelude/List/generate/1");
+tc_success!(spec_typecheck_success_prelude_List_head_0, "prelude/List/head/0");
+tc_success!(spec_typecheck_success_prelude_List_head_1, "prelude/List/head/1");
+tc_success!(spec_typecheck_success_prelude_List_indexed_0, "prelude/List/indexed/0");
+tc_success!(spec_typecheck_success_prelude_List_indexed_1, "prelude/List/indexed/1");
+tc_success!(spec_typecheck_success_prelude_List_iterate_0, "prelude/List/iterate/0");
+tc_success!(spec_typecheck_success_prelude_List_iterate_1, "prelude/List/iterate/1");
+tc_success!(spec_typecheck_success_prelude_List_last_0, "prelude/List/last/0");
+tc_success!(spec_typecheck_success_prelude_List_last_1, "prelude/List/last/1");
+tc_success!(spec_typecheck_success_prelude_List_length_0, "prelude/List/length/0");
+tc_success!(spec_typecheck_success_prelude_List_length_1, "prelude/List/length/1");
+tc_success!(spec_typecheck_success_prelude_List_map_0, "prelude/List/map/0");
+tc_success!(spec_typecheck_success_prelude_List_map_1, "prelude/List/map/1");
+tc_success!(spec_typecheck_success_prelude_List_null_0, "prelude/List/null/0");
+tc_success!(spec_typecheck_success_prelude_List_null_1, "prelude/List/null/1");
+tc_success!(spec_typecheck_success_prelude_List_replicate_0, "prelude/List/replicate/0");
+tc_success!(spec_typecheck_success_prelude_List_replicate_1, "prelude/List/replicate/1");
+tc_success!(spec_typecheck_success_prelude_List_reverse_0, "prelude/List/reverse/0");
+tc_success!(spec_typecheck_success_prelude_List_reverse_1, "prelude/List/reverse/1");
+tc_success!(spec_typecheck_success_prelude_List_shifted_0, "prelude/List/shifted/0");
+tc_success!(spec_typecheck_success_prelude_List_shifted_1, "prelude/List/shifted/1");
+tc_success!(spec_typecheck_success_prelude_List_unzip_0, "prelude/List/unzip/0");
+tc_success!(spec_typecheck_success_prelude_List_unzip_1, "prelude/List/unzip/1");
+// tc_success!(spec_typecheck_success_prelude_Monoid_00, "prelude/Monoid/00");
+// tc_success!(spec_typecheck_success_prelude_Monoid_01, "prelude/Monoid/01");
+// tc_success!(spec_typecheck_success_prelude_Monoid_02, "prelude/Monoid/02");
+// tc_success!(spec_typecheck_success_prelude_Monoid_03, "prelude/Monoid/03");
+// tc_success!(spec_typecheck_success_prelude_Monoid_04, "prelude/Monoid/04");
+// tc_success!(spec_typecheck_success_prelude_Monoid_05, "prelude/Monoid/05");
+// tc_success!(spec_typecheck_success_prelude_Monoid_06, "prelude/Monoid/06");
+// tc_success!(spec_typecheck_success_prelude_Monoid_07, "prelude/Monoid/07");
+// tc_success!(spec_typecheck_success_prelude_Monoid_08, "prelude/Monoid/08");
+// tc_success!(spec_typecheck_success_prelude_Monoid_09, "prelude/Monoid/09");
+// tc_success!(spec_typecheck_success_prelude_Monoid_10, "prelude/Monoid/10");
+tc_success!(spec_typecheck_success_prelude_Natural_build_0, "prelude/Natural/build/0");
+tc_success!(spec_typecheck_success_prelude_Natural_build_1, "prelude/Natural/build/1");
+tc_success!(spec_typecheck_success_prelude_Natural_enumerate_0, "prelude/Natural/enumerate/0");
+tc_success!(spec_typecheck_success_prelude_Natural_enumerate_1, "prelude/Natural/enumerate/1");
+tc_success!(spec_typecheck_success_prelude_Natural_even_0, "prelude/Natural/even/0");
+tc_success!(spec_typecheck_success_prelude_Natural_even_1, "prelude/Natural/even/1");
+tc_success!(spec_typecheck_success_prelude_Natural_fold_0, "prelude/Natural/fold/0");
+tc_success!(spec_typecheck_success_prelude_Natural_fold_1, "prelude/Natural/fold/1");
+tc_success!(spec_typecheck_success_prelude_Natural_fold_2, "prelude/Natural/fold/2");
+tc_success!(spec_typecheck_success_prelude_Natural_isZero_0, "prelude/Natural/isZero/0");
+tc_success!(spec_typecheck_success_prelude_Natural_isZero_1, "prelude/Natural/isZero/1");
+tc_success!(spec_typecheck_success_prelude_Natural_odd_0, "prelude/Natural/odd/0");
+tc_success!(spec_typecheck_success_prelude_Natural_odd_1, "prelude/Natural/odd/1");
+tc_success!(spec_typecheck_success_prelude_Natural_product_0, "prelude/Natural/product/0");
+tc_success!(spec_typecheck_success_prelude_Natural_product_1, "prelude/Natural/product/1");
+// tc_success!(spec_typecheck_success_prelude_Natural_show_0, "prelude/Natural/show/0");
+// tc_success!(spec_typecheck_success_prelude_Natural_show_1, "prelude/Natural/show/1");
+tc_success!(spec_typecheck_success_prelude_Natural_sum_0, "prelude/Natural/sum/0");
+tc_success!(spec_typecheck_success_prelude_Natural_sum_1, "prelude/Natural/sum/1");
+// tc_success!(spec_typecheck_success_prelude_Natural_toDouble_0, "prelude/Natural/toDouble/0");
+// tc_success!(spec_typecheck_success_prelude_Natural_toDouble_1, "prelude/Natural/toDouble/1");
+// tc_success!(spec_typecheck_success_prelude_Natural_toInteger_0, "prelude/Natural/toInteger/0");
+// tc_success!(spec_typecheck_success_prelude_Natural_toInteger_1, "prelude/Natural/toInteger/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_all_0, "prelude/Optional/all/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_all_1, "prelude/Optional/all/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_any_0, "prelude/Optional/any/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_any_1, "prelude/Optional/any/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_build_0, "prelude/Optional/build/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_build_1, "prelude/Optional/build/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_concat_0, "prelude/Optional/concat/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_concat_1, "prelude/Optional/concat/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_concat_2, "prelude/Optional/concat/2");
+// tc_success!(spec_typecheck_success_prelude_Optional_filter_0, "prelude/Optional/filter/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_filter_1, "prelude/Optional/filter/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_fold_0, "prelude/Optional/fold/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_fold_1, "prelude/Optional/fold/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_head_0, "prelude/Optional/head/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_head_1, "prelude/Optional/head/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_head_2, "prelude/Optional/head/2");
+// tc_success!(spec_typecheck_success_prelude_Optional_last_0, "prelude/Optional/last/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_last_1, "prelude/Optional/last/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_last_2, "prelude/Optional/last/2");
+// tc_success!(spec_typecheck_success_prelude_Optional_length_0, "prelude/Optional/length/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_length_1, "prelude/Optional/length/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_map_0, "prelude/Optional/map/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_map_1, "prelude/Optional/map/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_null_0, "prelude/Optional/null/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_null_1, "prelude/Optional/null/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_toList_0, "prelude/Optional/toList/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_toList_1, "prelude/Optional/toList/1");
+// tc_success!(spec_typecheck_success_prelude_Optional_unzip_0, "prelude/Optional/unzip/0");
+// tc_success!(spec_typecheck_success_prelude_Optional_unzip_1, "prelude/Optional/unzip/1");
+tc_success!(spec_typecheck_success_prelude_Text_concat_0, "prelude/Text/concat/0");
+tc_success!(spec_typecheck_success_prelude_Text_concat_1, "prelude/Text/concat/1");
+tc_success!(spec_typecheck_success_prelude_Text_concatMap_0, "prelude/Text/concatMap/0");
+tc_success!(spec_typecheck_success_prelude_Text_concatMap_1, "prelude/Text/concatMap/1");
+// tc_success!(spec_typecheck_success_prelude_Text_concatMapSep_0, "prelude/Text/concatMapSep/0");
+// tc_success!(spec_typecheck_success_prelude_Text_concatMapSep_1, "prelude/Text/concatMapSep/1");
+// tc_success!(spec_typecheck_success_prelude_Text_concatSep_0, "prelude/Text/concatSep/0");
+// tc_success!(spec_typecheck_success_prelude_Text_concatSep_1, "prelude/Text/concatSep/1");
+// tc_success!(spec_typecheck_success_recordOfRecordOfTypes, "recordOfRecordOfTypes");
+// tc_success!(spec_typecheck_success_recordOfTypes, "recordOfTypes");
+// tc_success!(spec_typecheck_success_simple_access_0, "simple/access/0");
+// tc_success!(spec_typecheck_success_simple_access_1, "simple/access/1");
+// tc_success!(spec_typecheck_success_simple_alternativesAreTypes, "simple/alternativesAreTypes");
+// tc_success!(spec_typecheck_success_simple_anonymousFunctionsInTypes, "simple/anonymousFunctionsInTypes");
+// tc_success!(spec_typecheck_success_simple_fieldsAreTypes, "simple/fieldsAreTypes");
+// tc_success!(spec_typecheck_success_simple_kindParameter, "simple/kindParameter");
+// tc_success!(spec_typecheck_success_simple_mergeEquivalence, "simple/mergeEquivalence");
+// tc_success!(spec_typecheck_success_simple_mixedFieldAccess, "simple/mixedFieldAccess");
+// tc_success!(spec_typecheck_success_simple_unionsOfTypes, "simple/unionsOfTypes");
+
+// tc_failure!(spec_typecheck_failure_combineMixedRecords, "combineMixedRecords");
+// tc_failure!(spec_typecheck_failure_duplicateFields, "duplicateFields");
+tc_failure!(spec_typecheck_failure_hurkensParadox, "hurkensParadox");