summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md31
-rw-r--r--dhall/build.rs79
-rw-r--r--dhall/src/lib.rs11
-rw-r--r--dhall/src/semantics/tck/typecheck.rs5
-rw-r--r--dhall/src/tests.rs373
-rw-r--r--dhall/tests/binary-decode/failure/unit/ApplyNoArgs.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/LambdaExplicitlyNamedUnderscore.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/ListOneWithAnnotation.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/NaturalNegativeOne.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/OperatorOrTooFewArgs.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/OperatorOrTooManyArgs.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/OperatorUnknownOpcode.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/PiExplicitlyNamedUnderscore.txt1
-rw-r--r--dhall/tests/binary-decode/failure/unit/VariableExplicitlyNamedUnderscore.txt1
-rw-r--r--dhall/tests/import/failure/cycle.txt1
-rw-r--r--dhall/tests/import/failure/importBoundary.txt1
-rw-r--r--dhall/tests/parser/failure/ImportHeadersExteriorHash.txt6
-rw-r--r--dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt6
-rw-r--r--dhall/tests/parser/failure/annotation.txt6
-rw-r--r--dhall/tests/parser/failure/boundBuiltins.txt6
-rw-r--r--dhall/tests/parser/failure/builtinWithIndex.txt6
-rw-r--r--dhall/tests/parser/failure/doubleBoundsNeg.txt6
-rw-r--r--dhall/tests/parser/failure/doubleBoundsPos.txt6
-rw-r--r--dhall/tests/parser/failure/fSomeX.txt6
-rw-r--r--dhall/tests/parser/failure/importAccess.txt6
-rw-r--r--dhall/tests/parser/failure/incompleteIf.txt6
-rw-r--r--dhall/tests/parser/failure/mandatoryNewline.txt6
-rw-r--r--dhall/tests/parser/failure/nonBase16Hash.txt6
-rw-r--r--dhall/tests/parser/failure/nonCharacter.txt6
-rw-r--r--dhall/tests/parser/failure/nonCharacterUnbraced.txt6
-rw-r--r--dhall/tests/parser/failure/nonUtf8.txt1
-rw-r--r--dhall/tests/parser/failure/spacing/AnnotationNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ApplicationNoSpace1.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ApplicationNoSpace2.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/AssertNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ForallNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/HeadersNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/IfNoSpace1.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/IfNoSpace2.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/IfNoSpace3.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ImportAltNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ImportHashedNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/LambdaNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/LetNoSpace1.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/LetNoSpace2.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ListLitEmptyNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/MergeAnnotationNoSpace3.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/MergeNoSpace1.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/MergeNoSpace2.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/NaturalPlusNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/SomeNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ToMapAnnotNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/ToMapNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/surrogatePairUnbraced.txt6
-rw-r--r--dhall/tests/parser/failure/unit/BoolLitTrueWithIndex.txt6
-rw-r--r--dhall/tests/parser/failure/unit/BuiltinBoolWithIndex.txt6
-rw-r--r--dhall/tests/parser/failure/unit/BuiltinTypeWithIndex.txt6
-rw-r--r--dhall/tests/parser/failure/unit/ImportEnvWrongEscape.txt6
-rw-r--r--dhall/tests/parser/failure/unit/ListLitEmptyAnnotation.txt6
-rw-r--r--dhall/tests/parser/failure/unit/ListLitEmptyMissingAnnotation.txt6
-rw-r--r--dhall/tests/parser/failure/unit/MergeAlone.txt6
-rw-r--r--dhall/tests/parser/failure/unit/MergeOneArgument.txt6
-rw-r--r--dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt6
-rw-r--r--dhall/tests/parser/failure/unit/RecordTypeTrailingComma.txt6
-rw-r--r--dhall/tests/parser/failure/unit/SomeAlone.txt6
-rw-r--r--dhall/tests/type-inference/failure/SortInLet.txt (renamed from dhall/tests/type-errors/SortInLet.txt)0
-rw-r--r--dhall/tests/type-inference/failure/hurkensParadox.txt (renamed from dhall/tests/type-errors/hurkensParadox.txt)0
-rw-r--r--dhall/tests/type-inference/failure/mixedUnions.txt (renamed from dhall/tests/type-errors/mixedUnions.txt)0
-rw-r--r--dhall/tests/type-inference/failure/recordOfKind.txt (renamed from dhall/tests/type-errors/recordOfKind.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldName.txt (renamed from dhall/tests/type-errors/unit/AnnotationRecordWrongFieldName.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldType.txt (renamed from dhall/tests/type-errors/unit/AnnotationRecordWrongFieldType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AssertAlphaTrap.txt (renamed from dhall/tests/type-errors/unit/AssertAlphaTrap.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AssertDoubleZeros.txt (renamed from dhall/tests/type-errors/unit/AssertDoubleZeros.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AssertNotEquivalence.txt (renamed from dhall/tests/type-errors/unit/AssertNotEquivalence.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/AssertTriviallyFalse.txt (renamed from dhall/tests/type-errors/unit/AssertTriviallyFalse.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/CompletionMissingRequiredField.txt (renamed from dhall/tests/type-errors/unit/CompletionMissingRequiredField.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/CompletionWithWrongDefaultType.txt (renamed from dhall/tests/type-errors/unit/CompletionWithWrongDefaultType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/CompletionWithWrongFieldName.txt (renamed from dhall/tests/type-errors/unit/CompletionWithWrongFieldName.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/CompletionWithWrongOverridenType.txt (renamed from dhall/tests/type-errors/unit/CompletionWithWrongOverridenType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/EmptyToMap.txt (renamed from dhall/tests/type-errors/unit/EmptyToMap.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/EquivalenceNotSameType.txt (renamed from dhall/tests/type-errors/unit/EquivalenceNotSameType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/EquivalenceNotTerms.txt (renamed from dhall/tests/type-errors/unit/EquivalenceNotTerms.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionApplicationArgumentNotMatch.txt (renamed from dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionApplicationIsNotFunction.txt (renamed from dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionArgumentTypeNotAType.txt (renamed from dhall/tests/type-errors/unit/FunctionArgumentTypeNotAType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionTypeArgumentTypeNotAType.txt (renamed from dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionTypeKindSort.txt (renamed from dhall/tests/type-errors/unit/FunctionTypeKindSort.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionTypeTypeSort.txt (renamed from dhall/tests/type-errors/unit/FunctionTypeTypeSort.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/HeterogenousToMap.txt (renamed from dhall/tests/type-errors/unit/HeterogenousToMap.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/IfBranchesNotMatch.txt (renamed from dhall/tests/type-errors/unit/IfBranchesNotMatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/IfBranchesNotType.txt (renamed from dhall/tests/type-errors/unit/IfBranchesNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/IfNotBool.txt (renamed from dhall/tests/type-errors/unit/IfNotBool.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/LetWithWrongAnnotation.txt (renamed from dhall/tests/type-errors/unit/LetWithWrongAnnotation.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/ListLiteralEmptyNotType.txt (renamed from dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/ListLiteralNotType.txt (renamed from dhall/tests/type-errors/unit/ListLiteralNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/ListLiteralTypesNotMatch.txt (renamed from dhall/tests/type-errors/unit/ListLiteralTypesNotMatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeAlternativeHasNoHandler.txt (renamed from dhall/tests/type-errors/unit/MergeAlternativeHasNoHandler.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeAnnotationMismatch.txt (renamed from dhall/tests/type-errors/unit/MergeAnnotationMismatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeAnnotationNotType.txt (renamed from dhall/tests/type-errors/unit/MergeAnnotationNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation1.txt (renamed from dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation1.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation2.txt (renamed from dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeEmptyWithoutAnnotation.txt (renamed from dhall/tests/type-errors/unit/MergeEmptyWithoutAnnotation.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeHandlerNotFunction.txt (renamed from dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeHandlerNotInUnion.txt (renamed from dhall/tests/type-errors/unit/MergeHandlerNotInUnion.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeHandlerNotMatchAlternativeType.txt (renamed from dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeHandlersWithDifferentType.txt (renamed from dhall/tests/type-errors/unit/MergeHandlersWithDifferentType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeLhsNotRecord.txt (renamed from dhall/tests/type-errors/unit/MergeLhsNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeMissingHandler1.txt (renamed from dhall/tests/type-errors/unit/MergeMissingHandler1.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeMissingHandler2.txt (renamed from dhall/tests/type-errors/unit/MergeMissingHandler2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeRhsNotUnion.txt (renamed from dhall/tests/type-errors/unit/MergeRhsNotUnion.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeUnusedHandler.txt (renamed from dhall/tests/type-errors/unit/MergeUnusedHandler.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MistypedToMap1.txt (renamed from dhall/tests/type-errors/unit/MistypedToMap1.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MistypedToMap2.txt (renamed from dhall/tests/type-errors/unit/MistypedToMap2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MistypedToMap3.txt (renamed from dhall/tests/type-errors/unit/MistypedToMap3.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/MistypedToMap4.txt (renamed from dhall/tests/type-errors/unit/MistypedToMap4.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/NaturalSubtractNotNatural.txt (renamed from dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/NonRecordToMap.txt (renamed from dhall/tests/type-errors/unit/NonRecordToMap.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorAndNotBool.txt (renamed from dhall/tests/type-errors/unit/OperatorAndNotBool.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorEqualNotBool.txt (renamed from dhall/tests/type-errors/unit/OperatorEqualNotBool.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorListConcatenateLhsNotList.txt (renamed from dhall/tests/type-errors/unit/OperatorListConcatenateLhsNotList.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorListConcatenateListsNotMatch.txt (renamed from dhall/tests/type-errors/unit/OperatorListConcatenateListsNotMatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorListConcatenateNotListsButMatch.txt (renamed from dhall/tests/type-errors/unit/OperatorListConcatenateNotListsButMatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorListConcatenateRhsNotList.txt (renamed from dhall/tests/type-errors/unit/OperatorListConcatenateRhsNotList.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorNotEqualNotBool.txt (renamed from dhall/tests/type-errors/unit/OperatorNotEqualNotBool.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorOrNotBool.txt (renamed from dhall/tests/type-errors/unit/OperatorOrNotBool.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorPlusNotNatural.txt (renamed from dhall/tests/type-errors/unit/OperatorPlusNotNatural.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorTextConcatenateLhsNotText.txt (renamed from dhall/tests/type-errors/unit/OperatorTextConcatenateLhsNotText.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorTextConcatenateRhsNotText.txt (renamed from dhall/tests/type-errors/unit/OperatorTextConcatenateRhsNotText.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OperatorTimesNotNatural.txt (renamed from dhall/tests/type-errors/unit/OperatorTimesNotNatural.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxAbsent.txt (renamed from dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxAbsent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxPresent.txt (renamed from dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxPresent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordLitDuplicateFields.txt (renamed from dhall/tests/type-errors/unit/RecordLitDuplicateFields.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt (renamed from dhall/tests/type-errors/unit/RecordMixedKinds3.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionByTypeFieldTypeMismatch.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionByTypeFieldTypeMismatch.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionByTypeNotPresent.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionByTypeNotPresent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionDuplicateFields.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionEmpty.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionEmpty.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionNotPresent.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionNotPresent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordProjectionNotRecord.txt (renamed from dhall/tests/type-errors/unit/RecordProjectionNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordSelectionEmpty.txt (renamed from dhall/tests/type-errors/unit/RecordSelectionEmpty.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordSelectionNotPresent.txt (renamed from dhall/tests/type-errors/unit/RecordSelectionNotPresent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordSelectionNotRecord.txt (renamed from dhall/tests/type-errors/unit/RecordSelectionNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordSelectionTypeNotUnionType.txt (renamed from dhall/tests/type-errors/unit/RecordSelectionTypeNotUnionType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt (renamed from dhall/tests/type-errors/unit/RecordTypeDuplicateFields.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt (renamed from dhall/tests/type-errors/unit/RecordTypeValueMember.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordMergeLhsNotRecord.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordMergeLhsNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordMergeOverlapping.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordMergeOverlapping.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordMergeRhsNotRecord.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordMergeRhsNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeOverlapping.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordTypeMergeOverlapping.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt (renamed from dhall/tests/type-errors/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeLhsNotRecord.txt (renamed from dhall/tests/type-errors/unit/RightBiasedRecordMergeLhsNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt (renamed from dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt (renamed from dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds3.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeRhsNotRecord.txt (renamed from dhall/tests/type-errors/unit/RightBiasedRecordMergeRhsNotRecord.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/SomeNotType.txt (renamed from dhall/tests/type-errors/unit/SomeNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/Sort.txt (renamed from dhall/tests/type-errors/unit/Sort.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/TextLiteralInterpolateNotText.txt (renamed from dhall/tests/type-errors/unit/TextLiteralInterpolateNotText.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/ToMapEmptyInvalidAnnotation.txt (renamed from dhall/tests/type-errors/unit/ToMapEmptyInvalidAnnotation.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/ToMapWrongKind.txt (renamed from dhall/tests/type-errors/unit/ToMapWrongKind.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/TypeAnnotationWrong.txt (renamed from dhall/tests/type-errors/unit/TypeAnnotationWrong.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionConstructorFieldNotPresent.txt (renamed from dhall/tests/type-errors/unit/UnionConstructorFieldNotPresent.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionDeprecatedConstructorsKeyword.txt (renamed from dhall/tests/type-errors/unit/UnionDeprecatedConstructorsKeyword.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt (renamed from dhall/tests/type-errors/unit/UnionTypeDuplicateVariants1.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt (renamed from dhall/tests/type-errors/unit/UnionTypeDuplicateVariants2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt (renamed from dhall/tests/type-errors/unit/UnionTypeMixedKinds.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt (renamed from dhall/tests/type-errors/unit/UnionTypeMixedKinds2.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt (renamed from dhall/tests/type-errors/unit/UnionTypeMixedKinds3.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt (renamed from dhall/tests/type-errors/unit/UnionTypeNotType.txt)0
-rw-r--r--dhall/tests/type-inference/failure/unit/VariableFree.txt (renamed from dhall/tests/type-errors/unit/VariableFree.txt)0
173 files changed, 633 insertions, 184 deletions
diff --git a/README.md b/README.md
index 2c6c5c7..aa5cc61 100644
--- a/README.md
+++ b/README.md
@@ -124,8 +124,39 @@ $ cargo build
$ cargo test
```
+You can also run tests individually by their name:
+
+```bash
+$ cargo test tests::spec::name_of_test
+```
+
Now we can have fun and happy contributing!
+## Test suite
+
+The test suite uses tests from the dhall-lang submodule as well as from the
+local `dhall/tests` directory.
+The various tests are run according to the instructions present in
+[`dhall-lang/tests/README.md`](https://github.com/dhall-lang/dhall-lang/blob/master/tests/README.md).
+
+If an output test file (a `fooB.dhall` file) is missing, we will generate it automatically.
+This is useful when writing new tests. Don't forget to commit it to git !
+
+If a test fails but you prefer the new output, you can run the test with
+`UPDATE_TEST_FILES=1` to overwrite the result file with the new output.
+This happens often with ui tests (see below), since we may want to change the
+phrasing of errors for example.
+
+```bash
+$ UPDATE_TEST_FILES=1 cargo test tests::spec::name_of_test
+```
+
+In addition to the usual dhall tests, we additionally run "ui tests", that
+ensure that the output of the various errors stays good.
+The output of the ui tests is stored in the local `dhall/tests` directory, even
+for the tests coming from dhall-lang. They are stored in a `.txt` file with the
+same name as the corresponding test.
+
## Changelog
- 0.2.1: Improve documentation and deserialize many more types
diff --git a/dhall/build.rs b/dhall/build.rs
index 83c154e..8deb637 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -2,15 +2,19 @@ use std::env;
use std::ffi::OsString;
use std::fs::{read_to_string, File};
use std::io::{BufRead, BufReader, Write};
-use std::path::Path;
+use std::path::{Path, PathBuf};
use walkdir::WalkDir;
use abnf_to_pest::render_rules_to_pest;
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum FileType {
+ /// Dhall source file
Text,
+ /// Dhall binary file
Binary,
+ /// Text file with expected text output
+ UI,
}
impl FileType {
@@ -18,8 +22,23 @@ impl FileType {
match self {
FileType::Text => "dhall",
FileType::Binary => "dhallb",
+ FileType::UI => "txt",
}
}
+ fn constructor(self) -> &'static str {
+ match self {
+ FileType::Text => "TestFile::Source",
+ FileType::Binary => "TestFile::Binary",
+ FileType::UI => "TestFile::UI",
+ }
+ }
+ fn construct(self, path: &str) -> String {
+ // e.g. with
+ // path = "tests/foor/barA"
+ // returns something like:
+ // TestFile::Source("tests/foor/barA.dhall")
+ format!(r#"{}("{}.{}")"#, self.constructor(), path, self.to_ext())
+ }
}
fn dhall_files_in_dir<'a>(
@@ -72,7 +91,8 @@ fn make_test_module(
mut feature: TestFeature,
) -> std::io::Result<()> {
writeln!(w, "mod {} {{", feature.module_name)?;
- let take_ab_suffix = feature.output_type.is_some();
+ let take_ab_suffix = feature.output_type.is_some()
+ && feature.output_type != Some(FileType::UI);
for base_path in base_paths {
let tests_dir = base_path.join(feature.directory);
for (name, path) in
@@ -85,22 +105,26 @@ fn make_test_module(
let path = path.to_string_lossy();
let test = match feature.output_type {
None => {
- let input_file =
- format!("\"{}.{}\"", path, feature.input_type.to_ext());
- format!("{}({})", feature.variant, input_file)
+ let input = feature.input_type.construct(&path);
+ format!("{}({})", feature.variant, input)
}
- Some(output_type) => {
- let input_file = format!(
- "\"{}A.{}\"",
- path,
- feature.input_type.to_ext()
+ Some(output_type @ FileType::UI) => {
+ let input = feature.input_type.construct(&path);
+ // All ui outputs are in the local `tests/` directory.
+ let output_file = PathBuf::from("tests/").join(
+ PathBuf::from(path.as_ref())
+ .strip_prefix(base_path)
+ .unwrap(),
);
- let output_file =
- format!("\"{}B.{}\"", path, output_type.to_ext());
- format!(
- "{}({}, {})",
- feature.variant, input_file, output_file
- )
+ let output =
+ output_type.construct(&output_file.to_str().unwrap());
+ format!("{}({}, {})", feature.variant, input, output)
+ }
+ Some(output_type) => {
+ let input =
+ feature.input_type.construct(&format!("{}A", path));
+ let output = output_type.construct(&format!("{}B", path));
+ format!("{}({}, {})", feature.variant, input, output)
}
};
writeln!(w, "make_spec_test!({}, {});", test, name)?;
@@ -148,7 +172,7 @@ fn generate_tests() -> std::io::Result<()> {
variant: "ParserFailure",
path_filter: Box::new(|_path: &str| false),
input_type: FileType::Text,
- output_type: None,
+ output_type: Some(FileType::UI),
},
TestFeature {
module_name: "printer",
@@ -208,7 +232,7 @@ fn generate_tests() -> std::io::Result<()> {
variant: "BinaryDecodingFailure",
path_filter: Box::new(|_path: &str| false),
input_type: FileType::Binary,
- output_type: None,
+ output_type: Some(FileType::UI),
},
TestFeature {
module_name: "import_success",
@@ -243,7 +267,7 @@ fn generate_tests() -> std::io::Result<()> {
|| path == "customHeadersUsingBoundVariable"
}),
input_type: FileType::Text,
- output_type: None,
+ output_type: Some(FileType::UI),
},
TestFeature {
module_name: "beta_normalize",
@@ -265,6 +289,7 @@ fn generate_tests() -> std::io::Result<()> {
|| path == "prelude/JSON/number/1"
// TODO: doesn't typecheck
|| path == "unit/RightBiasedRecordMergeWithinRecordProjection"
+ || path == "unit/Sort"
// // TODO: Further record simplifications
|| path == "simplifications/rightBiasedMergeWithinRecordProjectionWithinFieldSelection0"
|| path == "simplifications/rightBiasedMergeWithinRecordProjectionWithinFieldSelection1"
@@ -314,19 +339,7 @@ fn generate_tests() -> std::io::Result<()> {
|| path == "unit/MergeHandlerFreeVar"
}),
input_type: FileType::Text,
- output_type: None,
- },
- TestFeature {
- module_name: "type_error",
- directory: "type-inference/failure/",
- variant: "TypeError",
- path_filter: Box::new(|path: &str| {
- false
- // TODO: enable free variable checking
- || path == "unit/MergeHandlerFreeVar"
- }),
- input_type: FileType::Text,
- output_type: None,
+ output_type: Some(FileType::UI),
},
];
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index dbf1fc0..7725b28 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -234,6 +234,17 @@ impl std::hash::Hash for Normalized {
}
}
+impl From<Parsed> for NormalizedExpr {
+ fn from(other: Parsed) -> Self {
+ other.to_expr()
+ }
+}
+impl From<Normalized> for NormalizedExpr {
+ fn from(other: Normalized) -> Self {
+ other.to_expr()
+ }
+}
+
impl Eq for Typed {}
impl PartialEq for Typed {
fn eq(&self, other: &Self) -> bool {
diff --git a/dhall/src/semantics/tck/typecheck.rs b/dhall/src/semantics/tck/typecheck.rs
index 6817712..dd9a8fa 100644
--- a/dhall/src/semantics/tck/typecheck.rs
+++ b/dhall/src/semantics/tck/typecheck.rs
@@ -847,7 +847,10 @@ pub(crate) fn type_with(
/// Typecheck an expression and return the expression annotated with types if type-checking
/// succeeded, or an error if type-checking failed.
pub(crate) fn typecheck(e: &Expr<Normalized>) -> Result<TyExpr, TypeError> {
- type_with(&TyEnv::new(), e)
+ let res = type_with(&TyEnv::new(), e)?;
+ // Ensure that the inferred type exists (i.e. this is not Sort)
+ res.get_type()?;
+ Ok(res)
}
/// Like `typecheck`, but additionally checks that the expression's type matches the provided type.
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 8136625..6a67ddc 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -43,186 +43,259 @@ macro_rules! assert_eq_pretty_str {
};
}
-use std::fs::File;
+use std::env;
+use std::fs::{create_dir_all, read_to_string, File};
use std::io::{Read, Write};
use std::path::PathBuf;
use crate::error::{Error, Result};
-use crate::Parsed;
+use crate::syntax::binary;
+use crate::{Normalized, NormalizedExpr, Parsed, Resolved};
#[allow(dead_code)]
-#[derive(Clone)]
-pub enum Test<'a> {
- ParserSuccess(&'a str, &'a str),
- ParserFailure(&'a str),
- Printer(&'a str, &'a str),
- BinaryEncoding(&'a str, &'a str),
- BinaryDecodingSuccess(&'a str, &'a str),
- BinaryDecodingFailure(&'a str),
- ImportSuccess(&'a str, &'a str),
- ImportFailure(&'a str),
- TypeInferenceSuccess(&'a str, &'a str),
- TypeInferenceFailure(&'a str),
- TypeError(&'a str),
- Normalization(&'a str, &'a str),
- AlphaNormalization(&'a str, &'a str),
+enum Test {
+ ParserSuccess(TestFile, TestFile),
+ ParserFailure(TestFile, TestFile),
+ Printer(TestFile, TestFile),
+ BinaryEncoding(TestFile, TestFile),
+ BinaryDecodingSuccess(TestFile, TestFile),
+ BinaryDecodingFailure(TestFile, TestFile),
+ ImportSuccess(TestFile, TestFile),
+ ImportFailure(TestFile, TestFile),
+ TypeInferenceSuccess(TestFile, TestFile),
+ TypeInferenceFailure(TestFile, TestFile),
+ Normalization(TestFile, TestFile),
+ AlphaNormalization(TestFile, TestFile),
}
-fn parse_file_str(file_path: &str) -> Result<Parsed> {
- Parsed::parse_file(&PathBuf::from(file_path))
+#[allow(dead_code)]
+enum TestFile {
+ Source(&'static str),
+ Binary(&'static str),
+ UI(&'static str),
+}
+
+impl TestFile {
+ pub fn path(&self) -> PathBuf {
+ match self {
+ TestFile::Source(path)
+ | TestFile::Binary(path)
+ | TestFile::UI(path) => PathBuf::from(path),
+ }
+ }
+
+ /// Parse the target file
+ pub fn parse(&self) -> Result<Parsed> {
+ match self {
+ TestFile::Source(_) => Parsed::parse_file(&self.path()),
+ TestFile::Binary(_) => Parsed::parse_binary_file(&self.path()),
+ TestFile::UI(_) => panic!("Can't parse a UI test file"),
+ }
+ }
+ /// Parse and resolve the target file
+ pub fn resolve(&self) -> Result<Resolved> {
+ Ok(self.parse()?.resolve()?)
+ }
+ /// Parse, resolve, tck and normalize the target file
+ pub fn normalize(&self) -> Result<Normalized> {
+ Ok(self.resolve()?.typecheck()?.normalize())
+ }
+
+ /// If UPDATE_TEST_FILES=1, we overwrite the output files with our own output.
+ fn force_update() -> bool {
+ env::var("UPDATE_TEST_FILES") == Ok("1".to_string())
+ }
+ /// Write the provided expression to the pointed file.
+ fn write_expr(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ let expr = expr.into();
+ let path = self.path();
+ create_dir_all(path.parent().unwrap())?;
+ let mut file = File::create(path)?;
+ match self {
+ TestFile::Source(_) => {
+ writeln!(file, "{}", expr)?;
+ }
+ TestFile::Binary(_) => {
+ let expr_data = binary::encode(&expr)?;
+ file.write_all(&expr_data)?;
+ }
+ TestFile::UI(_) => panic!("Can't write an expression to a UI file"),
+ }
+ Ok(())
+ }
+ /// Write the provided error to the pointed file.
+ fn write_ui(&self, err: impl Into<Error>) -> Result<()> {
+ match self {
+ TestFile::UI(_) => {}
+ _ => panic!("Can't write an error to a non-UI file"),
+ }
+ let err = err.into();
+ let path = self.path();
+ create_dir_all(path.parent().unwrap())?;
+ let mut file = File::create(path)?;
+ writeln!(file, "{}", err)?;
+ Ok(())
+ }
+
+ /// Check that the provided expression matches the file contents.
+ pub fn compare(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ let expr = expr.into();
+ if !self.path().is_file() {
+ return self.write_expr(expr);
+ }
+
+ let expected = self.parse()?.to_expr();
+ if expr != expected {
+ if Self::force_update() {
+ self.write_expr(expr)?;
+ } else {
+ assert_eq_display!(expr, expected);
+ }
+ }
+ Ok(())
+ }
+ /// Check that the provided expression matches the file contents.
+ pub fn compare_debug(&self, expr: impl Into<NormalizedExpr>) -> Result<()> {
+ let expr = expr.into();
+ if !self.path().is_file() {
+ return self.write_expr(expr);
+ }
+
+ let expected = self.parse()?.to_expr();
+ if expr != expected {
+ if Self::force_update() {
+ self.write_expr(expr)?;
+ } else {
+ assert_eq_pretty!(expr, expected);
+ }
+ }
+ Ok(())
+ }
+ /// Check that the provided expression matches the file contents.
+ pub fn compare_binary(
+ &self,
+ expr: impl Into<NormalizedExpr>,
+ ) -> Result<()> {
+ let expr = expr.into();
+ match self {
+ TestFile::Binary(_) => {}
+ _ => panic!("This is not a binary file"),
+ }
+ if !self.path().is_file() {
+ return self.write_expr(expr);
+ }
+
+ let expr_data = binary::encode(&expr)?;
+ let expected_data = {
+ let mut data = Vec::new();
+ File::open(&self.path())?.read_to_end(&mut data)?;
+ data
+ };
+
+ // Compare bit-by-bit
+ if expr_data != expected_data {
+ if Self::force_update() {
+ self.write_expr(expr)?;
+ } else {
+ use serde_cbor::de::from_slice;
+ use serde_cbor::value::Value;
+ // Pretty-print difference
+ assert_eq_pretty!(
+ from_slice::<Value>(&expr_data).unwrap(),
+ from_slice::<Value>(&expected_data).unwrap()
+ );
+ // If difference was not visible in the cbor::Value, compare normally.
+ assert_eq!(expr_data, expected_data);
+ }
+ }
+ Ok(())
+ }
+ /// Check that the provided error matches the file contents. Writes to the corresponding file
+ /// if it is missing.
+ pub fn compare_ui(&self, err: impl Into<Error>) -> Result<()> {
+ let err = err.into();
+ if !self.path().is_file() {
+ return self.write_ui(err);
+ }
+
+ let expected = read_to_string(self.path())?;
+ let msg = format!("{}\n", err);
+ if msg != expected {
+ if Self::force_update() {
+ self.write_ui(err)?;
+ } else {
+ assert_eq_pretty_str!(msg, expected);
+ }
+ }
+ Ok(())
+ }
}
#[allow(dead_code)]
-pub fn run_test_stringy_error(
- test: Test<'_>,
-) -> std::result::Result<(), String> {
- run_test(test).map_err(|e| e.to_string()).map(|_| ())
+fn run_test_stringy_error(test: Test) -> std::result::Result<(), String> {
+ run_test(test).map_err(|e| e.to_string())?;
+ Ok(())
}
-pub fn run_test(test: Test<'_>) -> Result<()> {
+fn run_test(test: Test) -> Result<()> {
use self::Test::*;
match test {
- ParserSuccess(expr_file_path, expected_file_path) => {
- let expr = parse_file_str(&expr_file_path)?;
+ ParserSuccess(expr, expected) => {
+ let expr = expr.parse()?;
// This exercices both parsing and binary decoding
- // Compare parse/decoded
- let expected =
- Parsed::parse_binary_file(&PathBuf::from(expected_file_path))?;
- assert_eq_pretty!(expr, expected);
+ expected.compare_debug(expr)?;
}
- ParserFailure(file_path) => {
- let err = parse_file_str(&file_path).unwrap_err();
+ ParserFailure(expr, expected) => {
+ use std::io::ErrorKind;
+ let err = expr.parse().unwrap_err();
match &err {
Error::Parse(_) => {}
- Error::IO(e) if e.kind() == std::io::ErrorKind::InvalidData => {
- }
+ Error::IO(e) if e.kind() == ErrorKind::InvalidData => {}
e => panic!("Expected parse error, got: {:?}", e),
}
+ expected.compare_ui(err)?;
}
- BinaryEncoding(expr_file_path, expected_file_path) => {
- let expr = parse_file_str(&expr_file_path)?;
- let mut expected_data = Vec::new();
- {
- File::open(&PathBuf::from(&expected_file_path))?
- .read_to_end(&mut expected_data)?;
- }
- let expr_data = expr.encode()?;
-
- // Compare bit-by-bit
- if expr_data != expected_data {
- // use std::io::Write;
- // File::create(&expected_file_path)?.write_all(&expr_data)?;
- // Pretty-print difference
- assert_eq_pretty!(
- serde_cbor::de::from_slice::<serde_cbor::value::Value>(
- &expr_data
- )
- .unwrap(),
- serde_cbor::de::from_slice::<serde_cbor::value::Value>(
- &expected_data
- )
- .unwrap()
- );
- // If difference was not visible in the cbor::Value
- assert_eq!(expr_data, expected_data);
- }
+ BinaryEncoding(expr, expected) => {
+ let expr = expr.parse()?;
+ expected.compare_binary(expr)?;
}
- BinaryDecodingSuccess(expr_file_path, expected_file_path) => {
- let expr =
- Parsed::parse_binary_file(&PathBuf::from(expr_file_path))?;
- let expected = parse_file_str(&expected_file_path)?;
- assert_eq_pretty!(expr, expected);
+ BinaryDecodingSuccess(expr, expected) => {
+ let expr = expr.parse()?;
+ expected.compare_debug(expr)?;
}
- BinaryDecodingFailure(file_path) => {
- Parsed::parse_binary_file(&PathBuf::from(file_path)).unwrap_err();
+ BinaryDecodingFailure(expr, expected) => {
+ let err = expr.parse().unwrap_err();
+ expected.compare_ui(err)?;
}
- Printer(expr_file_path, _) => {
- let expected = parse_file_str(&expr_file_path)?;
+ Printer(expr, _) => {
+ let expected = expr.parse()?;
// Round-trip pretty-printer
- let expr: Parsed = Parsed::parse_str(&expected.to_string())?;
+ let expr = Parsed::parse_str(&expected.to_string())?;
assert_eq!(expr, expected);
}
- ImportSuccess(expr_file_path, expected_file_path) => {
- let expr = parse_file_str(&expr_file_path)?
- .resolve()?
- .typecheck()?
- .normalize();
- let expected = parse_file_str(&expected_file_path)?
- .resolve()?
- .typecheck()?
- .normalize();
-
- assert_eq_display!(expr, expected);
- }
- ImportFailure(file_path) => {
- parse_file_str(&file_path)?.resolve().unwrap_err();
- }
- TypeInferenceSuccess(expr_file_path, expected_file_path) => {
- let expr =
- parse_file_str(&expr_file_path)?.resolve()?.typecheck()?;
- let ty = expr.get_type()?.to_expr();
- let expected = parse_file_str(&expected_file_path)?.to_expr();
- assert_eq_display!(ty, expected);
- }
- TypeInferenceFailure(file_path) => {
- let res = parse_file_str(&file_path)?.skip_resolve()?.typecheck();
- if let Ok(e) = &res {
- // If e did typecheck, check that get_type fails
- e.get_type().unwrap_err();
- }
+ ImportSuccess(expr, expected) => {
+ let expr = expr.normalize()?;
+ expected.compare(expr)?;
}
- // Checks the output of the type error against a text file. If the text file doesn't exist,
- // we instead write to it the output we got. This makes it easy to update those files: just
- // `rm -r dhall/tests/type-errors` and run the tests again.
- TypeError(file_path) => {
- let res = parse_file_str(&file_path)?.skip_resolve()?.typecheck();
- let file_path = PathBuf::from(file_path);
- let error_file_path = file_path
- .strip_prefix("../dhall-lang/tests/type-inference/failure/")
- .or_else(|_| {
- file_path.strip_prefix("tests/type-inference/failure/")
- })
- .unwrap();
- let error_file_path =
- PathBuf::from("tests/type-errors/").join(error_file_path);
- let error_file_path = error_file_path.with_extension("txt");
- let err: Error = match res {
- Ok(e) => {
- // If e did typecheck, check that get_type fails
- e.get_type().unwrap_err().into()
- }
- Err(e) => e.into(),
- };
-
- if error_file_path.is_file() {
- let expected_msg = std::fs::read_to_string(error_file_path)?;
- let msg = format!("{}\n", err);
- assert_eq_pretty_str!(msg, expected_msg);
- } else {
- std::fs::create_dir_all(error_file_path.parent().unwrap())?;
- let mut file = File::create(error_file_path)?;
- writeln!(file, "{}", err)?;
- }
+ ImportFailure(expr, expected) => {
+ let err = expr.parse()?.resolve().unwrap_err();
+ expected.compare_ui(err)?;
+ }
+ TypeInferenceSuccess(expr, expected) => {
+ let ty = expr.resolve()?.typecheck()?.get_type()?;
+ expected.compare(ty)?;
+ }
+ TypeInferenceFailure(expr, expected) => {
+ let err = expr.resolve()?.typecheck().unwrap_err();
+ expected.compare_ui(err)?;
+ }
+ Normalization(expr, expected) => {
+ let expr = expr.normalize()?;
+ expected.compare(expr)?;
}
- Normalization(expr_file_path, expected_file_path) => {
- let expr = parse_file_str(&expr_file_path)?
- .resolve()?
- .typecheck()?
- .normalize()
- .to_expr();
- let expected = parse_file_str(&expected_file_path)?.to_expr();
-
- assert_eq_display!(expr, expected);
- }
- AlphaNormalization(expr_file_path, expected_file_path) => {
- let expr = parse_file_str(&expr_file_path)?
- .resolve()?
- .typecheck()?
- .normalize()
- .to_expr_alpha();
- let expected = parse_file_str(&expected_file_path)?.to_expr();
-
- assert_eq_display!(expr, expected);
+ AlphaNormalization(expr, expected) => {
+ let expr = expr.normalize()?.to_expr_alpha();
+ expected.compare(expr)?;
}
}
Ok(())
diff --git a/dhall/tests/binary-decode/failure/unit/ApplyNoArgs.txt b/dhall/tests/binary-decode/failure/unit/ApplyNoArgs.txt
new file mode 100644
index 0000000..0d8b602
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/ApplyNoArgs.txt
@@ -0,0 +1 @@
+WrongFormatError("Function application must have at least one argument")
diff --git a/dhall/tests/binary-decode/failure/unit/LambdaExplicitlyNamedUnderscore.txt b/dhall/tests/binary-decode/failure/unit/LambdaExplicitlyNamedUnderscore.txt
new file mode 100644
index 0000000..a435173
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/LambdaExplicitlyNamedUnderscore.txt
@@ -0,0 +1 @@
+WrongFormatError("`_` variable was encoded incorrectly")
diff --git a/dhall/tests/binary-decode/failure/unit/ListOneWithAnnotation.txt b/dhall/tests/binary-decode/failure/unit/ListOneWithAnnotation.txt
new file mode 100644
index 0000000..f96087c
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/ListOneWithAnnotation.txt
@@ -0,0 +1 @@
+WrongFormatError("Array([U64(4), U64(0), U64(0)])")
diff --git a/dhall/tests/binary-decode/failure/unit/NaturalNegativeOne.txt b/dhall/tests/binary-decode/failure/unit/NaturalNegativeOne.txt
new file mode 100644
index 0000000..a09c213
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/NaturalNegativeOne.txt
@@ -0,0 +1 @@
+WrongFormatError("Array([U64(15), I64(-1)])")
diff --git a/dhall/tests/binary-decode/failure/unit/OperatorOrTooFewArgs.txt b/dhall/tests/binary-decode/failure/unit/OperatorOrTooFewArgs.txt
new file mode 100644
index 0000000..8a7f8d6
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/OperatorOrTooFewArgs.txt
@@ -0,0 +1 @@
+WrongFormatError("Array([U64(3), U64(0), U64(0)])")
diff --git a/dhall/tests/binary-decode/failure/unit/OperatorOrTooManyArgs.txt b/dhall/tests/binary-decode/failure/unit/OperatorOrTooManyArgs.txt
new file mode 100644
index 0000000..6d1bb39
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/OperatorOrTooManyArgs.txt
@@ -0,0 +1 @@
+WrongFormatError("Array([U64(3), U64(0), U64(0), U64(0), U64(0)])")
diff --git a/dhall/tests/binary-decode/failure/unit/OperatorUnknownOpcode.txt b/dhall/tests/binary-decode/failure/unit/OperatorUnknownOpcode.txt
new file mode 100644
index 0000000..d61f0b0
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/OperatorUnknownOpcode.txt
@@ -0,0 +1 @@
+WrongFormatError("binop")
diff --git a/dhall/tests/binary-decode/failure/unit/PiExplicitlyNamedUnderscore.txt b/dhall/tests/binary-decode/failure/unit/PiExplicitlyNamedUnderscore.txt
new file mode 100644
index 0000000..a435173
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/PiExplicitlyNamedUnderscore.txt
@@ -0,0 +1 @@
+WrongFormatError("`_` variable was encoded incorrectly")
diff --git a/dhall/tests/binary-decode/failure/unit/VariableExplicitlyNamedUnderscore.txt b/dhall/tests/binary-decode/failure/unit/VariableExplicitlyNamedUnderscore.txt
new file mode 100644
index 0000000..a435173
--- /dev/null
+++ b/dhall/tests/binary-decode/failure/unit/VariableExplicitlyNamedUnderscore.txt
@@ -0,0 +1 @@
+WrongFormatError("`_` variable was encoded incorrectly")
diff --git a/dhall/tests/import/failure/cycle.txt b/dhall/tests/import/failure/cycle.txt
new file mode 100644
index 0000000..0a20503
--- /dev/null
+++ b/dhall/tests/import/failure/cycle.txt
@@ -0,0 +1 @@
+Recursive(Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "cycle.dhall"] }), hash: None }, Resolve(Recursive(Import { mode: Code, location: Local(Parent, FilePath { file_path: ["failure", "cycle.dhall"] }), hash: None }, Resolve(ImportCycle([Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "cycle.dhall"] }), hash: None }, Import { mode: Code, location: Local(Parent, FilePath { file_path: ["failure", "cycle.dhall"] }), hash: None }], Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "cycle.dhall"] }), hash: None })))))
diff --git a/dhall/tests/import/failure/importBoundary.txt b/dhall/tests/import/failure/importBoundary.txt
new file mode 100644
index 0000000..8f78e48
--- /dev/null
+++ b/dhall/tests/import/failure/importBoundary.txt
@@ -0,0 +1 @@
+Recursive(Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "importBoundary.dhall"] }), hash: None }, Typecheck(TypeError { message: Custom("error: unbound variable `x`\n --> <current file>:1:0\n |\n...\n3 | x\n | ^ not found in this scope\n |") }))
diff --git a/dhall/tests/parser/failure/ImportHeadersExteriorHash.txt b/dhall/tests/parser/failure/ImportHeadersExteriorHash.txt
new file mode 100644
index 0000000..1567dc1
--- /dev/null
+++ b/dhall/tests/parser/failure/ImportHeadersExteriorHash.txt
@@ -0,0 +1,6 @@
+ --> 1:49
+ |
+1 | (https://example.com/foo using ./headers) sha256:0000000000000000000000000000000000000000000000000000000000000000␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt b/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt
new file mode 100644
index 0000000..0586abb
--- /dev/null
+++ b/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | r.{ x: T }␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/annotation.txt b/dhall/tests/parser/failure/annotation.txt
new file mode 100644
index 0000000..3390d3e
--- /dev/null
+++ b/dhall/tests/parser/failure/annotation.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | let a:Natural = 1 in a␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/boundBuiltins.txt b/dhall/tests/parser/failure/boundBuiltins.txt
new file mode 100644
index 0000000..cd54e68
--- /dev/null
+++ b/dhall/tests/parser/failure/boundBuiltins.txt
@@ -0,0 +1,6 @@
+ --> 6:5
+ |
+6 | let Bool : Natural = 1 in Bool␊
+ | ^---
+ |
+ = unexpected builtin
diff --git a/dhall/tests/parser/failure/builtinWithIndex.txt b/dhall/tests/parser/failure/builtinWithIndex.txt
new file mode 100644
index 0000000..b464038
--- /dev/null
+++ b/dhall/tests/parser/failure/builtinWithIndex.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | Bool@2␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/doubleBoundsNeg.txt b/dhall/tests/parser/failure/doubleBoundsNeg.txt
new file mode 100644
index 0000000..e90ae72
--- /dev/null
+++ b/dhall/tests/parser/failure/doubleBoundsNeg.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | -179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.0␊
+ | ^----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
+ |
+ = Overflow while parsing double literal '-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.0'
diff --git a/dhall/tests/parser/failure/doubleBoundsPos.txt b/dhall/tests/parser/failure/doubleBoundsPos.txt
new file mode 100644
index 0000000..7061be4
--- /dev/null
+++ b/dhall/tests/parser/failure/doubleBoundsPos.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | 179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.0␊
+ | ^---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
+ |
+ = Overflow while parsing double literal '179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.0'
diff --git a/dhall/tests/parser/failure/fSomeX.txt b/dhall/tests/parser/failure/fSomeX.txt
new file mode 100644
index 0000000..a282410
--- /dev/null
+++ b/dhall/tests/parser/failure/fSomeX.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | f Some x␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/importAccess.txt b/dhall/tests/parser/failure/importAccess.txt
new file mode 100644
index 0000000..fa82c08
--- /dev/null
+++ b/dhall/tests/parser/failure/importAccess.txt
@@ -0,0 +1,6 @@
+ --> 1:15
+ |
+1 | ./testImport .hello␊
+ | ^---
+ |
+ = expected path
diff --git a/dhall/tests/parser/failure/incompleteIf.txt b/dhall/tests/parser/failure/incompleteIf.txt
new file mode 100644
index 0000000..932b5d7
--- /dev/null
+++ b/dhall/tests/parser/failure/incompleteIf.txt
@@ -0,0 +1,6 @@
+ --> 11:1
+ |
+11 |
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/mandatoryNewline.txt b/dhall/tests/parser/failure/mandatoryNewline.txt
new file mode 100644
index 0000000..f7d41cd
--- /dev/null
+++ b/dhall/tests/parser/failure/mandatoryNewline.txt
@@ -0,0 +1,6 @@
+ --> 2:1
+ |
+2 | ''ABC''␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/nonBase16Hash.txt b/dhall/tests/parser/failure/nonBase16Hash.txt
new file mode 100644
index 0000000..2a3fb26
--- /dev/null
+++ b/dhall/tests/parser/failure/nonBase16Hash.txt
@@ -0,0 +1,6 @@
+ --> 1:13
+ |
+1 | ./foo sha256:d60d8415e36e86dae7f42933d3b0c4fe3ca238f057fba206c7e9fbf5d784fe1g␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/nonCharacter.txt b/dhall/tests/parser/failure/nonCharacter.txt
new file mode 100644
index 0000000..9dfe19b
--- /dev/null
+++ b/dhall/tests/parser/failure/nonCharacter.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | "\u{10FFFF}"␊
+ | ^-------^
+ |
+ = Escape sequences can't contain non-characters
diff --git a/dhall/tests/parser/failure/nonCharacterUnbraced.txt b/dhall/tests/parser/failure/nonCharacterUnbraced.txt
new file mode 100644
index 0000000..2a5e2d7
--- /dev/null
+++ b/dhall/tests/parser/failure/nonCharacterUnbraced.txt
@@ -0,0 +1,6 @@
+ --> 6:3
+ |
+6 | "\uFFFE"␊
+ | ^---^
+ |
+ = Escape sequences can't contain non-characters
diff --git a/dhall/tests/parser/failure/nonUtf8.txt b/dhall/tests/parser/failure/nonUtf8.txt
new file mode 100644
index 0000000..24c20d5
--- /dev/null
+++ b/dhall/tests/parser/failure/nonUtf8.txt
@@ -0,0 +1 @@
+stream did not contain valid UTF-8
diff --git a/dhall/tests/parser/failure/spacing/AnnotationNoSpace.txt b/dhall/tests/parser/failure/spacing/AnnotationNoSpace.txt
new file mode 100644
index 0000000..a62db95
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/AnnotationNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | x :T␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ApplicationNoSpace1.txt b/dhall/tests/parser/failure/spacing/ApplicationNoSpace1.txt
new file mode 100644
index 0000000..1ca2115
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ApplicationNoSpace1.txt
@@ -0,0 +1,6 @@
+ --> 1:2
+ |
+1 | f(x)␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/spacing/ApplicationNoSpace2.txt b/dhall/tests/parser/failure/spacing/ApplicationNoSpace2.txt
new file mode 100644
index 0000000..f125801
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ApplicationNoSpace2.txt
@@ -0,0 +1,6 @@
+ --> 2:16
+ |
+2 | ./example.dhall[1]␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/spacing/AssertNoSpace.txt b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt
new file mode 100644
index 0000000..0e83988
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:8
+ |
+1 | assert :T␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ForallNoSpace.txt b/dhall/tests/parser/failure/spacing/ForallNoSpace.txt
new file mode 100644
index 0000000..697d400
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ForallNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:8
+ |
+1 | forall(x :T) -> x␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/spacing/HeadersNoSpace.txt b/dhall/tests/parser/failure/spacing/HeadersNoSpace.txt
new file mode 100644
index 0000000..70ee479
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/HeadersNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:25
+ |
+1 | https://example.com/foo using(x)␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, hash, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/IfNoSpace1.txt b/dhall/tests/parser/failure/spacing/IfNoSpace1.txt
new file mode 100644
index 0000000..d96ea58
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/IfNoSpace1.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | if(b) then x else y␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/spacing/IfNoSpace2.txt b/dhall/tests/parser/failure/spacing/IfNoSpace2.txt
new file mode 100644
index 0000000..ee48b9b
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/IfNoSpace2.txt
@@ -0,0 +1,6 @@
+ --> 1:6
+ |
+1 | if b then(x) else y␊
+ | ^---
+ |
+ = expected import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/IfNoSpace3.txt b/dhall/tests/parser/failure/spacing/IfNoSpace3.txt
new file mode 100644
index 0000000..6bc9d4b
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/IfNoSpace3.txt
@@ -0,0 +1,6 @@
+ --> 1:13
+ |
+1 | if b then x else(y)␊
+ | ^---
+ |
+ = expected import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ImportAltNoSpace.txt b/dhall/tests/parser/failure/spacing/ImportAltNoSpace.txt
new file mode 100644
index 0000000..ec7fb2e
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ImportAltNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | x ?y␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ImportHashedNoSpace.txt b/dhall/tests/parser/failure/spacing/ImportHashedNoSpace.txt
new file mode 100644
index 0000000..0a13bd4
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ImportHashedNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:14
+ |
+1 | missingsha256:0000000000000000000000000000000000000000000000000000000000000000␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt b/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt
new file mode 100644
index 0000000..adb0f1f
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | \(x :T) -> x␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt b/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt
new file mode 100644
index 0000000..577f157
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | let x :T = y in e␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/spacing/LetNoSpace1.txt b/dhall/tests/parser/failure/spacing/LetNoSpace1.txt
new file mode 100644
index 0000000..24bbe63
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/LetNoSpace1.txt
@@ -0,0 +1,6 @@
+ --> 1:6
+ |
+1 | letx = y in e␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/LetNoSpace2.txt b/dhall/tests/parser/failure/spacing/LetNoSpace2.txt
new file mode 100644
index 0000000..9355df4
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/LetNoSpace2.txt
@@ -0,0 +1,6 @@
+ --> 1:11
+ |
+1 | let x = y in(e)␊
+ | ^---
+ |
+ = expected import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, let_binding, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ListLitEmptyNoSpace.txt b/dhall/tests/parser/failure/spacing/ListLitEmptyNoSpace.txt
new file mode 100644
index 0000000..09b7dcd
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ListLitEmptyNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:2
+ |
+1 | [] :T␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/spacing/MergeAnnotationNoSpace3.txt b/dhall/tests/parser/failure/spacing/MergeAnnotationNoSpace3.txt
new file mode 100644
index 0000000..612f4b3
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/MergeAnnotationNoSpace3.txt
@@ -0,0 +1,6 @@
+ --> 1:11
+ |
+1 | merge x y :T␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/MergeNoSpace1.txt b/dhall/tests/parser/failure/spacing/MergeNoSpace1.txt
new file mode 100644
index 0000000..f0974f8
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/MergeNoSpace1.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | merge(x) y␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt b/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt
new file mode 100644
index 0000000..96d937b
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt
@@ -0,0 +1,6 @@
+ --> 1:7
+ |
+1 | merge x(y)␊
+ | ^---
+ |
+ = expected missing, double_quote_literal, single_quote_literal, if_, merge, non_empty_list_literal, NaN, Some_, toMap, assert, forall, numeric_double_literal, minus_infinity_literal, plus_infinity_literal, natural_literal, integer_literal, or import_hashed
diff --git a/dhall/tests/parser/failure/spacing/NaturalPlusNoSpace.txt b/dhall/tests/parser/failure/spacing/NaturalPlusNoSpace.txt
new file mode 100644
index 0000000..0473531
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/NaturalPlusNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:4
+ |
+1 | x +y␊
+ | ^---
+ |
+ = expected natural_literal
diff --git a/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt
new file mode 100644
index 0000000..beca670
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | { x :T }␊
+ | ^---
+ |
+ = expected non_empty_record_literal or non_empty_record_type
diff --git a/dhall/tests/parser/failure/spacing/SomeNoSpace.txt b/dhall/tests/parser/failure/spacing/SomeNoSpace.txt
new file mode 100644
index 0000000..f488c9d
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/SomeNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | Some(x)␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/spacing/ToMapAnnotNoSpace.txt b/dhall/tests/parser/failure/spacing/ToMapAnnotNoSpace.txt
new file mode 100644
index 0000000..b371dc4
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ToMapAnnotNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:9
+ |
+1 | toMap x :T␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
diff --git a/dhall/tests/parser/failure/spacing/ToMapNoSpace.txt b/dhall/tests/parser/failure/spacing/ToMapNoSpace.txt
new file mode 100644
index 0000000..afb7c29
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/ToMapNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | toMap(x)␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt b/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt
new file mode 100644
index 0000000..0a83dc8
--- /dev/null
+++ b/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | < x :T >␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/surrogatePairUnbraced.txt b/dhall/tests/parser/failure/surrogatePairUnbraced.txt
new file mode 100644
index 0000000..5cf6ab4
--- /dev/null
+++ b/dhall/tests/parser/failure/surrogatePairUnbraced.txt
@@ -0,0 +1,6 @@
+ --> 5:3
+ |
+5 | "\uD800"␊
+ | ^---^
+ |
+ = Escape sequences can't contain surrogate pairs
diff --git a/dhall/tests/parser/failure/unit/BoolLitTrueWithIndex.txt b/dhall/tests/parser/failure/unit/BoolLitTrueWithIndex.txt
new file mode 100644
index 0000000..7561fd7
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/BoolLitTrueWithIndex.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | True@0␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/unit/BuiltinBoolWithIndex.txt b/dhall/tests/parser/failure/unit/BuiltinBoolWithIndex.txt
new file mode 100644
index 0000000..6a8814f
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/BuiltinBoolWithIndex.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | Bool@1␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/unit/BuiltinTypeWithIndex.txt b/dhall/tests/parser/failure/unit/BuiltinTypeWithIndex.txt
new file mode 100644
index 0000000..f06e887
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/BuiltinTypeWithIndex.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | Type@0␊
+ | ^---
+ |
+ = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow
diff --git a/dhall/tests/parser/failure/unit/ImportEnvWrongEscape.txt b/dhall/tests/parser/failure/unit/ImportEnvWrongEscape.txt
new file mode 100644
index 0000000..a02d38e
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/ImportEnvWrongEscape.txt
@@ -0,0 +1,6 @@
+ --> 1:6
+ |
+1 | env:"\$"␊
+ | ^---
+ |
+ = expected posix_environment_variable_character
diff --git a/dhall/tests/parser/failure/unit/ListLitEmptyAnnotation.txt b/dhall/tests/parser/failure/unit/ListLitEmptyAnnotation.txt
new file mode 100644
index 0000000..c9d3216
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/ListLitEmptyAnnotation.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | ([]) : List T␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/unit/ListLitEmptyMissingAnnotation.txt b/dhall/tests/parser/failure/unit/ListLitEmptyMissingAnnotation.txt
new file mode 100644
index 0000000..5c8dfbc
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/ListLitEmptyMissingAnnotation.txt
@@ -0,0 +1,6 @@
+ --> 1:2
+ |
+1 | []␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/failure/unit/MergeAlone.txt b/dhall/tests/parser/failure/unit/MergeAlone.txt
new file mode 100644
index 0000000..43e7223
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/MergeAlone.txt
@@ -0,0 +1,6 @@
+ --> 2:1
+ |
+2 |
+ | ^---
+ |
+ = expected import_hashed or primitive_expression
diff --git a/dhall/tests/parser/failure/unit/MergeOneArgument.txt b/dhall/tests/parser/failure/unit/MergeOneArgument.txt
new file mode 100644
index 0000000..43e7223
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/MergeOneArgument.txt
@@ -0,0 +1,6 @@
+ --> 2:1
+ |
+2 |
+ | ^---
+ |
+ = expected import_hashed or primitive_expression
diff --git a/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt b/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt
new file mode 100644
index 0000000..8475bb9
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt
@@ -0,0 +1,6 @@
+ --> 1:3
+ |
+1 | < x = 3 | y : Bool >␊
+ | ^---
+ |
+ = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall
diff --git a/dhall/tests/parser/failure/unit/RecordTypeTrailingComma.txt b/dhall/tests/parser/failure/unit/RecordTypeTrailingComma.txt
new file mode 100644
index 0000000..80434d3
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/RecordTypeTrailingComma.txt
@@ -0,0 +1,6 @@
+ --> 1:9
+ |
+1 | { x: T, }␊
+ | ^---
+ |
+ = expected any_label_or_some
diff --git a/dhall/tests/parser/failure/unit/SomeAlone.txt b/dhall/tests/parser/failure/unit/SomeAlone.txt
new file mode 100644
index 0000000..43e7223
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/SomeAlone.txt
@@ -0,0 +1,6 @@
+ --> 2:1
+ |
+2 |
+ | ^---
+ |
+ = expected import_hashed or primitive_expression
diff --git a/dhall/tests/type-errors/SortInLet.txt b/dhall/tests/type-inference/failure/SortInLet.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/SortInLet.txt
+++ b/dhall/tests/type-inference/failure/SortInLet.txt
diff --git a/dhall/tests/type-errors/hurkensParadox.txt b/dhall/tests/type-inference/failure/hurkensParadox.txt
index 6b99615..6b99615 100644
--- a/dhall/tests/type-errors/hurkensParadox.txt
+++ b/dhall/tests/type-inference/failure/hurkensParadox.txt
diff --git a/dhall/tests/type-errors/mixedUnions.txt b/dhall/tests/type-inference/failure/mixedUnions.txt
index 8e0026d..8e0026d 100644
--- a/dhall/tests/type-errors/mixedUnions.txt
+++ b/dhall/tests/type-inference/failure/mixedUnions.txt
diff --git a/dhall/tests/type-errors/recordOfKind.txt b/dhall/tests/type-inference/failure/recordOfKind.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/recordOfKind.txt
+++ b/dhall/tests/type-inference/failure/recordOfKind.txt
diff --git a/dhall/tests/type-errors/unit/AnnotationRecordWrongFieldName.txt b/dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldName.txt
index 2a754fc..2a754fc 100644
--- a/dhall/tests/type-errors/unit/AnnotationRecordWrongFieldName.txt
+++ b/dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldName.txt
diff --git a/dhall/tests/type-errors/unit/AnnotationRecordWrongFieldType.txt b/dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldType.txt
index e67edb8..e67edb8 100644
--- a/dhall/tests/type-errors/unit/AnnotationRecordWrongFieldType.txt
+++ b/dhall/tests/type-inference/failure/unit/AnnotationRecordWrongFieldType.txt
diff --git a/dhall/tests/type-errors/unit/AssertAlphaTrap.txt b/dhall/tests/type-inference/failure/unit/AssertAlphaTrap.txt
index 7e27d00..7e27d00 100644
--- a/dhall/tests/type-errors/unit/AssertAlphaTrap.txt
+++ b/dhall/tests/type-inference/failure/unit/AssertAlphaTrap.txt
diff --git a/dhall/tests/type-errors/unit/AssertDoubleZeros.txt b/dhall/tests/type-inference/failure/unit/AssertDoubleZeros.txt
index 12231a0..12231a0 100644
--- a/dhall/tests/type-errors/unit/AssertDoubleZeros.txt
+++ b/dhall/tests/type-inference/failure/unit/AssertDoubleZeros.txt
diff --git a/dhall/tests/type-errors/unit/AssertNotEquivalence.txt b/dhall/tests/type-inference/failure/unit/AssertNotEquivalence.txt
index 5973d19..5973d19 100644
--- a/dhall/tests/type-errors/unit/AssertNotEquivalence.txt
+++ b/dhall/tests/type-inference/failure/unit/AssertNotEquivalence.txt
diff --git a/dhall/tests/type-errors/unit/AssertTriviallyFalse.txt b/dhall/tests/type-inference/failure/unit/AssertTriviallyFalse.txt
index 5742022..5742022 100644
--- a/dhall/tests/type-errors/unit/AssertTriviallyFalse.txt
+++ b/dhall/tests/type-inference/failure/unit/AssertTriviallyFalse.txt
diff --git a/dhall/tests/type-errors/unit/CompletionMissingRequiredField.txt b/dhall/tests/type-inference/failure/unit/CompletionMissingRequiredField.txt
index d0a9a01..d0a9a01 100644
--- a/dhall/tests/type-errors/unit/CompletionMissingRequiredField.txt
+++ b/dhall/tests/type-inference/failure/unit/CompletionMissingRequiredField.txt
diff --git a/dhall/tests/type-errors/unit/CompletionWithWrongDefaultType.txt b/dhall/tests/type-inference/failure/unit/CompletionWithWrongDefaultType.txt
index d4639e9..d4639e9 100644
--- a/dhall/tests/type-errors/unit/CompletionWithWrongDefaultType.txt
+++ b/dhall/tests/type-inference/failure/unit/CompletionWithWrongDefaultType.txt
diff --git a/dhall/tests/type-errors/unit/CompletionWithWrongFieldName.txt b/dhall/tests/type-inference/failure/unit/CompletionWithWrongFieldName.txt
index 0839742..0839742 100644
--- a/dhall/tests/type-errors/unit/CompletionWithWrongFieldName.txt
+++ b/dhall/tests/type-inference/failure/unit/CompletionWithWrongFieldName.txt
diff --git a/dhall/tests/type-errors/unit/CompletionWithWrongOverridenType.txt b/dhall/tests/type-inference/failure/unit/CompletionWithWrongOverridenType.txt
index 7edef95..7edef95 100644
--- a/dhall/tests/type-errors/unit/CompletionWithWrongOverridenType.txt
+++ b/dhall/tests/type-inference/failure/unit/CompletionWithWrongOverridenType.txt
diff --git a/dhall/tests/type-errors/unit/EmptyToMap.txt b/dhall/tests/type-inference/failure/unit/EmptyToMap.txt
index 000fac7..000fac7 100644
--- a/dhall/tests/type-errors/unit/EmptyToMap.txt
+++ b/dhall/tests/type-inference/failure/unit/EmptyToMap.txt
diff --git a/dhall/tests/type-errors/unit/EquivalenceNotSameType.txt b/dhall/tests/type-inference/failure/unit/EquivalenceNotSameType.txt
index 12e21e4..12e21e4 100644
--- a/dhall/tests/type-errors/unit/EquivalenceNotSameType.txt
+++ b/dhall/tests/type-inference/failure/unit/EquivalenceNotSameType.txt
diff --git a/dhall/tests/type-errors/unit/EquivalenceNotTerms.txt b/dhall/tests/type-inference/failure/unit/EquivalenceNotTerms.txt
index 0183c60..0183c60 100644
--- a/dhall/tests/type-errors/unit/EquivalenceNotTerms.txt
+++ b/dhall/tests/type-inference/failure/unit/EquivalenceNotTerms.txt
diff --git a/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt b/dhall/tests/type-inference/failure/unit/FunctionApplicationArgumentNotMatch.txt
index 07278b8..07278b8 100644
--- a/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionApplicationArgumentNotMatch.txt
diff --git a/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt b/dhall/tests/type-inference/failure/unit/FunctionApplicationIsNotFunction.txt
index e46904a..e46904a 100644
--- a/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionApplicationIsNotFunction.txt
diff --git a/dhall/tests/type-errors/unit/FunctionArgumentTypeNotAType.txt b/dhall/tests/type-inference/failure/unit/FunctionArgumentTypeNotAType.txt
index e84eb15..e84eb15 100644
--- a/dhall/tests/type-errors/unit/FunctionArgumentTypeNotAType.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionArgumentTypeNotAType.txt
diff --git a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt b/dhall/tests/type-inference/failure/unit/FunctionTypeArgumentTypeNotAType.txt
index 4aa0f4f..4aa0f4f 100644
--- a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionTypeArgumentTypeNotAType.txt
diff --git a/dhall/tests/type-errors/unit/FunctionTypeKindSort.txt b/dhall/tests/type-inference/failure/unit/FunctionTypeKindSort.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/FunctionTypeKindSort.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionTypeKindSort.txt
diff --git a/dhall/tests/type-errors/unit/FunctionTypeTypeSort.txt b/dhall/tests/type-inference/failure/unit/FunctionTypeTypeSort.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/FunctionTypeTypeSort.txt
+++ b/dhall/tests/type-inference/failure/unit/FunctionTypeTypeSort.txt
diff --git a/dhall/tests/type-errors/unit/HeterogenousToMap.txt b/dhall/tests/type-inference/failure/unit/HeterogenousToMap.txt
index 2f8abf2..2f8abf2 100644
--- a/dhall/tests/type-errors/unit/HeterogenousToMap.txt
+++ b/dhall/tests/type-inference/failure/unit/HeterogenousToMap.txt
diff --git a/dhall/tests/type-errors/unit/IfBranchesNotMatch.txt b/dhall/tests/type-inference/failure/unit/IfBranchesNotMatch.txt
index d58af95..d58af95 100644
--- a/dhall/tests/type-errors/unit/IfBranchesNotMatch.txt
+++ b/dhall/tests/type-inference/failure/unit/IfBranchesNotMatch.txt
diff --git a/dhall/tests/type-errors/unit/IfBranchesNotType.txt b/dhall/tests/type-inference/failure/unit/IfBranchesNotType.txt
index b70ac5f..b70ac5f 100644
--- a/dhall/tests/type-errors/unit/IfBranchesNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/IfBranchesNotType.txt
diff --git a/dhall/tests/type-errors/unit/IfNotBool.txt b/dhall/tests/type-inference/failure/unit/IfNotBool.txt
index eb5ff42..eb5ff42 100644
--- a/dhall/tests/type-errors/unit/IfNotBool.txt
+++ b/dhall/tests/type-inference/failure/unit/IfNotBool.txt
diff --git a/dhall/tests/type-errors/unit/LetWithWrongAnnotation.txt b/dhall/tests/type-inference/failure/unit/LetWithWrongAnnotation.txt
index 5ba4b35..5ba4b35 100644
--- a/dhall/tests/type-errors/unit/LetWithWrongAnnotation.txt
+++ b/dhall/tests/type-inference/failure/unit/LetWithWrongAnnotation.txt
diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-inference/failure/unit/ListLiteralEmptyNotType.txt
index 2ca5819..2ca5819 100644
--- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/ListLiteralEmptyNotType.txt
diff --git a/dhall/tests/type-errors/unit/ListLiteralNotType.txt b/dhall/tests/type-inference/failure/unit/ListLiteralNotType.txt
index 62d69e5..62d69e5 100644
--- a/dhall/tests/type-errors/unit/ListLiteralNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/ListLiteralNotType.txt
diff --git a/dhall/tests/type-errors/unit/ListLiteralTypesNotMatch.txt b/dhall/tests/type-inference/failure/unit/ListLiteralTypesNotMatch.txt
index 33e007d..33e007d 100644
--- a/dhall/tests/type-errors/unit/ListLiteralTypesNotMatch.txt
+++ b/dhall/tests/type-inference/failure/unit/ListLiteralTypesNotMatch.txt
diff --git a/dhall/tests/type-errors/unit/MergeAlternativeHasNoHandler.txt b/dhall/tests/type-inference/failure/unit/MergeAlternativeHasNoHandler.txt
index a4a967a..a4a967a 100644
--- a/dhall/tests/type-errors/unit/MergeAlternativeHasNoHandler.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeAlternativeHasNoHandler.txt
diff --git a/dhall/tests/type-errors/unit/MergeAnnotationMismatch.txt b/dhall/tests/type-inference/failure/unit/MergeAnnotationMismatch.txt
index 9175f33..9175f33 100644
--- a/dhall/tests/type-errors/unit/MergeAnnotationMismatch.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeAnnotationMismatch.txt
diff --git a/dhall/tests/type-errors/unit/MergeAnnotationNotType.txt b/dhall/tests/type-inference/failure/unit/MergeAnnotationNotType.txt
index 1173f0c..1173f0c 100644
--- a/dhall/tests/type-errors/unit/MergeAnnotationNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeAnnotationNotType.txt
diff --git a/dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation1.txt b/dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation1.txt
index 94442e0..94442e0 100644
--- a/dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation1.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation1.txt
diff --git a/dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation2.txt b/dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation2.txt
index 5dcffdf..5dcffdf 100644
--- a/dhall/tests/type-errors/unit/MergeEmptyNeedsDirectAnnotation2.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeEmptyNeedsDirectAnnotation2.txt
diff --git a/dhall/tests/type-errors/unit/MergeEmptyWithoutAnnotation.txt b/dhall/tests/type-inference/failure/unit/MergeEmptyWithoutAnnotation.txt
index bf45123..bf45123 100644
--- a/dhall/tests/type-errors/unit/MergeEmptyWithoutAnnotation.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeEmptyWithoutAnnotation.txt
diff --git a/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt b/dhall/tests/type-inference/failure/unit/MergeHandlerNotFunction.txt
index 8528f90..8528f90 100644
--- a/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeHandlerNotFunction.txt
diff --git a/dhall/tests/type-errors/unit/MergeHandlerNotInUnion.txt b/dhall/tests/type-inference/failure/unit/MergeHandlerNotInUnion.txt
index 3159340..3159340 100644
--- a/dhall/tests/type-errors/unit/MergeHandlerNotInUnion.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeHandlerNotInUnion.txt
diff --git a/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt b/dhall/tests/type-inference/failure/unit/MergeHandlerNotMatchAlternativeType.txt
index c2229bd..c2229bd 100644
--- a/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeHandlerNotMatchAlternativeType.txt
diff --git a/dhall/tests/type-errors/unit/MergeHandlersWithDifferentType.txt b/dhall/tests/type-inference/failure/unit/MergeHandlersWithDifferentType.txt
index 47f3de7..47f3de7 100644
--- a/dhall/tests/type-errors/unit/MergeHandlersWithDifferentType.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeHandlersWithDifferentType.txt
diff --git a/dhall/tests/type-errors/unit/MergeLhsNotRecord.txt b/dhall/tests/type-inference/failure/unit/MergeLhsNotRecord.txt
index f27dddd..f27dddd 100644
--- a/dhall/tests/type-errors/unit/MergeLhsNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeLhsNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/MergeMissingHandler1.txt b/dhall/tests/type-inference/failure/unit/MergeMissingHandler1.txt
index af58d05..af58d05 100644
--- a/dhall/tests/type-errors/unit/MergeMissingHandler1.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeMissingHandler1.txt
diff --git a/dhall/tests/type-errors/unit/MergeMissingHandler2.txt b/dhall/tests/type-inference/failure/unit/MergeMissingHandler2.txt
index 49484df..49484df 100644
--- a/dhall/tests/type-errors/unit/MergeMissingHandler2.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeMissingHandler2.txt
diff --git a/dhall/tests/type-errors/unit/MergeRhsNotUnion.txt b/dhall/tests/type-inference/failure/unit/MergeRhsNotUnion.txt
index 0108725..0108725 100644
--- a/dhall/tests/type-errors/unit/MergeRhsNotUnion.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeRhsNotUnion.txt
diff --git a/dhall/tests/type-errors/unit/MergeUnusedHandler.txt b/dhall/tests/type-inference/failure/unit/MergeUnusedHandler.txt
index 2afe376..2afe376 100644
--- a/dhall/tests/type-errors/unit/MergeUnusedHandler.txt
+++ b/dhall/tests/type-inference/failure/unit/MergeUnusedHandler.txt
diff --git a/dhall/tests/type-errors/unit/MistypedToMap1.txt b/dhall/tests/type-inference/failure/unit/MistypedToMap1.txt
index 14d9791..14d9791 100644
--- a/dhall/tests/type-errors/unit/MistypedToMap1.txt
+++ b/dhall/tests/type-inference/failure/unit/MistypedToMap1.txt
diff --git a/dhall/tests/type-errors/unit/MistypedToMap2.txt b/dhall/tests/type-inference/failure/unit/MistypedToMap2.txt
index 88e303e..88e303e 100644
--- a/dhall/tests/type-errors/unit/MistypedToMap2.txt
+++ b/dhall/tests/type-inference/failure/unit/MistypedToMap2.txt
diff --git a/dhall/tests/type-errors/unit/MistypedToMap3.txt b/dhall/tests/type-inference/failure/unit/MistypedToMap3.txt
index 6b3772d..6b3772d 100644
--- a/dhall/tests/type-errors/unit/MistypedToMap3.txt
+++ b/dhall/tests/type-inference/failure/unit/MistypedToMap3.txt
diff --git a/dhall/tests/type-errors/unit/MistypedToMap4.txt b/dhall/tests/type-inference/failure/unit/MistypedToMap4.txt
index e0cf651..e0cf651 100644
--- a/dhall/tests/type-errors/unit/MistypedToMap4.txt
+++ b/dhall/tests/type-inference/failure/unit/MistypedToMap4.txt
diff --git a/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt b/dhall/tests/type-inference/failure/unit/NaturalSubtractNotNatural.txt
index ac336a6..ac336a6 100644
--- a/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt
+++ b/dhall/tests/type-inference/failure/unit/NaturalSubtractNotNatural.txt
diff --git a/dhall/tests/type-errors/unit/NonRecordToMap.txt b/dhall/tests/type-inference/failure/unit/NonRecordToMap.txt
index 8e83002..8e83002 100644
--- a/dhall/tests/type-errors/unit/NonRecordToMap.txt
+++ b/dhall/tests/type-inference/failure/unit/NonRecordToMap.txt
diff --git a/dhall/tests/type-errors/unit/OperatorAndNotBool.txt b/dhall/tests/type-inference/failure/unit/OperatorAndNotBool.txt
index f6ea50b..f6ea50b 100644
--- a/dhall/tests/type-errors/unit/OperatorAndNotBool.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorAndNotBool.txt
diff --git a/dhall/tests/type-errors/unit/OperatorEqualNotBool.txt b/dhall/tests/type-inference/failure/unit/OperatorEqualNotBool.txt
index 8662c16..8662c16 100644
--- a/dhall/tests/type-errors/unit/OperatorEqualNotBool.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorEqualNotBool.txt
diff --git a/dhall/tests/type-errors/unit/OperatorListConcatenateLhsNotList.txt b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateLhsNotList.txt
index 8075b99..8075b99 100644
--- a/dhall/tests/type-errors/unit/OperatorListConcatenateLhsNotList.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateLhsNotList.txt
diff --git a/dhall/tests/type-errors/unit/OperatorListConcatenateListsNotMatch.txt b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateListsNotMatch.txt
index 9e404f8..9e404f8 100644
--- a/dhall/tests/type-errors/unit/OperatorListConcatenateListsNotMatch.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateListsNotMatch.txt
diff --git a/dhall/tests/type-errors/unit/OperatorListConcatenateNotListsButMatch.txt b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateNotListsButMatch.txt
index fffc898..fffc898 100644
--- a/dhall/tests/type-errors/unit/OperatorListConcatenateNotListsButMatch.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateNotListsButMatch.txt
diff --git a/dhall/tests/type-errors/unit/OperatorListConcatenateRhsNotList.txt b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateRhsNotList.txt
index 2ba0b91..2ba0b91 100644
--- a/dhall/tests/type-errors/unit/OperatorListConcatenateRhsNotList.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorListConcatenateRhsNotList.txt
diff --git a/dhall/tests/type-errors/unit/OperatorNotEqualNotBool.txt b/dhall/tests/type-inference/failure/unit/OperatorNotEqualNotBool.txt
index ac04fd4..ac04fd4 100644
--- a/dhall/tests/type-errors/unit/OperatorNotEqualNotBool.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorNotEqualNotBool.txt
diff --git a/dhall/tests/type-errors/unit/OperatorOrNotBool.txt b/dhall/tests/type-inference/failure/unit/OperatorOrNotBool.txt
index 9e1c4fb..9e1c4fb 100644
--- a/dhall/tests/type-errors/unit/OperatorOrNotBool.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorOrNotBool.txt
diff --git a/dhall/tests/type-errors/unit/OperatorPlusNotNatural.txt b/dhall/tests/type-inference/failure/unit/OperatorPlusNotNatural.txt
index 97e0df4..97e0df4 100644
--- a/dhall/tests/type-errors/unit/OperatorPlusNotNatural.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorPlusNotNatural.txt
diff --git a/dhall/tests/type-errors/unit/OperatorTextConcatenateLhsNotText.txt b/dhall/tests/type-inference/failure/unit/OperatorTextConcatenateLhsNotText.txt
index 679d991..679d991 100644
--- a/dhall/tests/type-errors/unit/OperatorTextConcatenateLhsNotText.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorTextConcatenateLhsNotText.txt
diff --git a/dhall/tests/type-errors/unit/OperatorTextConcatenateRhsNotText.txt b/dhall/tests/type-inference/failure/unit/OperatorTextConcatenateRhsNotText.txt
index 85611f7..85611f7 100644
--- a/dhall/tests/type-errors/unit/OperatorTextConcatenateRhsNotText.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorTextConcatenateRhsNotText.txt
diff --git a/dhall/tests/type-errors/unit/OperatorTimesNotNatural.txt b/dhall/tests/type-inference/failure/unit/OperatorTimesNotNatural.txt
index d688ed6..d688ed6 100644
--- a/dhall/tests/type-errors/unit/OperatorTimesNotNatural.txt
+++ b/dhall/tests/type-inference/failure/unit/OperatorTimesNotNatural.txt
diff --git a/dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxAbsent.txt b/dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxAbsent.txt
index bfb36ae..bfb36ae 100644
--- a/dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxAbsent.txt
+++ b/dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxAbsent.txt
diff --git a/dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxPresent.txt b/dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxPresent.txt
index 5332fcb..5332fcb 100644
--- a/dhall/tests/type-errors/unit/OptionalDeprecatedSyntaxPresent.txt
+++ b/dhall/tests/type-inference/failure/unit/OptionalDeprecatedSyntaxPresent.txt
diff --git a/dhall/tests/type-errors/unit/RecordLitDuplicateFields.txt b/dhall/tests/type-inference/failure/unit/RecordLitDuplicateFields.txt
index 608c6a0..608c6a0 100644
--- a/dhall/tests/type-errors/unit/RecordLitDuplicateFields.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordLitDuplicateFields.txt
diff --git a/dhall/tests/type-errors/unit/RecordMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/RecordMixedKinds3.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordMixedKinds3.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionByTypeFieldTypeMismatch.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionByTypeFieldTypeMismatch.txt
index d624075..d624075 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionByTypeFieldTypeMismatch.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionByTypeFieldTypeMismatch.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionByTypeNotPresent.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionByTypeNotPresent.txt
index c22c2c4..c22c2c4 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionByTypeNotPresent.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionByTypeNotPresent.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionDuplicateFields.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt
index 5c6520b..5c6520b 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionDuplicateFields.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionDuplicateFields.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionEmpty.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionEmpty.txt
index 39f263b..39f263b 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionEmpty.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionEmpty.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionNotPresent.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionNotPresent.txt
index 032f7a0..032f7a0 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionNotPresent.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionNotPresent.txt
diff --git a/dhall/tests/type-errors/unit/RecordProjectionNotRecord.txt b/dhall/tests/type-inference/failure/unit/RecordProjectionNotRecord.txt
index 5ed6ffd..5ed6ffd 100644
--- a/dhall/tests/type-errors/unit/RecordProjectionNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordProjectionNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/RecordSelectionEmpty.txt b/dhall/tests/type-inference/failure/unit/RecordSelectionEmpty.txt
index 5b3b7f8..5b3b7f8 100644
--- a/dhall/tests/type-errors/unit/RecordSelectionEmpty.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordSelectionEmpty.txt
diff --git a/dhall/tests/type-errors/unit/RecordSelectionNotPresent.txt b/dhall/tests/type-inference/failure/unit/RecordSelectionNotPresent.txt
index d435ca0..d435ca0 100644
--- a/dhall/tests/type-errors/unit/RecordSelectionNotPresent.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordSelectionNotPresent.txt
diff --git a/dhall/tests/type-errors/unit/RecordSelectionNotRecord.txt b/dhall/tests/type-inference/failure/unit/RecordSelectionNotRecord.txt
index 3f9b7ed..3f9b7ed 100644
--- a/dhall/tests/type-errors/unit/RecordSelectionNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordSelectionNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/RecordSelectionTypeNotUnionType.txt b/dhall/tests/type-inference/failure/unit/RecordSelectionTypeNotUnionType.txt
index cca28b8..cca28b8 100644
--- a/dhall/tests/type-errors/unit/RecordSelectionTypeNotUnionType.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordSelectionTypeNotUnionType.txt
diff --git a/dhall/tests/type-errors/unit/RecordTypeDuplicateFields.txt b/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt
index 145a59b..145a59b 100644
--- a/dhall/tests/type-errors/unit/RecordTypeDuplicateFields.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordTypeDuplicateFields.txt
diff --git a/dhall/tests/type-errors/unit/RecordTypeValueMember.txt b/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt
index 04488ad..04488ad 100644
--- a/dhall/tests/type-errors/unit/RecordTypeValueMember.txt
+++ b/dhall/tests/type-inference/failure/unit/RecordTypeValueMember.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordMergeLhsNotRecord.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeLhsNotRecord.txt
index f74e839..f74e839 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordMergeLhsNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeLhsNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordMergeOverlapping.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeOverlapping.txt
index f74e839..f74e839 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordMergeOverlapping.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeOverlapping.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordMergeRhsNotRecord.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeRhsNotRecord.txt
index f74e839..f74e839 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordMergeRhsNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordMergeRhsNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt
index b35e64b..b35e64b 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeLhsNotRecordType.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeOverlapping.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeOverlapping.txt
index f74e839..f74e839 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeOverlapping.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeOverlapping.txt
diff --git a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt
index 0200f97..0200f97 100644
--- a/dhall/tests/type-errors/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt
+++ b/dhall/tests/type-inference/failure/unit/RecursiveRecordTypeMergeRhsNotRecordType.txt
diff --git a/dhall/tests/type-errors/unit/RightBiasedRecordMergeLhsNotRecord.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeLhsNotRecord.txt
index 3b158ce..3b158ce 100644
--- a/dhall/tests/type-errors/unit/RightBiasedRecordMergeLhsNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeLhsNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds2.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds2.txt
+++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds2.txt
diff --git a/dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/RightBiasedRecordMergeMixedKinds3.txt
+++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeMixedKinds3.txt
diff --git a/dhall/tests/type-errors/unit/RightBiasedRecordMergeRhsNotRecord.txt b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeRhsNotRecord.txt
index 4f9cb0d..4f9cb0d 100644
--- a/dhall/tests/type-errors/unit/RightBiasedRecordMergeRhsNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/RightBiasedRecordMergeRhsNotRecord.txt
diff --git a/dhall/tests/type-errors/unit/SomeNotType.txt b/dhall/tests/type-inference/failure/unit/SomeNotType.txt
index 3584768..3584768 100644
--- a/dhall/tests/type-errors/unit/SomeNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/SomeNotType.txt
diff --git a/dhall/tests/type-errors/unit/Sort.txt b/dhall/tests/type-inference/failure/unit/Sort.txt
index 5b88ff7..5b88ff7 100644
--- a/dhall/tests/type-errors/unit/Sort.txt
+++ b/dhall/tests/type-inference/failure/unit/Sort.txt
diff --git a/dhall/tests/type-errors/unit/TextLiteralInterpolateNotText.txt b/dhall/tests/type-inference/failure/unit/TextLiteralInterpolateNotText.txt
index 0132a30..0132a30 100644
--- a/dhall/tests/type-errors/unit/TextLiteralInterpolateNotText.txt
+++ b/dhall/tests/type-inference/failure/unit/TextLiteralInterpolateNotText.txt
diff --git a/dhall/tests/type-errors/unit/ToMapEmptyInvalidAnnotation.txt b/dhall/tests/type-inference/failure/unit/ToMapEmptyInvalidAnnotation.txt
index c28073e..c28073e 100644
--- a/dhall/tests/type-errors/unit/ToMapEmptyInvalidAnnotation.txt
+++ b/dhall/tests/type-inference/failure/unit/ToMapEmptyInvalidAnnotation.txt
diff --git a/dhall/tests/type-errors/unit/ToMapWrongKind.txt b/dhall/tests/type-inference/failure/unit/ToMapWrongKind.txt
index 8158c08..8158c08 100644
--- a/dhall/tests/type-errors/unit/ToMapWrongKind.txt
+++ b/dhall/tests/type-inference/failure/unit/ToMapWrongKind.txt
diff --git a/dhall/tests/type-errors/unit/TypeAnnotationWrong.txt b/dhall/tests/type-inference/failure/unit/TypeAnnotationWrong.txt
index 7360e68..7360e68 100644
--- a/dhall/tests/type-errors/unit/TypeAnnotationWrong.txt
+++ b/dhall/tests/type-inference/failure/unit/TypeAnnotationWrong.txt
diff --git a/dhall/tests/type-errors/unit/UnionConstructorFieldNotPresent.txt b/dhall/tests/type-inference/failure/unit/UnionConstructorFieldNotPresent.txt
index 41d283d..41d283d 100644
--- a/dhall/tests/type-errors/unit/UnionConstructorFieldNotPresent.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionConstructorFieldNotPresent.txt
diff --git a/dhall/tests/type-errors/unit/UnionDeprecatedConstructorsKeyword.txt b/dhall/tests/type-inference/failure/unit/UnionDeprecatedConstructorsKeyword.txt
index 91fb96d..91fb96d 100644
--- a/dhall/tests/type-errors/unit/UnionDeprecatedConstructorsKeyword.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionDeprecatedConstructorsKeyword.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeDuplicateVariants1.txt b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt
index 7372641..7372641 100644
--- a/dhall/tests/type-errors/unit/UnionTypeDuplicateVariants1.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants1.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeDuplicateVariants2.txt b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt
index 07042c2..07042c2 100644
--- a/dhall/tests/type-errors/unit/UnionTypeDuplicateVariants2.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeDuplicateVariants2.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeMixedKinds.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt
index 00e24b3..00e24b3 100644
--- a/dhall/tests/type-errors/unit/UnionTypeMixedKinds.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeMixedKinds2.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt
index 924b1e1..924b1e1 100644
--- a/dhall/tests/type-errors/unit/UnionTypeMixedKinds2.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds2.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeMixedKinds3.txt b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt
index 1113a0d..1113a0d 100644
--- a/dhall/tests/type-errors/unit/UnionTypeMixedKinds3.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeMixedKinds3.txt
diff --git a/dhall/tests/type-errors/unit/UnionTypeNotType.txt b/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt
index b2c06e0..b2c06e0 100644
--- a/dhall/tests/type-errors/unit/UnionTypeNotType.txt
+++ b/dhall/tests/type-inference/failure/unit/UnionTypeNotType.txt
diff --git a/dhall/tests/type-errors/unit/VariableFree.txt b/dhall/tests/type-inference/failure/unit/VariableFree.txt
index db78e15..db78e15 100644
--- a/dhall/tests/type-errors/unit/VariableFree.txt
+++ b/dhall/tests/type-inference/failure/unit/VariableFree.txt