From f3681f7a32ddb78db4d564769b50b697c54ebeac Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 18:03:03 +0000 Subject: Tweak errors --- dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt | 5 +++-- dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt | 5 ++--- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 5 +++-- dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt | 4 ++-- dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt | 3 +-- dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt | 5 +++-- 6 files changed, 14 insertions(+), 13 deletions(-) (limited to 'dhall/tests/type-errors/unit') diff --git a/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt b/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt index d8811c2..01facbc 100644 --- a/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt +++ b/dhall/tests/type-errors/unit/FunctionApplicationArgumentNotMatch.txt @@ -1,8 +1,9 @@ -Type error: Unhandled error: error: Wrong type of function argument +Type error: Unhandled error: error: wrong type of function argument --> :1:1 | 1 | (λ(_ : Natural) → _) True - | ^^^^^^^^^^^^^^^^^^^^^^^^ Wrong type of function argument | ^^^^^^^^^^^^^^^^^^ this expects an argument of type: Natural | ^^^^ but this has type: Bool | + = note: expected type `Natural` + found type `Bool` diff --git a/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt b/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt index 0732d1c..f779fd6 100644 --- a/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt +++ b/dhall/tests/type-errors/unit/FunctionApplicationIsNotFunction.txt @@ -1,7 +1,6 @@ -Type error: Unhandled error: error: Trying to apply an argument to a value that is not a function +Type error: Unhandled error: error: expected function, found `Bool` --> :1:0 | 1 | True True - | ^^^^ this has type: `Bool` + | ^^^^ function application requires a function | - = help: only functions can be applied to diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index 1459ca1..aa7c8c5 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -1,8 +1,9 @@ -Type error: Unhandled error: error: Wrong type of function argument +Type error: Unhandled error: error: wrong type of function argument --> :1:5 | 1 | [] : List Type - | ^^^^^^^^^ Wrong type of function argument | ^^^^ this expects an argument of type: Type | ^^^^ but this has type: Kind | + = note: expected type `Type` + found type `Kind` diff --git a/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt b/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt index 3a12c06..053a054 100644 --- a/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt +++ b/dhall/tests/type-errors/unit/MergeHandlerNotFunction.txt @@ -1,9 +1,9 @@ -Type error: Unhandled error: error: Handler is not a function +Type error: Unhandled error: error: merge handler is not a function --> :1:0 | 1 | merge { x = True } (< x : Bool >.x True) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this merge expression - | ^^^^^^^^^^^^ the handler `x` had type: `Bool` + | ^^^^^^^^^^^^ the handler for `x` has type: `Bool` | ------------------- help: the corresponding variant has type: `Bool` | = help: a handler for this variant must be a function that takes an input of type: `Bool` diff --git a/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt b/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt index 2afbc78..faca63a 100644 --- a/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt +++ b/dhall/tests/type-errors/unit/MergeHandlerNotMatchAlternativeType.txt @@ -3,7 +3,6 @@ Type error: Unhandled error: error: Wrong handler input type | 1 | merge { x = λ(_ : Bool) → _ } (< x : Natural >.x 1) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this merge expression - | ^^^^^^^^^^^^^^^^^^^^^^^ the handler `x` expects a value of type: `Bool` + | ^^^^^^^^^^^^^^^^^^^^^^^ the handler for `x` expects a value of type: `Bool` | ^^^^^^^^^^^^^^^^^^^ but the corresponding variant has type: `Natural` | - = help: only functions can be applied to diff --git a/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt b/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt index a35b9ab..7e410c4 100644 --- a/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt +++ b/dhall/tests/type-errors/unit/NaturalSubtractNotNatural.txt @@ -1,8 +1,9 @@ -Type error: Unhandled error: error: Wrong type of function argument +Type error: Unhandled error: error: wrong type of function argument --> :1:0 | 1 | Natural/subtract True True - | ^^^^^^^^^^^^^^^^^^^^^ Wrong type of function argument | ^^^^^^^^^^^^^^^^ this expects an argument of type: Natural | ^^^^ but this has type: Bool | + = note: expected type `Natural` + found type `Bool` -- cgit v1.2.3