From 70eede4fd012f49dfab0e2e27fb3a4e4bbff6325 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 1 Feb 2020 22:04:34 +0000 Subject: Implement once nice error using annotate_snippets --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index 070e461..3673338 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -1 +1,8 @@ -Type error: Unhandled error: function annot mismatch: (Type : Kind) : Type +Type error: Unhandled error: error: function annot mismatch + --> :1:5 + | +1 | [] : List Type + | ^^^^^^^^^ function annot mismatch + | ---- help: this expects an argument of type: Type + | ---- help: but this has type: Kind + | -- cgit v1.2.3 From 92bbea48f9a0380a614f2687c73d55a67ff9294e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 15:02:23 +0000 Subject: More nice errors plus some refactor --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index 3673338..125cc87 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -1,8 +1,8 @@ -Type error: Unhandled error: error: function annot mismatch +Type error: Unhandled error: error: Wrong type of function argument --> :1:5 | 1 | [] : List Type - | ^^^^^^^^^ function annot mismatch + | ^^^^^^^^^ Wrong type of function argument | ---- help: this expects an argument of type: Type | ---- help: but this has type: Kind | -- cgit v1.2.3 From d8c3ced0f1acb1924c801fadbfd3077dede9b0dd Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 17:22:27 +0000 Subject: More errors --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index 125cc87..1459ca1 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -3,6 +3,6 @@ Type error: Unhandled error: error: Wrong type of function argument | 1 | [] : List Type | ^^^^^^^^^ Wrong type of function argument - | ---- help: this expects an argument of type: Type - | ---- help: but this has type: Kind + | ^^^^ this expects an argument of type: Type + | ^^^^ but this has type: Kind | -- cgit v1.2.3 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/ListLiteralEmptyNotType.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') 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` -- cgit v1.2.3